Skip to content

Commit

Permalink
Merge pull request #205 from paulober/develop
Browse files Browse the repository at this point in the history
Patch v3.7.5
  • Loading branch information
paulober authored Feb 22, 2024
2 parents 887d075 + 6bf272b commit 77c6868
Show file tree
Hide file tree
Showing 7 changed files with 309 additions and 360 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ All notable changes to the "MicroPico" extension will be documented in this file

---

## [3.7.5] - 2024-02-22

### Changed
- Upgraded to `pyboard-serial-com` `v3.0.7`,
- Updated dependencies
- Fixed #202, Switch stubs Windows shell error
- Fixed #193, Notifications cleanup
- Min VS Code version is now `v1.86.2`
- 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))

## [3.7.4] - 2024-01-23

# Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**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.

> __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)__
> __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)__
Works with:
| Platform | x64 | arm64 | armhf |
Expand Down
597 changes: 274 additions & 323 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pico-w-go",
"displayName": "MicroPico",
"description": "Auto-completion, remote workspace and a REPL console integration for the Raspberry Pi Pico (W) with MicroPython firmware.",
"version": "3.7.4",
"version": "3.7.5",
"publisher": "paulober",
"license": "MPL-2.0",
"homepage": "https://github.com/paulober/MicroPico/blob/main/README.md",
Expand All @@ -20,8 +20,8 @@
},
"markdown": "github",
"engines": {
"vscode": "^1.83.0",
"node": ">=18.15.0"
"vscode": "^1.86.2",
"node": ">=18.17.0"
},
"keywords": [
"raspberry",
Expand Down Expand Up @@ -571,7 +571,7 @@
"scripts": {
"vscode:uninstall": "node ./dist/vscodeUninstall.mjs",
"vscode:prepublish": "npm run package",
"postinstall": "python3 -m pip install -U micropython-rp2-rpi_pico_w-stubs==1.21.* --target ./mpy_stubs --no-user",
"postinstall": "python3 -m pip install -U micropython-rp2-rpi_pico_w-stubs==1.22.* --target ./mpy_stubs --no-user",
"compile-uninstaller": "rollup -c uninstall.rollup.config.mjs",
"compile": "rollup -c && npm run compile-uninstaller",
"watch": "rollup -cw",
Expand All @@ -592,23 +592,23 @@
"@types/lodash": "^4.14.202",
"@types/mocha": "^10.0.6",
"@types/node": "^18.x",
"@types/uuid": "^9.0.7",
"@types/vscode": "^1.83.0",
"@types/uuid": "^9.0.8",
"@types/vscode": "^1.86.0",
"@types/which": "^3.0.3",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@vscode/test-electron": "^2.3.8",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"@vscode/test-electron": "^2.3.9",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"glob": "^9.3.4",
"mocha": "^10.2.0",
"rollup": "^4.9.6",
"mocha": "^10.3.0",
"rollup": "^4.12.0",
"rollup-plugin-copy": "^3.5.0",
"typescript": "^5.3.3"
},
"dependencies": {
"@paulober/pyboard-serial-com": "^3.0.6",
"axios": "^1.6.5",
"@paulober/pyboard-serial-com": "^3.0.7",
"axios": "^1.6.7",
"fs-extra": "^11.2.0",
"lodash": "^4.17.21",
"rimraf": "^5.0.5",
Expand Down
11 changes: 9 additions & 2 deletions src/activator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,7 @@ export default class Activator {
void (async () => {
// this could let the PyboardRunner let recognize that it lost connection to
// the pyboard wrapper and mark the Pico as disconnected
// O(1)
await this.pyb?.checkStatus();
if (this.pyb?.isPipeConnected()) {
// ensure that the script is only executed once
Expand Down Expand Up @@ -1264,6 +1265,9 @@ export default class Activator {
) {
//this.ui?.refreshState(true);
this.logger.info("Connection to wrapper successfully established");
void vscode.window.showInformationMessage(
"Connection to Pico established."
);

return;
} else {
Expand All @@ -1277,8 +1281,11 @@ export default class Activator {
this.ui?.refreshState(false);
if (code === 0 || code === null) {
this.logger.info(`Pyboard exited with code 0`);
void vscode.window.showInformationMessage("Disconnected from Pico");
} else {
if (this.comDevice !== undefined) {
void vscode.window.showInformationMessage("Disconnected from Pico");
}
} else if (this.pyb?.isBoardConnected()) {
// true if the connection was lost after a board has been connected successfully
this.logger.error(`Pyboard exited with code ${code}`);
void vscode.window.showErrorMessage("Connection to Pico lost");
}
Expand Down
3 changes: 2 additions & 1 deletion src/stubs.mts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ export async function installStubsByVersion(

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

// check result
Expand Down
20 changes: 0 additions & 20 deletions src/ui.mts
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,6 @@ export default class UI {
* Show the quick pick menu for Pico-W-Go contributed commands.
*/
public showQuickPick(): void {
/*const items: QuickPickItem[] = pkg.contributes.commands
.filter(item => item.command !== "pico-w-go.listCommands")
.map(item => ({
label: item.title,
kind: QuickPickItemKind.Default,
description: "",
// custom property
cmd: item.command,
}));
window
.showQuickPick(items, { placeHolder: "Select Action" })
.then(function (selected) {
if (selected !== undefined) {
commands.executeCommand(
(selected as { cmd: string } & QuickPickItem).cmd
);
}
});*/
void commands.executeCommand("workbench.action.quickOpen", "> MicroPico: ");
}

Expand Down

0 comments on commit 77c6868

Please sign in to comment.