-
-
Notifications
You must be signed in to change notification settings - Fork 148
Support Node 19 and 20 #127
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
Changes from 7 commits
45f2b88
74ca3b3
df27b82
4cece9f
ca59027
d9c50a7
6981496
1d0e677
1af94ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,21 +15,27 @@ | |
| "main": "index.js", | ||
| "types": "tree-sitter.d.ts", | ||
| "dependencies": { | ||
| "nan": "^2.14.0", | ||
| "prebuild-install": "^6.0.1" | ||
| "nan": "^2.17.0", | ||
| "prebuild-install": "^7.1.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^14.14.31", | ||
| "chai": "^4.3.3", | ||
| "mocha": "^8.3.1", | ||
| "prebuild": "^10.0.1", | ||
| "superstring": "^2.4.2", | ||
| "@types/node": "^18.14.6", | ||
| "chai": "^4.3.7", | ||
| "mocha": "^10.2.0", | ||
| "node-gyp": "9.3.1", | ||
| "prebuild": "^11.0.4", | ||
| "superstring": "https://github.com/pulsar-edit/superstring#node-api-upgrade", | ||
|
||
| "tree-sitter-javascript": "https://github.com/tree-sitter/tree-sitter-javascript.git#master" | ||
| }, | ||
| "overrides": { | ||
| "prebuild": { | ||
| "node-gyp": "$node-gyp" | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "install": "prebuild-install || node-gyp rebuild", | ||
| "build": "node-gyp build", | ||
| "prebuild": "prebuild -r electron -t 3.0.0 -t 4.0.0 -t 4.0.4 -t 5.0.0 --strip && prebuild -t 10.12.0 -t 12.13.0 --strip", | ||
| "prebuild": "prebuild -r electron -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 --strip && prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 --strip", | ||
| "prebuild:upload": "prebuild --upload-all", | ||
| "test": "mocha" | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ void InitConversions(Local<Object> exports) { | |
| v8::Local<v8::Object> bufferView; | ||
| bufferView = node::Buffer::New(Isolate::GetCurrent(), point_transfer_buffer, 0, 2 * sizeof(uint32_t)).ToLocalChecked(); | ||
| auto js_point_transfer_buffer = node::Buffer::Data(bufferView); | ||
| #elif V8_MAJOR_VERSION >= 8 | ||
| #elif (V8_MAJOR_VERSION > 8 || (V8_MAJOR_VERSION == 8 && V8_MINOR_VERION > 3)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Introduced in 8.3.9 v8/v8@5cf02f0 |
||
| auto backing_store = ArrayBuffer::NewBackingStore(point_transfer_buffer, 2 * sizeof(uint32_t), BackingStore::EmptyDeleter, nullptr); | ||
| auto js_point_transfer_buffer = ArrayBuffer::New(Isolate::GetCurrent(), std::move(backing_store)); | ||
| #else | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,7 +196,7 @@ void Tree::GetEditedRange(const Nan::FunctionCallbackInfo<Value> &info) { | |
|
|
||
| void Tree::PrintDotGraph(const Nan::FunctionCallbackInfo<Value> &info) { | ||
| Tree *tree = ObjectWrap::Unwrap<Tree>(info.This()); | ||
| ts_tree_print_dot_graph(tree->tree_, stderr); | ||
| ts_tree_print_dot_graph(tree->tree_, 2); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This happens because of updating vendor/tree-sitter: introduced in tree-sitter/tree-sitter@97fd990 |
||
| info.GetReturnValue().Set(info.This()); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't strictly necessary but it lets you run the project with Python 3.11
See prebuild/prebuild#286 (comment)