Repository navigation
Ship @vscode/diff in the web and server node_modules - #347381
Merged
Merged
Conversation
The diff editor loads @vscode/diff at runtime from node_modules (externalLinesDiffComputer.ts), like tree-sitter-wasm. Web and server builds only ship the dependencies of remote/web/package.json and remote/package.json, so on vscode.dev, Codespaces and the server the package failed to load and the built-in algorithm was used instead. Co-authored-by: Copilot <[email protected]>
Federico Brancasi (federicobrancasi)
approved these changes
Nov 10, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the runtime dependency update, though web and server builds were not validated locally.
No open issues 🎉
1 file not reviewed
remote/pnpm-lock.yaml: Generated file
What changed in this PR
Adds @vscode/diff to the web and server runtime dependencies so the external diff backends can load instead of falling back to the built-in algorithm because the package is missing.
Changes:
- Adds version
0.0.2-128to both dependency manifests, matching the root manifest. - Updates the remote lockfile with both importer entries and the package resolution.
No actionable findings remain. Web and server build validation was not run locally, as noted in the PR description.
| File | Description |
|---|---|
remote/web/package.json |
Includes @vscode/diff in web runtime dependencies. |
remote/pnpm-lock.yaml |
Locks the package for both remote and web dependencies. |
remote/package.json |
Includes @vscode/diff in server runtime dependencies. |
Review effort: Balanced
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.
The diff editor loads
@vscode/diffat runtime fromnode_modules(externalLinesDiffComputer.ts, viaresolveAmdNodeModulePath), like@vscode/tree-sitter-wasmandvscode-oniguruma, so the bundler leaves it alone and the package can load its.wasmnext to itself. Desktop ships the rootnode_modules, but web and server builds only ship the dependencies ofremote/web/package.jsonandremote/package.json, and@vscode/diffwas only in the rootpackage.json.So with
diffEditor.diffAlgorithmset toadvanced-externaloradvanced-wasm, the package fails to load on vscode.dev, Codespaces and the server, and the built-in algorithm is used instead (reported asfallback: errorindiffEditor.computeDiff, added in #346266).This adds
@vscode/diffat the root's version to both manifests and theremotelockfile. The hygiene check (checkPackageJSONinbuild/gulpfile.hygiene.ts) keeps the versions equal to the root's.Validation:
pnpm install --lockfile-only --frozen-lockfileinremote: passed (lockfile up to date, supply-chain policies pass). The lockfile entry has the same integrity as the root lockfile's.diffEditor.diffAlgorithmtoadvanced-wasmin a vscode.dev or server build of this PR and open a diff; it should no longer log a fallback.