This directory contains workspace packages that replace native/heavy dependencies pulled in by code-server and VS Code with lean pure-JS or prebuilt alternatives. They are wired in via pnpm.overrides in the root package.json, so even nested dependencies resolve to these local stubs.
vsda/— JS stub forvsda(VS Device Auth native module).github-copilot/— Shim for@github/copilot, dropping its native clipboard/auth binaries (previously ~77% of total native binary size).github-copilot-sdk/— Shim for@github/copilot-sdk.node-pty/— Replacesnode-ptywithzigpty, a Zig-based PTY with prebuilt binaries for all major platforms.spdlog/— No-op JS shim for@vscode/spdlog(native C++ logger), replaced with a simple JS logger.vscode-deviceid/— Pure JS shim for@vscode/deviceid(native C++ Windows registry addon for device ID). Uses Node.js built-incrypto.randomUUID()and filesystem storage — no native binaries needed.vscode-fs-copyfile/— JS shim for@vscode/fs-copyfile(native macOS APFSfclonefileataddon, required by the bundledgitextension). Delegates to Node's built-infs.copyFile/fs.cp. Bundledrequirein the git extension'sdist/main.js, undeclared upstream.vscode-native-watchdog/— No-op JS shim for@vscode/native-watchdog(native C++ parent-pid liveness monitor for the extension host). Orphan cleanup is left to the process supervisor and IPC channel close.vscode-ripgrep/— Replaces@vscode/ripgrep(downloads platform-specific ripgrep binary at postinstall) withripgrep, a WebAssembly-based ripgrep that works across all platforms without native binaries.parcel-watcher/— Replaces@parcel/watcher(native C++ file watcher with node-gyp) with Node.js built-infs.watch(recursive mode). Trades snapshot/history features for zero native binaries.fsevents/— No-op shim forfsevents(macOS-only native FSEvents binding). Consumers already fall back tofs.watch/polling when unavailable.windows-process-tree/— Replaces@vscode/windows-process-tree(Windows-only native addon) with cross-platform process inspection usingps(Unix) /wmic(Windows).vscode-windows-registry/— Stub for@vscode/windows-registry(native C++ registry addon with unbuiltbinding.gyp). Only used by VS Code's telemetry/machine-id code (GetStringRegKey("HKEY_LOCAL_MACHINE", …, "MachineId")); callers already handle errors and fall back to defaults.argon2/— Replacesargon2(native C binding) with Node.jscrypto.scrypt. Encodes/decodes PHC-format hashes for compatibility with existing stored passwords.vscode-proxy-agent/— No-op shim for@vscode/proxy-agent(proxy resolver with heavy deps:undici,socks-proxy-agent,http-proxy-agent, etc.). Passes through Node.js nativehttp/https/net/tlsunmodified. Users behind a proxy can rely onHTTP_PROXY/HTTPS_PROXYenv vars.1ds-core-js/— No-op shim for@microsoft/1ds-core-js(Microsoft 1DS telemetry core). Silently drops all telemetry events. Also eliminates transitive deps:@microsoft/applicationinsights-core-js,@microsoft/dynamicproto-js,@microsoft/applicationinsights-shims.1ds-post-js/— No-op shim for@microsoft/1ds-post-js(Microsoft 1DS telemetry transport). Silently drops all telemetry posts.kerberos/— Shim forkerberos(native GSSAPI/SSPI binding vianode-gyp, used by VS Code's built-in Negotiate proxy authentication). Loaded via dynamicimport("kerberos")fromserver-main.js/extensionHostProcess.js; since@vscode/proxy-agentis itself a no-op shim, this path is effectively dead. The shim throws frominitializeClientso callers surface a clear error instead of a malformed token. Users behind a proxy should setHTTP_PROXY/HTTPS_PROXY.
Additionally, coderaft uses a minimal Node.js http server instead of the Express-based stack from upstream coder/code-server (dropping express, compression, cookie-parser, http-proxy, httpolyglot, qs, and friends), cutting startup time and dependency weight.
The mappings configured in root package.json:
| Package | Override |
|---|---|
vsda |
shims/vsda/ |
@github/copilot |
shims/github-copilot/ |
@github/copilot-sdk |
shims/github-copilot-sdk/ |
node-pty |
shims/node-pty/ |
@vscode/spdlog |
shims/spdlog/ |
@vscode/fs-copyfile |
shims/vscode-fs-copyfile/ |
@vscode/deviceid |
shims/vscode-deviceid/ |
@vscode/native-watchdog |
shims/vscode-native-watchdog/ |
@vscode/ripgrep |
shims/vscode-ripgrep/ |
@parcel/watcher |
shims/parcel-watcher/ |
fsevents |
shims/fsevents/ |
@vscode/windows-process-tree |
shims/windows-process-tree/ |
@vscode/windows-registry |
shims/vscode-windows-registry/ |
argon2 |
shims/argon2/ |
@vscode/proxy-agent |
shims/vscode-proxy-agent/ |
@microsoft/1ds-core-js |
shims/1ds-core-js/ |
@microsoft/1ds-post-js |
shims/1ds-post-js/ |
kerberos |
shims/kerberos/ |
The sync-deps script does not need special handling for these — overrides work at the pnpm resolution level.
Remaining .node binaries in lib/node_modules (after shimming):
| Package | Size | Arch | Build Type |
|---|---|---|---|
zigpty (replaces node-pty) |
~220K | linux/darwin/win32 x x64/arm64 | prebuilds |
ms-vscode.js-debug (ext) |
~460K | win32-x64 + win32-arm64 | bundled |
microsoft-authentication (ext) |
~400K | linux-x64 only | bundled |
All other native packages (@github/copilot, @vscode/spdlog, @vscode/native-watchdog, @vscode/windows-process-tree, @vscode/windows-registry, @vscode/deviceid, @parcel/watcher, fsevents, argon2, kerberos) are fully shimmed with zero native binaries.
zigptyships prebuilds for 8 platform/arch combinations; only one is used at runtimems-vscode.js-debugandmicrosoft-authenticationare VS Code bundled extensions with platform-specific binaries that cannot be shimmed