Repository navigation
chore(vscode-extension): update dependencies - #3005
Merged
Merged
Conversation
Modernize the extension's dependencies and dev toolchain: - Replace node-fetch and form-data with the global fetch/FormData built into VS Code's Node runtime; raise engines.vscode to ^1.90.0 (Node 20). - Drop the unused js-yaml dependency, move @types/node to devDependencies, and bump which to v7. - Upgrade TypeScript to 6.0, ESLint to 10 with typescript-eslint 8 and a flat config (eslint.config.mjs), mocha to 12, glob to 13, and @vscode/test-electron to 3. - Remove the stale yarn resolutions; the regenerated lockfile has no audit findings and resolves serialize-javascript to 7.1.4. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the VS Code extension's runtime dependencies and dev toolchain. Runtime behavior stays the same.
engines.vscode/@types/vscodenode-fetch+@types/node-fetchfetch)form-dataFormData)js-yamlwhich@types/nodedependenciesanddevDependencies)devDependenciesonly)typescript@typescript-eslint/{parser,eslint-plugin}typescript-eslint^8.72.0eslint@stylistic/eslint-pluginmocha/@types/mochaglob/@types/glob@vscode/test-electronresolutionsCode and config changes
src/openinvscode.tsnow uses the globalfetchandFormDatainstead ofnode-fetchandform-data. When the body is aFormData, the native fetch setsmultipart/form-datawith a boundary, just as before. Thevm_idvalue is now passed asvmId ?? '', because nativeFormDataonly accepts strings. The caller has already checked thatvm_idis present.fetcharrived with VS Code 1.82 (Node 18), but there it is still experimental. 1.90 (May 2024) ships Electron 29 / Node 20.9, wherefetchandFormDataare fully supported. Node 20 also suits the newerwhich/isexepackages.tsconfig.jsonnow usesmodule: node16, which still compiles to CommonJS. The target and lib are now ES2022.types: ["node", "mocha"]is set explicitly because TS 6 no longer includes every installed@typespackage by default. ThewhichandMochaimports now use default imports (esModuleInterop)..eslintrc.jsonis replaced byeslint.config.mjs, keeping the same rules and ignores. typescript-eslint v8 removed@typescript-eslint/semi, so that rule is now@stylistic/semi. Thelintscript no longer passes--ext ts, which flat config doesn't support..vscodeignorenow excludes the new config file.src/test/suite/index.tsuses glob 13's promise API. mocha 12 is ESM-only, so the runner loads it with a dynamicimport().whichandisexe, both CommonJS. The packaged vsix is 33 files / ~36 KB.Security
serialize-javascript7.1.1 (low). The lockfile now resolves 7.1.4 through mocha 12.resolutionsblock forcedminimatch@3,brace-expansion@1and others across all versions. That would break glob 13, so I removed it. The lockfile was regenerated from scratch with yarn 1.22.22, andyarn auditreports 0 vulnerabilities..github/workflows/vscode-ext-release.yamlneeds no changes.Test plan
yarn install(yarn 1.22.22, Node 24): regeneratedyarn.lockyarn audit: 0 vulnerabilitiesyarn run compile(tsc 6.0.3): no errorsyarn run lint(eslint 10): no warnings. Also checked against a scratch file that@stylistic/semi,eqeqeq,curlyandno-throw-literalstill report.@vscode/test-electronagainst the latest stable VS Code (1.143.1): 1 passing. I had to pass a shorter--user-data-dirlocally because the worktree path made the IPC socket path too long.fetchandFormDataexist, andFormDataproduces amultipart/form-data; boundary=...content type. The compiledout/openinvscode.jsloads.which('ls', {nothrow: true})resolves to a path and a missing command returnsnull. A realfetch('https://releases.jetify.com/devbox')returns 200.vsce@2.15.0 package --yarn, and also with@vscode/vsce@latest package --yarn. Both succeed, and the vsix contains onlyout/, assets andwhich/isexe.POSTtoapi.devbox.shand the open-in-VS-Code remote flow were not exercised end to end.Note: mocha 12 needs
require(esm)internally, so the test suite runs on recent VS Code (the default target foryarn test) but not on VS Code 1.90 itself. The shipped extension doesn't include mocha, so this doesn't affect users.🤖 Generated with Claude Code