feat(node): update bindings when necessary

This commit is contained in:
Amaan Qureshi 2024-11-09 21:52:03 -05:00
parent 134233f33a
commit ac4595e808
2 changed files with 13 additions and 4 deletions

View file

@ -3,7 +3,7 @@ const root = require("path").join(__dirname, "..", "..");
module.exports =
typeof process.versions.bun === "string"
// Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time
? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-typescript.node`)
? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-PARSER_NAME.node`)
: require("node-gyp-build")(root);
try {