Skip to content

Commit 77c6868

Browse files
authored
Merge pull request #205 from paulober/develop
Patch v3.7.5
2 parents 887d075 + 6bf272b commit 77c6868

File tree

7 files changed

+309
-360
lines changed

7 files changed

+309
-360
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ All notable changes to the "MicroPico" extension will be documented in this file
1010

1111
---
1212

13+
## [3.7.5] - 2024-02-22
14+
15+
### Changed
16+
- Upgraded to `pyboard-serial-com` `v3.0.7`,
17+
- Updated dependencies
18+
- Fixed #202, Switch stubs Windows shell error
19+
- Fixed #193, Notifications cleanup
20+
- Min VS Code version is now `v1.86.2`
21+
- Updated stubs to MicroPython v1.22.1 stable (Thanks to @Josverl [`micropython-rp2-rpi_pico_w-stubs`](https://github.com/Josverl/micropython-stubs/releases/tag/v1.22.0))
22+
1323
## [3.7.4] - 2024-01-23
1424

1525
# Changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**MicroPico** is a Visual Studio Code extension designed to simplify and accelerate the development of MicroPython projects for the Raspberry Pi Pico and Pico W boards. This tool streamlines the coding process, providing code highlighting, auto-completion, code snippets, and project management features, all tailored for the seamless development experience with MicroPython on Raspberry Pi Pico and Pico W microcontrollers.
66

7-
> __Included auto-completion based on Raspberry Pi Pico W MicroPython firmware: [RPI_PICO_W-20231005-v1.21.0.uf2](https://micropython.org/resources/firmware/RPI_PICO_W-20231005-v1.21.0.uf2) from the [micropython-stubs project](https://github.com/Josverl/micropython-stubs)__
7+
> __Included auto-completion based on Raspberry Pi Pico W MicroPython firmware: [RPI_PICO_W-20240105-v1.22.1.uf2](https://micropython.org/resources/firmware/RPI_PICO_W-20240105-v1.22.1.uf2) from the [micropython-stubs project](https://github.com/Josverl/micropython-stubs)__
88
99
Works with:
1010
| Platform | x64 | arm64 | armhf |

package-lock.json

+274-323
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pico-w-go",
33
"displayName": "MicroPico",
44
"description": "Auto-completion, remote workspace and a REPL console integration for the Raspberry Pi Pico (W) with MicroPython firmware.",
5-
"version": "3.7.4",
5+
"version": "3.7.5",
66
"publisher": "paulober",
77
"license": "MPL-2.0",
88
"homepage": "https://github.com/paulober/MicroPico/blob/main/README.md",
@@ -20,8 +20,8 @@
2020
},
2121
"markdown": "github",
2222
"engines": {
23-
"vscode": "^1.83.0",
24-
"node": ">=18.15.0"
23+
"vscode": "^1.86.2",
24+
"node": ">=18.17.0"
2525
},
2626
"keywords": [
2727
"raspberry",
@@ -571,7 +571,7 @@
571571
"scripts": {
572572
"vscode:uninstall": "node ./dist/vscodeUninstall.mjs",
573573
"vscode:prepublish": "npm run package",
574-
"postinstall": "python3 -m pip install -U micropython-rp2-rpi_pico_w-stubs==1.21.* --target ./mpy_stubs --no-user",
574+
"postinstall": "python3 -m pip install -U micropython-rp2-rpi_pico_w-stubs==1.22.* --target ./mpy_stubs --no-user",
575575
"compile-uninstaller": "rollup -c uninstall.rollup.config.mjs",
576576
"compile": "rollup -c && npm run compile-uninstaller",
577577
"watch": "rollup -cw",
@@ -592,23 +592,23 @@
592592
"@types/lodash": "^4.14.202",
593593
"@types/mocha": "^10.0.6",
594594
"@types/node": "^18.x",
595-
"@types/uuid": "^9.0.7",
596-
"@types/vscode": "^1.83.0",
595+
"@types/uuid": "^9.0.8",
596+
"@types/vscode": "^1.86.0",
597597
"@types/which": "^3.0.3",
598-
"@typescript-eslint/eslint-plugin": "^6.19.0",
599-
"@typescript-eslint/parser": "^6.19.0",
600-
"@vscode/test-electron": "^2.3.8",
598+
"@typescript-eslint/eslint-plugin": "^7.0.2",
599+
"@typescript-eslint/parser": "^7.0.2",
600+
"@vscode/test-electron": "^2.3.9",
601601
"eslint": "^8.56.0",
602602
"eslint-config-prettier": "^9.1.0",
603603
"glob": "^9.3.4",
604-
"mocha": "^10.2.0",
605-
"rollup": "^4.9.6",
604+
"mocha": "^10.3.0",
605+
"rollup": "^4.12.0",
606606
"rollup-plugin-copy": "^3.5.0",
607607
"typescript": "^5.3.3"
608608
},
609609
"dependencies": {
610-
"@paulober/pyboard-serial-com": "^3.0.6",
611-
"axios": "^1.6.5",
610+
"@paulober/pyboard-serial-com": "^3.0.7",
611+
"axios": "^1.6.7",
612612
"fs-extra": "^11.2.0",
613613
"lodash": "^4.17.21",
614614
"rimraf": "^5.0.5",

src/activator.mts

+9-2
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,7 @@ export default class Activator {
11951195
void (async () => {
11961196
// this could let the PyboardRunner let recognize that it lost connection to
11971197
// the pyboard wrapper and mark the Pico as disconnected
1198+
// O(1)
11981199
await this.pyb?.checkStatus();
11991200
if (this.pyb?.isPipeConnected()) {
12001201
// ensure that the script is only executed once
@@ -1264,6 +1265,9 @@ export default class Activator {
12641265
) {
12651266
//this.ui?.refreshState(true);
12661267
this.logger.info("Connection to wrapper successfully established");
1268+
void vscode.window.showInformationMessage(
1269+
"Connection to Pico established."
1270+
);
12671271

12681272
return;
12691273
} else {
@@ -1277,8 +1281,11 @@ export default class Activator {
12771281
this.ui?.refreshState(false);
12781282
if (code === 0 || code === null) {
12791283
this.logger.info(`Pyboard exited with code 0`);
1280-
void vscode.window.showInformationMessage("Disconnected from Pico");
1281-
} else {
1284+
if (this.comDevice !== undefined) {
1285+
void vscode.window.showInformationMessage("Disconnected from Pico");
1286+
}
1287+
} else if (this.pyb?.isBoardConnected()) {
1288+
// true if the connection was lost after a board has been connected successfully
12821289
this.logger.error(`Pyboard exited with code ${code}`);
12831290
void vscode.window.showErrorMessage("Connection to Pico lost");
12841291
}

src/stubs.mts

+2-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ export async function installStubsByVersion(
289289

290290
// install stubs with pip vscode user directory
291291
const result = execSync(
292-
`${pip} install ${port}==${version} ` + `--target "${target}" --no-user`
292+
`&"${pip}" install ${port}==${version} ` + `--target "${target}" --no-user`,
293+
process.platform === "win32" ? { shell: "powershell" } : {}
293294
);
294295

295296
// check result

src/ui.mts

-20
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,6 @@ export default class UI {
6060
* Show the quick pick menu for Pico-W-Go contributed commands.
6161
*/
6262
public showQuickPick(): void {
63-
/*const items: QuickPickItem[] = pkg.contributes.commands
64-
.filter(item => item.command !== "pico-w-go.listCommands")
65-
.map(item => ({
66-
label: item.title,
67-
kind: QuickPickItemKind.Default,
68-
description: "",
69-
70-
// custom property
71-
cmd: item.command,
72-
}));
73-
74-
window
75-
.showQuickPick(items, { placeHolder: "Select Action" })
76-
.then(function (selected) {
77-
if (selected !== undefined) {
78-
commands.executeCommand(
79-
(selected as { cmd: string } & QuickPickItem).cmd
80-
);
81-
}
82-
});*/
8363
void commands.executeCommand("workbench.action.quickOpen", "> MicroPico: ");
8464
}
8565

0 commit comments

Comments
 (0)