diff --git a/.travis.yml b/.travis.yml index 4f2c682..16cf722 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ -sudo: false +sudo: true +dist: trusty language: node_js node_js: - - "8.11.1" + - "8.11.4" addons: @@ -20,7 +21,7 @@ before_install: export CXX="clang++-3.5"; export CC="clang-3.5"; fi; - - npm install -g npm@5.6.0 + - npm install -g npm@6.4.0 install: diff --git a/README.md b/README.md index 4efe989..dab0f4a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ This is a part of [Node3D](https://github.com/node-3d) project. ![Build Status](https://api.travis-ci.org/node-3d/addon-tools-raub.svg?branch=master) +> npm i -s addon-tools-raub + ## Synopsis @@ -15,7 +17,7 @@ Helpers for Node.js addons and dependency packages: * `EventEmitter` C++ implementation. * C++ macros and shortcuts. * Crossplatform commands for GYP: `cp`, `rm`, `mkdir`. -* Regarded platforms: win x32/x64, linux x32/x64, mac x64. +* Regarded platforms: win x32/x64, linux x64, mac x64. Useful links: [V8 Ref](https://v8.paulfryzel.com/docs/master/), [Nan Docs](https://github.com/nodejs/nan#api), @@ -136,7 +138,6 @@ would encourage you to abide by the following rules: * bin-win32 * bin-win64 - * bin-linux32 * bin-linux64 * bin-mac64 @@ -515,7 +516,7 @@ NAN_METHOD(test) { ... ``` -NOTE: The conversion from `Nan::Utf8String` to `std::string` (via `char *`) +> Note: The conversion from `Nan::Utf8String` to `std::string` (via `char *`) is possible with unary `*` operator. diff --git a/examples/deps/bin-linux32/.keep b/examples/deps/bin-linux32/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/index.js b/index.js index 3640ec9..5b34da5 100644 --- a/index.js +++ b/index.js @@ -18,8 +18,16 @@ const prefixName = name => `bin-${name}`; const getPlatformDir = platform => { switch (platform) { case 'win32' : return process.arch === 'x64' ? 'win64' : 'win32'; - case 'linux' : return process.arch === 'x64' ? 'linux64' : 'linux32'; - case 'darwin' : return 'mac64'; + case 'linux' : + if (process.arch === 'x32') { + throw new Error('Linux x32 not supported since 4.0.0.'); + } + return 'linux64'; + case 'darwin' : + if (process.arch === 'x32') { + throw new Error('Mac x32 not supported.'); + } + return 'mac64'; default : throw new Error(`Platform "${platform}" is not supported.`); } }; diff --git a/package.json b/package.json index f97b26c..e59372b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Luis Blanco ", "name": "addon-tools-raub", - "version": "3.0.0", + "version": "4.0.0", "description": "Helpers for Node.js addons and dependency packages", "license": "MIT", "main": "index.js", @@ -19,7 +19,7 @@ "gyp" ], "engines": { - "node": ">=8.11.2", + "node": ">=8.11.4", "npm": ">=5.6.0" }, "maintainers": [ @@ -34,6 +34,6 @@ "url": "https://github.com/node-3d/addon-tools-raub.git" }, "dependencies": { - "nan": "~2.10.0" + "nan": "2.11.0" } }