-
-
Notifications
You must be signed in to change notification settings - Fork 147
Make code compilable on Node 19 #134
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 all commits
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 |
|---|---|---|
|
|
@@ -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. This change is not related to Node 19, but I couldn't resist including it. This version check is more correct and I noticed this issue because (if I recall correctly) I was prebuilding node-tree-sitter for some older Electron version which has V8 version 8.0 8.1 or 8.2 and it failed on this line. |
||
| 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 | ||
|
|
||
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.
newer versions of tree-sitter-javascript fail with an "incompatible language version 14" error. In #127 I upgrade tree-sitter instead.