From ddef207abf44cec2dcbdc3b93796b6e221cda142 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Mar 2023 20:15:53 -0600 Subject: [PATCH 1/7] Typo fixes --- src/release-notes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/release-notes.js b/src/release-notes.js index 6dba4a05..ca4ede4b 100644 --- a/src/release-notes.js +++ b/src/release-notes.js @@ -116,13 +116,13 @@ export default class PIOReleaseNotes {

Loading...

Stay in touch with us

- Please follow us on LinkedIn and Twitter @PlatformIO_Org] + Please follow us on LinkedIn and Twitter @PlatformIO_Org to keep up to date with the latest news, articles and tips!


PlatformIO Core: If you would like to read the PlatformIO Core release notes, - go to the Release Notes on docs.platformio.org). + go to the Release Notes on docs.platformio.org.

From 0f7a505ac4db9165f8b44e808ed33fa882906b57 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Mar 2023 22:03:59 -0600 Subject: [PATCH 2/7] Fixed a regression bug where running the same "monitor" causes the notification that the task "is already active" // Resolve #3656 --- CHANGELOG.md | 4 ++++ src/project/tasks.js | 20 +++++++------------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f63ff20..a7c45ca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes +## 3.1.1 (2023-03-??) + +* Fixed a regression bug where running the same "monitor" causes the notification that the task "is already active" (issue [#3656](https://github.com/platformio/platformio-vscode-ide/issues/3656)) + ## 3.1.0 (2023-03-13) * Add support for the ``${command:platformio-ide.activeEnvironment}`` variable that can be used in a custom [PlatformIO Toolbar](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-toolbar) and [VSCode variable substitution](https://code.visualstudio.com/docs/editor/variables-reference) (issue [#3588](https://github.com/platformio/platformio-vscode-ide/issues/3588)) diff --git a/src/project/tasks.js b/src/project/tasks.js index 22668793..a3c8d56f 100644 --- a/src/project/tasks.js +++ b/src/project/tasks.js @@ -90,7 +90,6 @@ export default class ProjectTaskManager { }, }), - vscode.tasks.onDidStartTask((event) => this.onDidStartTask(event)), vscode.tasks.onDidEndTaskProcess((event) => this.onDidEndTaskProcess(event)) ); @@ -149,6 +148,7 @@ export default class ProjectTaskManager { } runTask(task) { + this._autoCloseSerialMonitor(task); // use string-based task defination for Win 7 // issue #3481 vscode.commands.executeCommand( 'workbench.action.tasks.runTask', @@ -156,15 +156,7 @@ export default class ProjectTaskManager { ); } - onDidStartTask(event) { - this._autoCloseSerialMonitor(event.execution.task); - } - async _autoCloseSerialMonitor(startedTask) { - if (startedTask.definition.type !== ProjectTaskManager.PROVIDER_TYPE) { - return; - } - this._startedTask = startedTask; this._tasksToRestore = []; const closeMonitorConds = [ @@ -186,18 +178,20 @@ export default class ProjectTaskManager { // } vscode.tasks.taskExecutions.forEach((event) => { - const isCurrentEvent = this.areTasksEqual(this._startedTask, event.task); + const isCurrentTask = this.areTasksEqual(this._startedTask, event.task); const skipConds = [ - isCurrentEvent, // skip non-PlatformIO task event.task.definition.type !== ProjectTaskManager.PROVIDER_TYPE, !this.getTaskArgs(event.task).includes('monitor'), - this.isMonitorAndUploadTask(event.task), + this.isMonitorAndUploadTask(event.task) && !isCurrentTask, ]; if (skipConds.some((value) => value)) { return; } - this._tasksToRestore.push(event.task); + // do not restart the same tasks + if (!isCurrentTask) { + this._tasksToRestore.push(event.task); + } event.terminate(); }); } From 3a43a12f510483776b2cb7b6deeb8740e93ee988 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 16 Mar 2023 11:29:19 -0600 Subject: [PATCH 3/7] Added new platformio-ide.uploadAndMonitor command to "Upload and Monitor" active environment (useful for custom PlatformIO Toolbar) --- CHANGELOG.md | 3 ++- package.json | 7 +++++++ src/project/tasks.js | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7c45ca1..95fbd938 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## 3.1.1 (2023-03-??) -* Fixed a regression bug where running the same "monitor" causes the notification that the task "is already active" (issue [#3656](https://github.com/platformio/platformio-vscode-ide/issues/3656)) +* Added new ``platformio-ide.uploadAndMonitor`` command to "Upload and Monitor" active environment (useful for custom [PlatformIO Toolbar](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-toolbar)) +* Fixed a regression bug where running the same "device monitor" causes the notification that the task "is already active" (issue [#3656](https://github.com/platformio/platformio-vscode-ide/issues/3656)) ## 3.1.0 (2023-03-13) diff --git a/package.json b/package.json index b3691d73..16cc3461 100644 --- a/package.json +++ b/package.json @@ -154,6 +154,13 @@ "icon": "$(arrow-right)", "enablement": "pioProjectReady" }, + { + "command": "platformio-ide.uploadAndMonitor", + "title": "Upload and Monitor active environment", + "category": "PlatformIO", + "icon": "$(arrow-right)", + "enablement": "pioProjectReady" + }, { "command": "platformio-ide.clean", "title": "Clean active environment", diff --git a/src/project/tasks.js b/src/project/tasks.js index a3c8d56f..4033cc1c 100644 --- a/src/project/tasks.js +++ b/src/project/tasks.js @@ -249,6 +249,9 @@ export default class ProjectTaskManager { vscode.commands.registerCommand('platformio-ide.upload', () => _runTask('Upload') ), + vscode.commands.registerCommand('platformio-ide.uploadAndMonitor', () => + _runTask('Upload and Monitor') + ), vscode.commands.registerCommand('platformio-ide.clean', () => _runTask('Clean')), vscode.commands.registerCommand('platformio-ide.test', () => _runTask('Test')), vscode.commands.registerCommand('platformio-ide.serialMonitor', () => From 23fe4112c9fef68de9e220e1f9032fd9a272e885 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 16 Mar 2023 11:31:27 -0600 Subject: [PATCH 4/7] Update deps --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 16cc3461..2cb88c88 100644 --- a/package.json +++ b/package.json @@ -882,8 +882,8 @@ "platformio-vscode-debug": "~1.4.1" }, "devDependencies": { - "@babel/core": "~7.21.0", - "@babel/eslint-parser": "~7.19.1", + "@babel/core": "~7.21.3", + "@babel/eslint-parser": "~7.21.3", "@babel/plugin-proposal-class-properties": "~7.18.6", "@babel/preset-env": "~7.20.2", "@types/node": "~14", @@ -894,7 +894,7 @@ "eslint-import-resolver-webpack": "~0.13.2", "eslint-plugin-import": "~2.27.5", "prettier": "~2.8.4", - "webpack": "~5.76.1", + "webpack": "~5.76.2", "webpack-cli": "~5.0.1" }, "extensionDependencies": [ From 2b97f63b2b3da0c21d83c18059855906d4533c5d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 16 Mar 2023 12:32:56 -0600 Subject: [PATCH 5/7] Revert back the static "activationEvents" which is required by the VSCode ~1.65.0 --- package.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2cb88c88..007fdac8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,16 @@ "url": "https://github.com/platformio/platformio-vscode-ide.git" }, "activationEvents": [ - "workspaceContains:**/platformio.ini" + "workspaceContains:**/platformio.ini", + "onView:platformio-ide.quickAccess", + "onView:platformio-ide.projectTasks", + "onView:platformio-debug.peripherals", + "onView:platformio-debug.registers", + "onView:platformio-debug.memory", + "onView:platformio-debug.disassembly", + "onCommand:platformio-ide.showReleaseNotes", + "onCommand:platformio-ide.showHome", + "onCommand:platformio-ide.openPIOCoreCLI" ], "contributes": { "languages": [ From eaf9ae5d2f69f377e74fb904e3ff553867c7f079 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 16 Mar 2023 19:53:14 -0600 Subject: [PATCH 6/7] Restored support for macOS Touch Bar // Resolve #3659 --- CHANGELOG.md | 5 +++-- package.json | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95fbd938..5b11942d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## 3.1.1 (2023-03-??) -* Added new ``platformio-ide.uploadAndMonitor`` command to "Upload and Monitor" active environment (useful for custom [PlatformIO Toolbar](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-toolbar)) -* Fixed a regression bug where running the same "device monitor" causes the notification that the task "is already active" (issue [#3656](https://github.com/platformio/platformio-vscode-ide/issues/3656)) +* Added a new ``platformio-ide.uploadAndMonitor`` command which can be used with the custom [PlatformIO Toolbar](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-toolbar) +* Restored support for macOS Touch Bar (issue [#3659](https://github.com/platformio/platformio-vscode-ide/issues/3659)) +* Fixed a regression bug that caused notifications about a task being "already active" when running the same "device monitor" (issue [#3656](https://github.com/platformio/platformio-vscode-ide/issues/3656)) ## 3.1.0 (2023-03-13) diff --git a/package.json b/package.json index 007fdac8..6ef94c8e 100644 --- a/package.json +++ b/package.json @@ -151,28 +151,28 @@ }, { "command": "platformio-ide.build", - "title": "Build active environment", + "title": "Build", "category": "PlatformIO", "icon": "$(check)", "enablement": "pioProjectReady" }, { "command": "platformio-ide.upload", - "title": "Upload active environment", + "title": "Upload", "category": "PlatformIO", "icon": "$(arrow-right)", "enablement": "pioProjectReady" }, { "command": "platformio-ide.uploadAndMonitor", - "title": "Upload and Monitor active environment", + "title": "Upload and Monitor", "category": "PlatformIO", "icon": "$(arrow-right)", "enablement": "pioProjectReady" }, { "command": "platformio-ide.clean", - "title": "Clean active environment", + "title": "Clean", "category": "PlatformIO", "icon": "$(trashcan)", "enablement": "pioProjectReady" From 2dd95dc94fee433757de719ff7883ded54c275d6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 16 Mar 2023 20:00:39 -0600 Subject: [PATCH 7/7] Bump version to 3.1.1 --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b11942d..1429ab98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes -## 3.1.1 (2023-03-??) +## 3.1.1 (2023-03-16) * Added a new ``platformio-ide.uploadAndMonitor`` command which can be used with the custom [PlatformIO Toolbar](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-toolbar) * Restored support for macOS Touch Bar (issue [#3659](https://github.com/platformio/platformio-vscode-ide/issues/3659)) diff --git a/package.json b/package.json index 6ef94c8e..93f52aa1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "platformio-ide", - "version": "3.1.0", + "version": "3.1.1", "publisher": "platformio", "engines": { "vscode": "^1.65.0"