Skip to content

fix: reduce VSIX size and align Node runtime support - #326

Merged
joesobo merged 15 commits into
mainfrom
codex/reduce-vsix-size
Jul 30, 2026
Merged

fix: reduce VSIX size and align Node runtime support#326
joesobo merged 15 commits into
mainfrom
codex/reduce-vsix-size

Conversation

@joesobo

@joesobo joesobo commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the temporary Tree-sitter patch with upstream tree-sitter@0.25.1
  • bundle the extension host and stage only the runtime files for each requested VSIX target
  • stage one matching SQLite, Tree-sitter, esbuild, and Parcel watcher native package per target
  • exclude declarations, source maps, source-only documentation, tests, and unrelated workspace files
  • require Node >=22.14.0 consistently across Core, plugins, apps, examples, and fixtures, with no maximum version
  • remove repository Node pin files and make CI/release jobs use the current active LTS Node release
  • raise the VS Code minimum to 1.101.0, whose extension host uses Node 22
  • merge current main and preserve its Parcel watcher and VS Code test-host updates

User impact

VS Code extension users

  • Update VS Code to 1.101.0 or newer before installing this extension release.
  • You do not need to install or configure Node.js for the VS Code extension.
  • The target-specific extension package is approximately 85% smaller on disk.
  • Supported languages, built-in plugins, graph rendering, indexing, file watching, and native runtime capabilities remain available.

CLI, plugin, interface, and library users

  • Node 20 is no longer supported. Upgrade to Node 22.14.0 or newer before updating CodeGraphy packages.
  • There is no maximum supported Node version.
  • All first-party packages use the same minimum, including packages that depend on Core.

The changesets mark the Node minimum as a breaking change for Core, the plugin APIs, and affected CLI/plugin packages. The VS Code extension and non-API runtime packages receive minor releases.

Size

Artifact Installed or extracted size
Installed Marketplace 5.15.3 baseline 703,972 KiB
This PR's darwin-arm64 VSIX 101.01 MiB

The fresh darwin-arm64 VSIX is 20,419,209 bytes compressed, contains 105,915,940 unpacked bytes, and has 1,394 files. It contains no .d.ts or .map files.

The packaged README links its images and documentation to GitHub, so excluding the redundant docs/ copy does not remove Marketplace content.

Runtime contract

Tree-sitter 0.25.1 publishes a Node-API 10 prebuild. Node 22.14.0 is the first Node 22 release that supports Node-API 10, so >=22.14.0 is the clean minimum for the upstream dependency. Node 20 cannot load that prebuild without a custom rebuild, patch, or fallback.

All 20 first-party package manifests declare the same open-ended Node range. CI and release workflows use lts/*, so future active LTS releases are tested without repository pin-file updates.

Capability evidence

  • loaded SQLite, esbuild, Parcel watcher, Material Icon Theme, Tree-sitter, and all 19 Tree-sitter language bindings from the staged runtime
  • verified that the darwin-arm64 VSIX contains only matching Mach-O arm64 native binaries
  • installed the final VSIX into isolated VS Code 1.125.1
  • verified extension activation, all command registrations, and manual TypeScript graph indexing with 18 nodes and 26 edges
  • preserved all seven built-in plugin runtimes and their license files

Verification

  • pnpm install --frozen-lockfile
  • pnpm lint
  • pnpm typecheck
  • local unit run: 5,543 of 5,545 extension tests passed in the full parallel run; the two five-second timeouts passed on a focused rerun (16 of 16 tests)
  • exact-head CI unit shards: all passed
  • pnpm run test:release: 42 passed
  • Node 22.14.0: upstream Tree-sitter prebuild loaded
  • Node 24.18.0: frozen install, Core build, extension build, and 42 release tests passed
  • linux-x64, darwin-arm64, and win32-x64 VSIX and native-runtime CI checks passed
  • installed VSIX smoke: 3 passed
  • exact-head remote Playwright jobs passed
  • pnpm exec changeset status
  • git diff --check

No new package-content regression suite was added. Functional staging tests, target-native validation, exact-head CI, and the real installed-extension smoke test provide the capability checks.

Trello: Reduce VSIX installed size without capability loss

Trello: Remove temporary Tree-sitter Node 23 build patch

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fe54f6e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@codegraphy-dev/core Major
@codegraphy-dev/extension Minor
@codegraphy-dev/extension-plugin-api Major
@codegraphy-dev/graph-renderer Minor
@codegraphy-dev/plugin-api Major
@codegraphy-dev/plugin-godot Major
@codegraphy-dev/plugin-markdown Major
@codegraphy-dev/plugin-particles Minor
@codegraphy-dev/plugin-svelte Minor
@codegraphy-dev/plugin-typescript Major
@codegraphy-dev/plugin-unity Minor
@codegraphy-dev/plugin-vue Minor
@codegraphy-dev/tldraw Minor
@codegraphy/web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codegraphy Ready Ready Preview Jul 30, 2026 1:49am

@joesobo joesobo changed the title fix: reduce VSIX installed size by 85% fix: reduce VSIX size and align Node runtime support Jul 30, 2026
@joesobo
joesobo merged commit 95d9f2c into main Jul 30, 2026
38 checks passed
@joesobo
joesobo deleted the codex/reduce-vsix-size branch July 30, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant