Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to [email protected] #19

Merged
merged 1 commit into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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