feat!: update bindings

This commit is contained in:
ObserverOfTime
2025-05-09 10:06:33 +03:00
committed by Michael Hoffmann
parent 41a2e70241
commit 8b209bbb95
23 changed files with 337 additions and 114 deletions

View File

@@ -1,7 +1,11 @@
const root = require("path").join(__dirname, "..", "..");
module.exports = require("node-gyp-build")(root);
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-hcl.node`)
: require("node-gyp-build")(root);
try {
module.exports.nodeTypeInfo = require("../../src/node-types.json");
} catch (_) {}
} catch (_) {}