Conversation
tree-sitter-solidity@1.2.13 misspells its optional-peer metadata key as
`tree_sitter`, so npm reads `tree-sitter` as a *required* peer, installs the
native binding, and compiles it from source — which fails against Node >= 23
V8 headers ("C++20 or later required"). That broke `npm install -g
@0xsequence/codegenie` and the GitHub Action for every consumer as soon as
0.5.0 added the Solidity grammar. pnpm hid it locally: pnpm-workspace.yaml
already ignores the missing peer and denies those builds, and the consumer
test ran under that same policy, so the npm path was never exercised.
codegenie parses through web-tree-sitter and needs only the published WASM, so
the grammar packages become devDependencies and the build vendors their WASM
into bundled-grammars/. Every installed dependency is now pure JavaScript.
- scripts/copy-grammars.mjs vendors the 7 grammars at build time
- tree-sitter-service resolves the bundled copy, falling back to the
devDependency so a fresh checkout parses before its first build
- new test walks the prod closure and fails on any native install hook,
binding.gyp, or peer that npm would treat as required
- new test pins every documented action tag to the package version
Verified with a real `npm install -g` on Node 26 with scripts enabled: 119
packages in 4s, no ERESOLVE, no node-gyp, and all 7 grammars parse from the
installed package.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
codegenie reviewNo credible findings. CoverageReviewed 20/25 hunks.
Needs Human Attention
StatsModel: anthropic claude-opus-5 high No FindingsNo credible findings were found. |
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.
tree-sitter-solidity@1.2.13 misspells its optional-peer metadata key as
tree_sitter, so npm readstree-sitteras a required peer, installs the native binding, and compiles it from source — which fails against Node >= 23 V8 headers ("C++20 or later required"). That brokenpm install -g @0xsequence/codegenieand the GitHub Action for every consumer as soon as 0.5.0 added the Solidity grammar. pnpm hid it locally: pnpm-workspace.yaml already ignores the missing peer and denies those builds, and the consumer test ran under that same policy, so the npm path was never exercised.codegenie parses through web-tree-sitter and needs only the published WASM, so the grammar packages become devDependencies and the build vendors their WASM into bundled-grammars/. Every installed dependency is now pure JavaScript.
Verified with a real
npm install -gon Node 26 with scripts enabled: 119 packages in 4s, no ERESOLVE, no node-gyp, and all 7 grammars parse from the installed package.