diff --git a/bootstrap/common/sync_third_party.sh b/bootstrap/common/sync_third_party.sh index 9234267..d3ee079 100644 --- a/bootstrap/common/sync_third_party.sh +++ b/bootstrap/common/sync_third_party.sh @@ -19,14 +19,14 @@ function sync_node() { local target_path="./third_party/node" - local base_url="https://nodejs.org/dist/v8.4.0" + local base_url="https://nodejs.org/dist/v8.9.1" case $(get_platform_name) in - windows_x86) local target_url="/node-v8.4.0-win-x86.zip" ;; - windows_x86_64) local target_url="/node-v8.4.0-win-x64.zip" ;; - linux_x86) local target_url="/node-v8.4.0-linux-x86.tar.gz" ;; - linux_x86_64) local target_url="/node-v8.4.0-linux-x64.tar.gz" ;; - darwin_x86_64) local target_url="/node-v8.4.0-darwin-x64.tar.gz" ;; + windows_x86) local target_url="/node-v8.9.1-win-x86.zip" ;; + windows_x86_64) local target_url="/node-v8.9.1-win-x64.zip" ;; + linux_x86) local target_url="/node-v8.9.1-linux-x86.tar.gz" ;; + linux_x86_64) local target_url="/node-v8.9.1-linux-x64.tar.gz" ;; + darwin_x86_64) local target_url="/node-v8.9.1-darwin-x64.tar.gz" ;; esac sync_third_party $base_url$target_url $target_path diff --git a/package.json b/package.json index 2564c4f..3f3111c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "electron-rebuild": "^1.6.0", "jest": "^21.2.1", "mkdirp": "^0.5.1", - "node-addon-api": "^0.6.3", + "node-addon-api": "^1.0.0", "node-gyp": "^3.6.2", "nunjucks": "^3.0.1", "ts-jest": "^21.1.0", diff --git a/template/bacardi_cpp.njk b/template/bacardi_cpp.njk index 7a5650e..e2afd17 100644 --- a/template/bacardi_cpp.njk +++ b/template/bacardi_cpp.njk @@ -23,10 +23,11 @@ #include "{{interface.idl_dir_name}}/{{interface.name | snakecase}}_bridge.h" {% endfor %} -void Init(Napi::Env env, Napi::Object exports, Napi::Object module) { +Napi::Object Init(Napi::Env env, Napi::Object exports) { {% for interface in interfaces %} {{interface.name}}Bridge::Init(env, exports); {% endfor %} + return exports; } NODE_API_MODULE(bacardi, Init);