diff --git a/cli/src/init.rs b/cli/src/init.rs index c6ce2746..092aba56 100644 --- a/cli/src/init.rs +++ b/cli/src/init.rs @@ -75,7 +75,7 @@ const BINDING_GYP_TEMPLATE: &str = include_str!("./templates/binding.gyp"); const BINDING_TEST_JS_TEMPLATE: &str = include_str!("./templates/binding_test.js"); const MAKEFILE_TEMPLATE: &str = include_str!("./templates/makefile"); -const CMAKELISTS_TXT_TEMPLATE: &str = include_str!("./templates/cmakelists.txt"); +const CMAKELISTS_TXT_TEMPLATE: &str = include_str!("./templates/cmakelists.cmake"); const PARSER_NAME_H_TEMPLATE: &str = include_str!("./templates/PARSER_NAME.h"); const PARSER_NAME_PC_IN_TEMPLATE: &str = include_str!("./templates/PARSER_NAME.pc.in"); diff --git a/cli/src/templates/binding_test.js b/cli/src/templates/binding_test.js index afede30a..55becacf 100644 --- a/cli/src/templates/binding_test.js +++ b/cli/src/templates/binding_test.js @@ -1,9 +1,9 @@ -/// - const assert = require("node:assert"); const { test } = require("node:test"); +const Parser = require("tree-sitter"); + test("can load grammar", () => { - const parser = new (require("tree-sitter"))(); + const parser = new Parser(); assert.doesNotThrow(() => parser.setLanguage(require("."))); }); diff --git a/cli/src/templates/cmakelists.txt b/cli/src/templates/cmakelists.cmake similarity index 99% rename from cli/src/templates/cmakelists.txt rename to cli/src/templates/cmakelists.cmake index 24f2507d..2c241e62 100644 --- a/cli/src/templates/cmakelists.txt +++ b/cli/src/templates/cmakelists.cmake @@ -56,5 +56,3 @@ install(TARGETS tree-sitter-PARSER_NAME add_custom_target(test "${TREE_SITTER_CLI}" test WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "tree-sitter test") - -# vim:ft=cmake: diff --git a/cli/src/templates/package.json b/cli/src/templates/package.json index 952f006e..aae7cbcb 100644 --- a/cli/src/templates/package.json +++ b/cli/src/templates/package.json @@ -27,7 +27,7 @@ "*.wasm" ], "dependencies": { - "node-addon-api": "^8.1.0", + "node-addon-api": "^8.2.1", "node-gyp-build": "^4.8.2" }, "devDependencies": { diff --git a/cli/src/templates/pyproject.toml b/cli/src/templates/pyproject.toml index 4df75f74..e0db4e21 100644 --- a/cli/src/templates/pyproject.toml +++ b/cli/src/templates/pyproject.toml @@ -9,7 +9,6 @@ version = "PARSER_VERSION" keywords = ["incremental", "parsing", "tree-sitter", "PARSER_NAME"] classifiers = [ "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Compilers", "Topic :: Text Processing :: Linguistic", "Typing :: Typed",