Skip to content

Commit 5252a6b

Browse files
maletormaxbrunsfeld
authored andcommitted
package.json: expand to include electron 4.0.4 (#108)
* package.json: expand to include electron 4.0.4 https://github.com/lgeiger/node-abi/blob/master/index.js#L71 rubyide/vscode-ruby#486 * Prebuild electron 4, 4.0.4, and 5 * ⬆️ tree-sitter-cli
1 parent f98f435 commit 5252a6b

File tree

5 files changed

+237403
-230261
lines changed

5 files changed

+237403
-230261
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
},
1616
"devDependencies": {
1717
"prebuild": "^7.6.0",
18-
"tree-sitter-cli": "^0.15.3",
18+
"tree-sitter-cli": "^0.15.5",
1919
"tree-sitter-highlight-schema": "^0.1.3"
2020
},
2121
"scripts": {
2222
"install": "prebuild-install || node-gyp rebuild",
23-
"prebuild": "prebuild -r electron -t 1.8.0 -t 2.0.0 -t 3.0.0 -t 4.0.0 --strip && prebuild -t 8.16.0 -t 10.12.0 --strip",
23+
"prebuild": "prebuild -r electron -t 4.0.0 -t 4.0.4 -t 5.0.0 --strip && prebuild -t 8.16.0 -t 10.12.0 --strip",
2424
"prebuild:upload": "prebuild --upload-all",
2525
"test": "tree-sitter test && script/parse-examples",
2626
"test-windows": "tree-sitter test"

src/binding.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ namespace {
1010

1111
NAN_METHOD(New) {}
1212

13-
void Init(Handle<Object> exports, Handle<Object> module) {
13+
void Init(Local<Object> exports, Local<Object> module) {
1414
Local<FunctionTemplate> tpl = Nan::New<FunctionTemplate>(New);
1515
tpl->SetClassName(Nan::New("Language").ToLocalChecked());
1616
tpl->InstanceTemplate()->SetInternalFieldCount(1);
1717

18-
Local<Function> constructor = tpl->GetFunction();
18+
Local<Function> constructor = Nan::GetFunction(tpl).ToLocalChecked();
1919
Local<Object> instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked();
2020
Nan::SetInternalFieldPointer(instance, 0, tree_sitter_ruby());
2121

22-
instance->Set(Nan::New("name").ToLocalChecked(), Nan::New("ruby").ToLocalChecked());
23-
module->Set(Nan::New("exports").ToLocalChecked(), instance);
22+
Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("ruby").ToLocalChecked());
23+
Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance);
2424
}
2525

2626
NODE_MODULE(tree_sitter_ruby_binding, Init)

0 commit comments

Comments
 (0)