Skip to content

Conversation

daivinhtran
Copy link
Contributor

@daivinhtran daivinhtran commented Sep 25, 2025

It's a common practice example to export the wasm file to its rdeps.

My goal is to integrate tree-sitter-gritql parser into the Biome VSCode extension (source: biomejs/biome-vscode#795). The existing node binding doesn't work well on Electron evironment for VSCode extension.

Source: https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web#basic-usage

Related issue: #28. We'll need to publish an npm package with the wasm file in order for the wasm binding to fully work.

"queries/*",
"src/**"
"src/**",
"*.wasm"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is anything besides the wasm file actually valuable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the VSCode extension (daivinhtran/biome-vscode#1), we don't need anything other than the wasm file. But I can't really speak for other use cases.

For example, the node binding is built and installed on node_modules/tree-sitter-gritql/prebuilds/darwin-arm64/tree-sitter-gritql.node during an npm install. If we remove prebuilts/** from this list, it excludes the node binding.

These are other examples we can use as guidance:
https://github.com/tree-sitter/tree-sitter-python/blob/26855eabccb19c6abf499fbc5b8dc7cc9ab8bc64/package.json#L26-L33
https://github.com/tree-sitter/tree-sitter-javascript/blob/58404d8cf191d69f2674a8fd507bd5776f46cb11/package.json#L26-L33

"parse": "tree-sitter parse",
"test": "tree-sitter test",
"wasm": "tree-sitter build-wasm",
"wasm": "tree-sitter build --wasm",
Copy link
Contributor Author

@daivinhtran daivinhtran Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the full history of why these scripts are written as they are. Some of them are redundant or incorrect.

I think we can simplify them to be similar to https://github.com/tree-sitter/tree-sitter-javascript/blob/58404d8cf191d69f2674a8fd507bd5776f46cb11/package.json#L54-L58 or any other official tree-sitter grammar repo.

But that's irrelevant and out-of-scope for this PR. We can address it separately.

@daivinhtran daivinhtran marked this pull request as ready for review September 27, 2025 15:40
@daivinhtran daivinhtran requested a review from morgante October 2, 2025 05:17
@morgante morgante merged commit b8f0b98 into honeycombio:main Oct 8, 2025
6 checks passed
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.

2 participants