Skip to content

Commit

Permalink
Merge branch 'release/v0.14.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Apr 27, 2018
2 parents c764b28 + ae56e63 commit b08fe42
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 67 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 0.14.2 (2018-04-28)

* Fixed "PIP: Could not find a version that satisfies the requirement" (issue [#102](https://github.com/platformio/platformio-vscode-ide/issues/102))

## 0.14.1 (2018-04-09)

* Temporary workaround for urgent VSCode bug in v1.22 with a broken task runner for Windows OS (issue [#97](https://github.com/platformio/platformio-vscode-ide/issues/97))
Expand Down
36 changes: 7 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,28 @@
{
"name": "platformio-ide",
"version": "0.14.1",
"version": "0.14.2",
"publisher": "platformio",
"engines": {
"vscode": "^1.18.0"
},
"license": "Apache-2.0",
"displayName": "PlatformIO IDE",
"description": "Official PlatformIO IDE for IoT, Arduino, ARM mbed, Espressif (ESP8266/ESP32), STM32, PIC32, nRF51/nRF52, FPGA, CMSIS, SPL, AVR, Samsung ARTIK, libOpenCM3",
"description": "Development environment for IoT, Arduino, ARM mbed, Espressif (ESP8266/ESP32), STM32, PIC32, nRF51/nRF52, FPGA, CMSIS, SPL, AVR, Samsung ARTIK, libOpenCM3",
"categories": [
"Languages",
"Debuggers",
"Languages",
"Other"
],
"keywords": [
"PlatformIO",
"IoT",
"arduino",
"mbed",
"debug",
"serial",
"unittest",
"embedded",
"flash",
"firmware",
"CMSIS",
"ESP-IDF",
"SPL",
"STM32Cube",
"avr",
"arm",
"espressif",
"esp8266",
"esp32",
"stm32",
"pic32",
"nRF51",
"nRF52",
"fpga",
"verilog",
"hardware",
"monitor"
"debug",
"arduino"
],
"preview": true,
"main": "./lib/main",
"icon": "images/icon.png",
"icon": "resources/platformio-logo.png",
"homepage": "http://platformio.org",
"author": {
"name": "PlatformIO.Org"
Expand Down Expand Up @@ -244,7 +222,7 @@
"dependencies": {
"fs-plus": "^3.0.0",
"ini": "^1.3.4",
"platformio-node-helpers": "^0.5.1"
"platformio-node-helpers": "^0.5.2"
},
"extensionDependencies": [
"ms-vscode.cpptools",
Expand Down
File renamed without changes
15 changes: 11 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ class PlatformIOVSCodeExtension {
}
});

this.registerCommands();

await this.startInstaller();
this.registerCommands();

if (!hasPIOProject) {
await this.startPIOHome();
Expand Down Expand Up @@ -155,10 +154,18 @@ class PlatformIOVSCodeExtension {

registerCommands() {
// PIO Home
this._context.subscriptions.push(vscode.workspace.registerTextDocumentContentProvider('platformio-home', new HomeContentProvider()));
this._context.subscriptions.push(vscode.workspace.registerTextDocumentContentProvider(
'platformio-home',
new HomeContentProvider())
);
this._context.subscriptions.push(vscode.commands.registerCommand(
'platformio-ide.showHome',
() => vscode.commands.executeCommand('vscode.previewHtml', vscode.Uri.parse('platformio-home://'), vscode.ViewColumn.One, 'PIO Home')
() => vscode.commands.executeCommand(
'vscode.previewHtml',
vscode.Uri.parse('platformio-home://'),
vscode.ViewColumn.One,
this.getEnterpriseSetting('pioHomeTitle', 'PIO Home')
)
));

this._context.subscriptions.push(vscode.commands.registerCommand(
Expand Down
35 changes: 1 addition & 34 deletions src/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export default class PIOTasksProvider {

this._refreshTimeout = null;

this.removeStaticTasks();
this.requestRefresh();
}

Expand All @@ -78,28 +77,6 @@ export default class PIOTasksProvider {
this.subscriptions = [];
}

async removeStaticTasks() {
const manifestPath = path.join(this.projectDir, '.vscode', 'tasks.json');
if (!fs.isFileSync(manifestPath)) {
return;
}
const content = await new Promise(resolve => {
fs.readFile(
manifestPath,
'utf-8',
(err, data) => resolve(err ? '' : data)
);
});
if (!content.includes('PlatformIO: Upload SPIFFS image')) {
return;
}
try {
fs.unlink(manifestPath);
} catch (err) {
console.error(err);
}
}

requestRefresh() {
if (this._refreshTimeout) {
clearTimeout(this._refreshTimeout);
Expand Down Expand Up @@ -251,24 +228,14 @@ class TaskCreator {
}

create() {
let pioCmd = 'platformio';
if (IS_WINDOWS) {
pioCmd = 'platformio.exe';
process.env.PATH.split(path.delimiter).forEach(item => {
if (fs.isFileSync(path.join(item, pioCmd))) {
pioCmd = path.join(item, pioCmd);
return;
}
});
}
const task = new vscode.Task(
{
type: PIOTasksProvider.title,
args: this._args
},
this.name,
PIOTasksProvider.title,
new vscode.ProcessExecution(pioCmd, this._args, {
new vscode.ProcessExecution(IS_WINDOWS ? 'platformio.exe' : 'platformio', this._args, {
env: process.env
}),
'$platformio'
Expand Down

0 comments on commit b08fe42

Please sign in to comment.