Closed srghma closed 1 month ago
probably require("./index.cjs")
but now I have an error https://github.com/kayhide/tree-sitter-idris/pull/3#issuecomment-2434307473
and the configs of idris and haskell are identical
ES6 is not supported, we cannot use it since we cannot declare the package as a module, and we cannot use it in standalone file mode until node 18 is EOL.
does it mean that it will become feasible to rewrite tree-sitter-haskell to es6 using .mjs
extension at 30 Apr 2025?
Yes.
AFAIK its possible to rewrite generator.js on es6 and use
import/export
to improve type safetyI did it in https://github.com/postsolar/tree-sitter-purescript/pull/23 and in https://github.com/kayhide/tree-sitter-idris/pull/3
but I dont know that to replace
require('.')
https://github.com/tree-sitter/tree-sitter-haskell/blob/70ea0757986ea58a0d39ddfcd9d791beadeb0f43/bindings/node/binding_test.js#L8
with