Skip to content

Commit 0162825

Browse files
committed
Upgrade dependencies and bump vscode api to v1.104.0 and node to 22.18
Signed-off-by: paulober <[email protected]>
1 parent 24c3053 commit 0162825

File tree

7 files changed

+333
-260
lines changed

7 files changed

+333
-260
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If you have any issues while installing, please check out the [Troubleshooting](
4141

4242
> **Supported Platforms: Raspberry Pi OS (64-bit), Windows 10/11 (x86_64), macOS Sonoma (14.0) and newer, Linux x64 and arm64**
4343
44-
- Visual Studio Code v1.92.1 or later
44+
- Visual Studio Code v1.104.0 or later
4545

4646
### Raspberry Pi OS and Windows
4747

package-lock.json

Lines changed: 298 additions & 234 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"url": "https://github.com/raspberrypi/pico-vscode/"
1717
},
1818
"engines": {
19-
"vscode": "^1.92.1",
20-
"node": ">=20.14.0"
19+
"vscode": "^1.104.0",
20+
"node": ">=22.18.0"
2121
},
2222
"os": [
2323
"win32",
@@ -350,34 +350,32 @@
350350
"test": "npm run lint"
351351
},
352352
"devDependencies": {
353-
"@eslint/js": "^9.26.0",
354-
"@rollup/plugin-commonjs": "^28.0.3",
353+
"@eslint/js": "^9.36.0",
354+
"@rollup/plugin-commonjs": "^28.0.6",
355355
"@rollup/plugin-node-resolve": "^16.0.1",
356356
"@rollup/plugin-terser": "^0.4.4",
357-
"@rollup/plugin-typescript": "^12.1.2",
357+
"@rollup/plugin-typescript": "^12.1.4",
358358
"@types/adm-zip": "^0.5.7",
359359
"@types/ini": "^4.1.1",
360-
"@types/node": "^20.14.2",
361-
"@types/uuid": "^10.0.0",
362-
"@types/vscode": "^1.92.0",
360+
"@types/node": "^22.18",
361+
"@types/vscode": "^1.104.0",
363362
"@types/which": "^3.0.4",
364-
"eslint": "^9.26.0",
365-
"eslint-config-prettier": "^10.1.2",
366-
"globals": "^16.0.0",
367-
"rollup": "^4.40.1",
363+
"eslint": "^9.36.0",
364+
"eslint-config-prettier": "^10.1.8",
365+
"globals": "^16.4.0",
366+
"rollup": "^4.52.0",
368367
"tslib": "^2.8.1",
369-
"typescript": "^5.8.3",
370-
"typescript-eslint": "^8.31.1"
368+
"typescript": "^5.9.2",
369+
"typescript-eslint": "^8.44.0"
371370
},
372371
"dependencies": {
373-
"@vscode/python-extension": "^1.0.5",
372+
"@vscode/python-extension": "^1.0.6",
374373
"adm-zip": "^0.5.16",
375-
"got": "^14.4.7",
374+
"got": "^14.4.9",
376375
"ini": "^5.0.0",
377376
"rimraf": "^6.0.1",
378377
"toml": "^3.0.0",
379378
"undici": "^6.21.0",
380-
"uuid": "^11.1.0",
381379
"which": "^5.0.0"
382380
}
383381
}

src/utils/download.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {
4343
} from "./githubREST.mjs";
4444
import { unxzFile, unzipFile } from "./downloadHelpers.mjs";
4545
import type { Writable } from "stream";
46-
import { unknownErrorToString } from "./errorHelper.mjs";
46+
import { stdoutToString, unknownErrorToString } from "./errorHelper.mjs";
4747
import { got, type Progress } from "got";
4848
import { pipeline as streamPipeline } from "node:stream/promises";
4949
import {
@@ -1188,8 +1188,8 @@ function _runCommand(
11881188

11891189
return new Promise<number | null>(resolve => {
11901190
const generatorProcess = exec(command, options, (error, stdout, stderr) => {
1191-
Logger.info(LoggerSource.downloader, stdout);
1192-
Logger.info(LoggerSource.downloader, stderr);
1191+
Logger.info(LoggerSource.downloader, stdoutToString(stdout));
1192+
Logger.info(LoggerSource.downloader, stdoutToString(stderr));
11931193
if (error) {
11941194
Logger.error(LoggerSource.downloader, `${error.message}`);
11951195
resolve(null); // indicate error

src/utils/errorHelper.mts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@ export function unknownToError(unknown: unknown): Error {
4141
return new Error("Unknown error");
4242
}
4343
}
44+
45+
export function stdoutToString(
46+
stdout: string | Buffer<ArrayBufferLike>
47+
): string {
48+
if (typeof stdout === "string") {
49+
return stdout;
50+
} else {
51+
return new TextDecoder().decode(stdout);
52+
}
53+
}

src/utils/setupZephyr.mts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
import { SDK_REPOSITORY_URL } from "./githubREST.mjs";
3838
import { vsExists } from "./vsHelpers.mjs";
3939
import which from "which";
40+
import { stdoutToString } from "./errorHelper.mjs";
4041

4142
interface ZephyrSetupValue {
4243
cmakeMode: number;
@@ -157,8 +158,8 @@ function _runCommand(
157158
: "") + command,
158159
options,
159160
(error, stdout, stderr) => {
160-
Logger.debug(LoggerSource.zephyrSetup, stdout);
161-
Logger.debug(LoggerSource.zephyrSetup, stderr);
161+
Logger.debug(LoggerSource.zephyrSetup, stdoutToString(stdout));
162+
Logger.debug(LoggerSource.zephyrSetup, stdoutToString(stderr));
162163
if (error) {
163164
Logger.error(
164165
LoggerSource.zephyrSetup,

src/webview/newProjectPanel.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import {
5858
loadExamples,
5959
setupExample,
6060
} from "../utils/examplesUtil.mjs";
61-
import { unknownErrorToString } from "../utils/errorHelper.mjs";
61+
import { stdoutToString, unknownErrorToString } from "../utils/errorHelper.mjs";
6262
import type { Progress as GotProgress } from "got";
6363
import findPython, { showPythonNotFoundError } from "../utils/pythonHelper.mjs";
6464
import { OPENOCD_VERSION } from "../utils/sharedConstants.mjs";
@@ -2220,8 +2220,8 @@ export class NewProjectPanel {
22202220
command,
22212221
options,
22222222
(error, stdout, stderr) => {
2223-
this._logger.debug(stdout);
2224-
this._logger.info(stderr);
2223+
this._logger.debug(stdoutToString(stdout));
2224+
this._logger.info(stdoutToString(stderr));
22252225
if (error) {
22262226
this._logger.error(`Generator Process error: ${error.message}`);
22272227
resolve(null); // indicate error

0 commit comments

Comments
 (0)