Skip to content

Commit

Permalink
feat: upgrade to [email protected] (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatyang authored Mar 14, 2021
1 parent ab0ce67 commit 32689b6
Show file tree
Hide file tree
Showing 12 changed files with 16,754 additions and 16,246 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/build
/node_modules

/bindings/rust
/Cargo.toml
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "tree-sitter"]
path = tree-sitter
url = https://github.com/ikatyang/tree-sitter
branch = 0.16.7-custom
branch = 0.19.3-custom
[submodule "yaml-test-suite"]
path = yaml-test-suite
url = https://github.com/yaml/yaml-test-suite
Expand Down
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"src"
],
"sources": [
"src/binding.cc",
"bindings/node/binding.cc",
"src/parser.c",
"src/scanner.cc",
],
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions bindings/node/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
try {
module.exports = require("../../build/Release/tree_sitter_yaml_binding");
} catch (error1) {
if (error1.code !== 'MODULE_NOT_FOUND') {
throw error1;
}
try {
module.exports = require("../../build/Debug/tree_sitter_yaml_binding");
} catch (error2) {
if (error2.code !== 'MODULE_NOT_FOUND') {
throw error2;
}
throw error1
}
}

try {
module.exports.nodeTypeInfo = require("../../src/node-types.json");
} catch (_) {}
13 changes: 0 additions & 13 deletions index.js

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"parser",
"lexer"
],
"main": "index.js",
"main": "bindings/node",
"repository": "https://github.com/ikatyang/tree-sitter-yaml",
"homepage": "https://github.com/ikatyang/tree-sitter-yaml#readme",
"author": {
Expand Down Expand Up @@ -37,8 +37,7 @@
},
"files": [
"/src/",
"/binding.gyp",
"/grammar.js",
"/index.js"
"/bindings/node/",
"/grammar.js"
]
}
1 change: 1 addition & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 32689b6

Please sign in to comment.