fix: install git extension fs-copyfile dependency#7815
Open
cyphercodes wants to merge 1 commit into
Open
Conversation
a8fc57c to
d56e797
Compare
code-asher
reviewed
May 26, 2026
Member
code-asher
left a comment
There was a problem hiding this comment.
Awesome thank you for the PR!
I have a few worries, mainly that if the VS Code team ever adds new dependencies, or removes this one, or adds extensions with conflicting dependencies, we will probably not notice those until the npm module breaks again. And also since we are not referencing the extension's lockfile we might install a different version leading to subtly different behavior between the GitHub and npm releases.
There are a few ways we could resolve these issues, but what do you think about this strategy:
- Patch
lib/vscode/build/lib/extensions.tsto emit the external modules in the package.json's dependencies. I think probably the easiest way to do this is to returnpackagedDependenciesfromfromLocalEsbuild(in addition to the stream), and then infromLocalwe setdata.dependencies = packagedDependencies. - Before we rsync the build, walk through each extension and generate a shrinkwrap for every extension with
node_modules(or we could also do it as part of the same patch toextensions.ts, just would need to figure out the gulp syntax to do that). - Modify our postinstall to walk through each extension and install if necessary (I think the VS Code postinstall used to do this, if it still does we can skip this step).
So each extension with external dependencies will have their own shrinkwrap with its unique dependencies which should make the npm install match the GitHub release perfectly.
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.
Fixes #7806
Summary
@vscode/fs-copyfileruntime dependency into the sharedlib/vscode/extensionsinstall manifest used by code-server's npm postinstall.@vscode/fs-copyfiledeterministically without mutating the VS Code submodule package files.Test plan
./ci/dev/lint-scripts.shnpm run test:scripts@vscode/fs-copyfile, installed production dependencies, and verifiedrequire.resolve("@vscode/fs-copyfile", { paths: ["<tmp>/git/dist"] })resolves fromextensions/node_modules.git diff --check HEAD~1..HEAD