Repository navigation
Revert "feat: restore asar for node_modules" - #324875
Conversation
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
TylerLeonhardtMatched files:
|
There was a problem hiding this comment.
Pull request overview
This PR reverts the recently merged "feat: restore asar for node_modules" (#324084), returning VS Code to the pre-asar state where node_modules ships unpacked as a plain directory rather than bundled into a node_modules.asar archive. ASAR remains gated off behind the long-standing canASAR = false (TODO@esm) flag. The change re-simplifies module/native-binary path resolution across the workbench, agent host, Copilot extension, and the build/packaging pipeline so everything resolves from plain node_modules again.
Changes:
- Restores
canASAR = falsegating inamdX.tsand removes the ESM/CJS ASAR resolution hooks inbootstrap-esm.ts/bootstrap-node.ts(keeping only thefs→original-fsmapping). - Reverts native-binary and CLI path resolution (ripgrep, node-pty, MXC sandbox, tree-sitter wasm, Copilot CLI) back to plain
node_modules, dropping thenativeModulesDir/appNodeModulesindirection and their tests. - Reverts build packaging: removes the MXC exclude filter, restores the original
createAsarunpack/duplicate lists, drops the universal-app MXC cross-copy/singleArchFiles, and removes the_manifestmodule-ignore rule.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/amdX.ts |
Restores canASAR flag, simplifies _nodeJSLoadScript to import('fs'/'vm'/'module'), and gates useASAR on canASAR && isBuilt && !isWeb. |
src/vs/base/common/platform.ts |
Removes the now-unused hasElectronUserAgent export. |
src/bootstrap-esm.ts |
Removes the ESM ASAR resolution hook, keeping only fs→original-fs; reorders globals after the register block. |
src/bootstrap-node.ts |
Removes the CommonJS enableASARSupport splice of node_modules.asar into lookup paths. |
src/vs/code/electron-browser/workbench/workbench.ts |
Drops the _VSCODE_PRODUCT_JSON global (product comes from sandbox config). |
src/vs/sessions/electron-browser/sessions.ts |
Drops the _VSCODE_PRODUCT_JSON global (sessions window). |
src/vs/platform/webWorker/browser/webWorkerServiceImpl.ts |
Removes _VSCODE_PRODUCT_JSON from the worker bootstrap. |
src/vs/platform/sandbox/common/terminalSandboxEngine.ts |
Removes the nativeModulesDir field and its use for rg/mxc paths. |
src/vs/platform/sandbox/common/terminalSandboxMxcRuntime.ts |
Drops nativeModulesDir param; resolves MXC exec from node_modules. |
src/vs/platform/agentHost/node/copilot/copilotAgent.ts |
Resolves node_modules relative to out/ instead of the ASAR-unpacked path. |
src/vs/platform/agentHost/node/copilot/agentHostSandboxEngine.ts |
Removes nativeModulesDir from runtime info. |
src/vs/platform/agentHost/node/commandAutoApprover.ts |
Resolves tree-sitter wasm from plain node_modules. |
src/vs/workbench/services/treeSitter/browser/treeSitterLibraryService.ts |
Gates module location on canASAR; drops isWeb import. |
src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts |
Gates the onig.wasm ASAR path on canASAR. |
src/vs/workbench/services/textMate/browser/backgroundTokenization/threadedBackgroundTokenizerFactory.ts |
Gates oniguruma ASAR selection on canASAR. |
src/vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl.ts |
Gates the worker ASAR selection on canASAR. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts |
Drops nativeModulesDir from both remote and local runtime info. |
extensions/copilot/.../node/appNodeModules.ts |
Deletes the dual-root (node_modules/.asar.unpacked) resolver helper. |
extensions/copilot/.../node/test/appNodeModules.spec.ts |
Deletes the helper's tests. |
extensions/copilot/.../node/ripgrepShim.ts |
Resolves ripgrep from plain node_modules. |
extensions/copilot/.../node/nodePtyShim.ts |
Resolves node-pty from plain node_modules; drops multi-root probing. |
extensions/copilot/.../node/test/nodePtyShim.spec.ts |
Removes .asar.unpacked resolution tests. |
extensions/copilot/.../node/copilotCli.ts |
Sets MXC_BIN_DIR from plain node_modules. |
extensions/copilot/.../claude/node/claudeCodeAgent.ts |
Builds the ripgrep PATH from plain node_modules. |
build/gulpfile.vscode.ts |
Restores original createAsar unpack/duplicate lists; drops MXC exclude filter and unpacked shim dir. |
build/gulpfile.reh.ts |
Drops the MXC exclude filter from the REH package task. |
build/lib/copilot.ts |
Removes getMxcExcludeFilter and mxcArchitectures. |
build/lib/test/copilot.test.ts |
Removes the MXC exclude-filter tests. |
build/darwin/create-universal-app.ts |
Drops the MXC cross-copy loop and singleArchFiles allowlist. |
build/linux/dependencies-generator.ts |
Uses a local canAsar = false gate to scan plain node_modules. |
build/.moduleignore |
Removes the _manifest signing-artifacts ignore rule. |
For https://github.com/microsoft/vscode/actions/runs/28922640677/job/85803032055