Skip to content

Commit

Permalink
Use node 12 for building
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed May 1, 2019
1 parent 1e3d7e1 commit e3910d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
sudo: false

node_js:
- "11"
- "node"

os:
- linux
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image: Visual Studio 2017

environment:
NODEJS_VERSION: "11"
NODEJS_VERSION: "12"
PREBUILD_UPLOAD:
secure: /JesINEpGYP12bsjCPZEozyGOBGXj48nVKYqcS7kHO+aiL8+R/ko8vmh3mo5aQvw

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-sitter-elm",
"version": "2.2.2",
"version": "2.2.3",
"description": "Tree sitter definitions for elm",
"main": "index.js",
"keywords": [
Expand All @@ -15,7 +15,7 @@
},
"devDependencies": {
"prebuild": "^8.2.1",
"tree-sitter-cli": "^0.14.6"
"tree-sitter-cli": "^0.14.7"
},
"scripts": {
"build": "tree-sitter generate && node-gyp build --debug",
Expand Down
8 changes: 4 additions & 4 deletions src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ namespace {

NAN_METHOD(New) {}

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

Local<Function> constructor = tpl->GetFunction();
Local<Function> constructor = Nan::GetFunction(tpl).ToLocalChecked();
Local<Object> instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked();
Nan::SetInternalFieldPointer(instance, 0, tree_sitter_elm());

instance->Set(Nan::New("name").ToLocalChecked(), Nan::New("elm").ToLocalChecked());
module->Set(Nan::New("exports").ToLocalChecked(), instance);
Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("elm").ToLocalChecked());
Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance);
}

NODE_MODULE(tree_sitter_elm_binding, Init)
Expand Down

0 comments on commit e3910d5

Please sign in to comment.