From 8f9a8658bdb9fa26090aa2e0ce7b6ec4cf85e59d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 22:45:08 +0000 Subject: [PATCH 1/4] Bump uuid from 9.0.1 to 14.0.0 in /sync-api-service Bumps [uuid](https://github.com/uuidjs/uuid) from 9.0.1 to 14.0.0. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v9.0.1...v14.0.0) --- updated-dependencies: - dependency-name: uuid dependency-version: 14.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- sync-api-service/package-lock.json | 16 ++++++++-------- sync-api-service/package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sync-api-service/package-lock.json b/sync-api-service/package-lock.json index 31b09f7a..7d952fcd 100644 --- a/sync-api-service/package-lock.json +++ b/sync-api-service/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@vscode/sync-api-common": "0.9.0", - "uuid": "^9.0.1", + "uuid": "^14.0.0", "vscode-uri": "^3.0.8" }, "devDependencies": { @@ -43,15 +43,15 @@ } }, "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist-node/bin/uuid" } }, "node_modules/vscode-uri": { @@ -79,9 +79,9 @@ "integrity": "sha512-8UeaBbC+dNwtBgb+zkx+A3WP3VzDhBNeDwmm2sAjM0SnPMfOsFzjKoXpQ+m/shDJiWF23S7zhICm3I1PFvVlQA==" }, "uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==" }, "vscode-uri": { "version": "3.0.8", diff --git a/sync-api-service/package.json b/sync-api-service/package.json index 80043617..975b63df 100644 --- a/sync-api-service/package.json +++ b/sync-api-service/package.json @@ -26,7 +26,7 @@ "fsChunks" ], "dependencies": { - "uuid": "^9.0.1", + "uuid": "^14.0.0", "vscode-uri": "^3.0.8", "@vscode/sync-api-common": "0.9.0" }, From 22272e5960b7709753d136fef91266a4492703eb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 15:36:05 +0000 Subject: [PATCH 2/4] Fix build: replace uuid with Node.js crypto.randomUUID() Agent-Logs-Url: https://github.com/microsoft/vscode-wasm/sessions/521385ba-a33c-4e3d-85ef-0aea0511c6f9 Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> --- sync-api-service/package-lock.json | 56 ++++++++++++++++-------------- sync-api-service/package.json | 5 ++- sync-api-service/src/terminal.ts | 4 +-- sync-api-service/tsconfig.json | 1 + 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/sync-api-service/package-lock.json b/sync-api-service/package-lock.json index 7d952fcd..da1d5d33 100644 --- a/sync-api-service/package-lock.json +++ b/sync-api-service/package-lock.json @@ -10,11 +10,10 @@ "license": "MIT", "dependencies": { "@vscode/sync-api-common": "0.9.0", - "uuid": "^14.0.0", "vscode-uri": "^3.0.8" }, "devDependencies": { - "@types/uuid": "^9.0.7", + "@types/node": "^18.14.6", "@types/vscode": "1.71.0" }, "engines": { @@ -22,11 +21,15 @@ "vscode": "^1.71.0" } }, - "node_modules/@types/uuid": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", - "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", - "dev": true + "node_modules/@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/vscode": { "version": "1.71.0", @@ -42,17 +45,12 @@ "node": ">=16.14.2" } }, - "node_modules/uuid": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", - "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist-node/bin/uuid" - } + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" }, "node_modules/vscode-uri": { "version": "3.0.8", @@ -61,11 +59,14 @@ } }, "dependencies": { - "@types/uuid": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", - "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", - "dev": true + "@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } }, "@types/vscode": { "version": "1.71.0", @@ -78,10 +79,11 @@ "resolved": "https://registry.npmjs.org/@vscode/sync-api-common/-/sync-api-common-0.9.0.tgz", "integrity": "sha512-8UeaBbC+dNwtBgb+zkx+A3WP3VzDhBNeDwmm2sAjM0SnPMfOsFzjKoXpQ+m/shDJiWF23S7zhICm3I1PFvVlQA==" }, - "uuid": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", - "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==" + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "vscode-uri": { "version": "3.0.8", diff --git a/sync-api-service/package.json b/sync-api-service/package.json index 975b63df..ca2bcc07 100644 --- a/sync-api-service/package.json +++ b/sync-api-service/package.json @@ -26,13 +26,12 @@ "fsChunks" ], "dependencies": { - "uuid": "^14.0.0", "vscode-uri": "^3.0.8", "@vscode/sync-api-common": "0.9.0" }, "devDependencies": { - "@types/vscode": "1.71.0", - "@types/uuid": "^9.0.7" + "@types/node": "^18.14.6", + "@types/vscode": "1.71.0" }, "scripts": { "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", diff --git a/sync-api-service/src/terminal.ts b/sync-api-service/src/terminal.ts index c960da28..50a78261 100644 --- a/sync-api-service/src/terminal.ts +++ b/sync-api-service/src/terminal.ts @@ -5,7 +5,7 @@ import { Event, EventEmitter, Pseudoterminal, Uri } from 'vscode'; -import * as uuid from 'uuid'; +import { randomUUID } from 'crypto'; import { RAL } from '@vscode/sync-api-common'; import { CharacterDeviceDriver, FileDescriptorDescription } from './device'; @@ -232,7 +232,7 @@ class ServiceTerminalImpl implements ServicePseudoTerminal, CharacterDeviceDrive this._onAnyKey = new EventEmitter; this.onAnyKey = this._onAnyKey.event; - const id = this.id = uuid.v4(); + const id = this.id = randomUUID(); this.encoder = RAL().TextEncoder.create(); this.decoder = RAL().TextDecoder.create(); diff --git a/sync-api-service/tsconfig.json b/sync-api-service/tsconfig.json index d1d5bec8..aa11e3c2 100644 --- a/sync-api-service/tsconfig.json +++ b/sync-api-service/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "composite": true, "types": [ + "node", "vscode" ], "module": "Node16", From cbd5c6b17386163b39090bba9da436e5ac1f0586 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 15:45:22 +0000 Subject: [PATCH 3/4] Update pipelines and @types/node to Node 22 Agent-Logs-Url: https://github.com/microsoft/vscode-wasm/sessions/27ace3bf-5258-4261-b6ae-93f72d83e43b Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> --- build/azure-pipelines/darwin/build.yml | 2 +- build/azure-pipelines/linux/build.yml | 2 +- build/azure-pipelines/pipeline.yml | 36 ++++++++++++------------ build/azure-pipelines/win32/build.yml | 2 +- package-lock.json | 38 ++++++++++++++++++++------ package.json | 2 +- sync-api-service/package-lock.json | 30 ++++++++++---------- sync-api-service/package.json | 2 +- 8 files changed, 67 insertions(+), 47 deletions(-) diff --git a/build/azure-pipelines/darwin/build.yml b/build/azure-pipelines/darwin/build.yml index ff6c12aa..b6299257 100644 --- a/build/azure-pipelines/darwin/build.yml +++ b/build/azure-pipelines/darwin/build.yml @@ -1,7 +1,7 @@ steps: - task: NodeTool@0 inputs: - versionSpec: '20.15.1' + versionSpec: '22.x' displayName: 'Install Node.js' - script: | diff --git a/build/azure-pipelines/linux/build.yml b/build/azure-pipelines/linux/build.yml index 4c164e74..2e79bc3f 100644 --- a/build/azure-pipelines/linux/build.yml +++ b/build/azure-pipelines/linux/build.yml @@ -10,7 +10,7 @@ steps: - task: NodeTool@0 inputs: - versionSpec: '20.15.1' + versionSpec: '22.x' displayName: 'Install Node.js' - script: | diff --git a/build/azure-pipelines/pipeline.yml b/build/azure-pipelines/pipeline.yml index 4b645090..5cea5337 100644 --- a/build/azure-pipelines/pipeline.yml +++ b/build/azure-pipelines/pipeline.yml @@ -55,13 +55,13 @@ extends: testPlatforms: - name: Linux nodeVersions: - - 20.15.1 + - 22.x - name: MacOS nodeVersions: - - 20.15.1 + - 22.x - name: Windows nodeVersions: - - 20.15.1 + - 22.x testSteps: - template: /build/azure-pipelines/templates/test-steps.yml@self parameters: @@ -81,13 +81,13 @@ extends: testPlatforms: - name: Linux nodeVersions: - - 20.15.1 + - 22.x - name: MacOS nodeVersions: - - 20.15.1 + - 22.x - name: Windows nodeVersions: - - 20.15.1 + - 22.x testSteps: - template: /build/azure-pipelines/templates/test-steps.yml@self parameters: @@ -107,13 +107,13 @@ extends: testPlatforms: - name: Linux nodeVersions: - - 20.15.1 + - 22.x - name: MacOS nodeVersions: - - 20.15.1 + - 22.x - name: Windows nodeVersions: - - 20.15.1 + - 22.x testSteps: - template: /build/azure-pipelines/templates/test-steps.yml@self parameters: @@ -133,13 +133,13 @@ extends: testPlatforms: - name: Linux nodeVersions: - - 20.15.1 + - 22.x - name: MacOS nodeVersions: - - 20.15.1 + - 22.x - name: Windows nodeVersions: - - 20.15.1 + - 22.x testSteps: - template: /build/azure-pipelines/templates/test-steps.yml@self parameters: @@ -159,13 +159,13 @@ extends: testPlatforms: - name: Linux nodeVersions: - - 20.15.1 + - 22.x - name: MacOS nodeVersions: - - 20.15.1 + - 22.x - name: Windows nodeVersions: - - 20.15.1 + - 22.x testSteps: - template: /build/azure-pipelines/templates/test-steps.yml@self parameters: @@ -185,13 +185,13 @@ extends: testPlatforms: - name: Linux nodeVersions: - - 20.15.1 + - 22.x - name: MacOS nodeVersions: - - 20.15.1 + - 22.x - name: Windows nodeVersions: - - 20.15.1 + - 22.x testSteps: - template: /build/azure-pipelines/templates/test-steps.yml@self parameters: diff --git a/build/azure-pipelines/win32/build.yml b/build/azure-pipelines/win32/build.yml index 74d7b843..b2fb5509 100644 --- a/build/azure-pipelines/win32/build.yml +++ b/build/azure-pipelines/win32/build.yml @@ -1,7 +1,7 @@ steps: - task: NodeTool@0 inputs: - versionSpec: '20.15.1' + versionSpec: '22.x' displayName: 'Install Node.js' - script: | diff --git a/package-lock.json b/package-lock.json index 6ba563ee..146f9861 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@types/assert": "^1.5.11", "@types/glob": "^8.1.0", "@types/mocha": "^10.0.10", - "@types/node": "^18.14.6", + "@types/node": "^22.0.0", "@types/path-browserify": "^1.0.2", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", @@ -904,10 +904,14 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.14.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz", - "integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==", - "dev": true + "version": "22.19.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", + "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -6437,6 +6441,13 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "node_modules/union": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", @@ -7288,10 +7299,13 @@ "dev": true }, "@types/node": { - "version": "18.14.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz", - "integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==", - "dev": true + "version": "22.19.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", + "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==", + "dev": true, + "requires": { + "undici-types": "~6.21.0" + } }, "@types/normalize-package-data": { "version": "2.4.1", @@ -11230,6 +11244,12 @@ "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true }, + "undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true + }, "union": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", diff --git a/package.json b/package.json index 50c09eb1..cfb082ac 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "devDependencies": { "@types/assert": "^1.5.11", "assert": "^2.1.0", - "@types/node": "^18.14.6", + "@types/node": "^22.0.0", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", "esbuild": "^0.25.0", diff --git a/sync-api-service/package-lock.json b/sync-api-service/package-lock.json index da1d5d33..82262869 100644 --- a/sync-api-service/package-lock.json +++ b/sync-api-service/package-lock.json @@ -13,7 +13,7 @@ "vscode-uri": "^3.0.8" }, "devDependencies": { - "@types/node": "^18.14.6", + "@types/node": "^22.0.0", "@types/vscode": "1.71.0" }, "engines": { @@ -22,13 +22,13 @@ } }, "node_modules/@types/node": { - "version": "18.19.130", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", - "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "version": "22.19.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", + "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, "node_modules/@types/vscode": { @@ -46,9 +46,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" }, @@ -60,12 +60,12 @@ }, "dependencies": { "@types/node": { - "version": "18.19.130", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", - "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "version": "22.19.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", + "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==", "dev": true, "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, "@types/vscode": { @@ -80,9 +80,9 @@ "integrity": "sha512-8UeaBbC+dNwtBgb+zkx+A3WP3VzDhBNeDwmm2sAjM0SnPMfOsFzjKoXpQ+m/shDJiWF23S7zhICm3I1PFvVlQA==" }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true }, "vscode-uri": { diff --git a/sync-api-service/package.json b/sync-api-service/package.json index ca2bcc07..ffe2fcc8 100644 --- a/sync-api-service/package.json +++ b/sync-api-service/package.json @@ -30,7 +30,7 @@ "@vscode/sync-api-common": "0.9.0" }, "devDependencies": { - "@types/node": "^18.14.6", + "@types/node": "^22.0.0", "@types/vscode": "1.71.0" }, "scripts": { From a664a94bd3c7347480f362dd4ea36715d40cbabc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 15:58:20 +0000 Subject: [PATCH 4/4] Restore uuid v14 using require() for Node 22.12+ ESM/CJS interop Agent-Logs-Url: https://github.com/microsoft/vscode-wasm/sessions/84ffa723-15b2-4f7f-aa7c-83b6aae23373 Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> --- sync-api-service/package-lock.json | 19 +++++++++++++++++++ sync-api-service/package.json | 5 +++-- sync-api-service/src/terminal.ts | 8 +++++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/sync-api-service/package-lock.json b/sync-api-service/package-lock.json index 82262869..c04a5724 100644 --- a/sync-api-service/package-lock.json +++ b/sync-api-service/package-lock.json @@ -10,6 +10,7 @@ "license": "MIT", "dependencies": { "@vscode/sync-api-common": "0.9.0", + "uuid": "^14.0.0", "vscode-uri": "^3.0.8" }, "devDependencies": { @@ -52,6 +53,19 @@ "dev": true, "license": "MIT" }, + "node_modules/uuid": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, "node_modules/vscode-uri": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", @@ -85,6 +99,11 @@ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true }, + "uuid": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==" + }, "vscode-uri": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", diff --git a/sync-api-service/package.json b/sync-api-service/package.json index ffe2fcc8..aba904a8 100644 --- a/sync-api-service/package.json +++ b/sync-api-service/package.json @@ -26,8 +26,9 @@ "fsChunks" ], "dependencies": { - "vscode-uri": "^3.0.8", - "@vscode/sync-api-common": "0.9.0" + "@vscode/sync-api-common": "0.9.0", + "uuid": "^14.0.0", + "vscode-uri": "^3.0.8" }, "devDependencies": { "@types/node": "^22.0.0", diff --git a/sync-api-service/src/terminal.ts b/sync-api-service/src/terminal.ts index 50a78261..f6a50180 100644 --- a/sync-api-service/src/terminal.ts +++ b/sync-api-service/src/terminal.ts @@ -5,11 +5,13 @@ import { Event, EventEmitter, Pseudoterminal, Uri } from 'vscode'; -import { randomUUID } from 'crypto'; - import { RAL } from '@vscode/sync-api-common'; import { CharacterDeviceDriver, FileDescriptorDescription } from './device'; +// uuid v14 is pure ESM; use require() which Node 22.12+ supports for synchronous ESM +// eslint-disable-next-line @typescript-eslint/no-require-imports +const { v4: uuidV4 } = require('uuid') as { v4: () => string }; + class LineBuffer { private cursor: number; @@ -232,7 +234,7 @@ class ServiceTerminalImpl implements ServicePseudoTerminal, CharacterDeviceDrive this._onAnyKey = new EventEmitter; this.onAnyKey = this._onAnyKey.event; - const id = this.id = randomUUID(); + const id = this.id = uuidV4(); this.encoder = RAL().TextEncoder.create(); this.decoder = RAL().TextDecoder.create();