Skip to content

fix tree-sitter install on node 24#27

Open
qingliaowu wants to merge 1 commit into
salesforce:mainfrom
qingliaowu:fix/tree-sitter-node24-install
Open

fix tree-sitter install on node 24#27
qingliaowu wants to merge 1 commit into
salesforce:mainfrom
qingliaowu:fix/tree-sitter-node24-install

Conversation

@qingliaowu
Copy link
Copy Markdown

What

  • Adds a pnpm patch for tree-sitter@0.25.0 so its native binding builds with C++20 instead of C++17.
  • Records the patched dependency in the lockfile.
  • Adds a Node 24 install CI job to cover the reported install regression.

Why

Fixes #7.

Node 24 V8 headers require C++20, but tree-sitter@0.25.0 forces C++17 in binding.gyp. That makes pnpm install fail when the native binding compiles under Node 24.

How

The pnpm patch updates the upstream package build flags for Unix, macOS/Xcode, and Windows/MSVC to C++20. The new CI job runs pnpm install --frozen-lockfile on Node 24 so the install path is checked directly.

Test Plan

  • corepack pnpm install --frozen-lockfile on Node v24.10.0 without CXXFLAGS
  • corepack pnpm rebuild tree-sitter on Node v24.10.0 without CXXFLAGS
  • node --test packages/parser-tree-sitter/bindings/node/*_test.js
  • corepack pnpm --filter @agentscript/parser test
  • corepack pnpm exec prettier --check .github/workflows/ci.yml package.json pnpm-lock.yaml
  • corepack pnpm --filter @agentscript/parser-tree-sitter test (local machine is missing the external tree-sitter CLI; its Node binding subtest passed)

Checklist

  • My code follows the project's coding style
  • I have reviewed my own diff
  • I have added/updated documentation as needed
  • This change does not introduce new warnings

@qingliaowu qingliaowu marked this pull request as ready for review May 6, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] tree-sitter@0.25.0 fails to build with Node.js 24 - C++20 required but not set

1 participant