* chore: misc test fixes
* Sort test runs by os first
* Use cross-env for test env var
* Try sorting matrix params
* Make FAST_TEST the default and rename to FULL_TEST
* Separate helper functions to not need to export test obj in files
BREAKING CHANGE: All internal functions have been coverted to return
promises and no longer accept callbacks. This is not a breaking change
for users but may be breaking to consumers of `node-gyp` if you are
requiring internal functions directly.
Instead of downloading node.lib for all architectures, just download the
one that will be needed. Install.js changed to enable downloading just
node.lib for node versions that already have tarball downloaded and
extracted. Not fetching lib now fails the installation. Increased
installVersion because of the changes.
Refs: https://github.com/nodejs/node-gyp/issues/2847
* fix: check for errors while extracting downloaded tarball
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>
* test: parallel installs
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>
* fix: extract tarball to temp directory on Windows
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>
---------
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>
The servers hosting the header packages for Electron return 403
instead of 404 for the constructed URL for arm64 node.lib for
older releases that do not support arm64.
PR-URL: https://github.com/nodejs/node-gyp/pull/1934
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: João Reis <reis@janeasystems.com>
Windows on Arm support is available in some versions of Node.js v12 and
Electron v6. This update allows node-gyp to fetch the appropriate
node.lib to build native modules. If an arm64 binary is not available
for the target node version, it's logged but ignored.
arm64 is not expected to work in very old node.lib distribution formats,
the test URLs in these cases are added to be consistent with x64.
PR-URL: https://github.com/nodejs/node-gyp/pull/1875
Reviewed-By: João Reis <reis@janeasystems.com>
In addition:
* moved module.exports to the bottom
* no single-line if statements
* no if statements without a {
* const for requires
* array declarations get spaces inside [ ]
* 'use strict' in all .js files
PR-URL: https://github.com/nodejs/node-gyp/pull/1794
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
Modified the result of processRelease() to return uniform names `libUrl`,
`libPath` for Windows in objects named as target platforms (`ia32` and `x64`)
This allows to loop over the target platforms in downloadNodeLib() and to use
the universal names instead of two almost identical code parts with `libUrl32`,
`libPath32` and `libUrl64`, `libPath64` names.
PR-URL: https://github.com/nodejs/node-gyp/pull/965
Reviewed-By: Rod Vagg <rod@vagg.org>
- Uses `.eslintrc.yaml` for configuration
- `npm run lint` is part of `npm test`
PR-URL: https://github.com/nodejs/node-gyp/pull/1497
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
- Removes "module dependencies" comments and things that, IMHO, don't add
too much value. Happy to add back if helps some people when reading
through `node-gyp`.
- DRY up `lib/process-release.js`.
- Removes a bunch of extra blank lines, as well as random spaces.
PR-URL: https://github.com/nodejs/node-gyp/pull/1508
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Tar version 3 performs better and is more well tested than its
predecessor. npm will be using this in the near future, so there is no
benefit in shipping a node-gyp that uses the slower and less reliable
fstream-based tar.
This drops support for node 0.x, and thus should be considered a
breaking semver-major change.
PR-URL: https://github.com/nodejs/node-gyp/pull/1212
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Retry the download+install dance only once after encountering an EACCES.
That only happens when both the devdir (usually: `$HOME/.node-gyp`) and
the current working directory aren't writable. Users won't often hit
that except through `sudo npm install` because npm drops privileges
before executing node-gyp.
Fixes: https://github.com/nodejs/node-gyp/issues/1383
PR-URL: https://github.com/nodejs/node-gyp/pull/1384
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Add an option for overriding the default CA chain that is used when
downloading the tarball. This matches the npm option of the same
name and gets implicitly passed through the `npm_config_cafile`
environment variable.
Fixes: https://github.com/nodejs/node-gyp/issues/695
PR-URL: https://github.com/nodejs/node-gyp/pull/837
Reviewed-By: Rod Vagg <rod@vagg.org>
Move the function around so it can be tested and add a regression test.
As a policy vs. mechanism thing, change the control flow to handle
exceptions at the call site, not inside the download function.
PR-URL: https://github.com/nodejs/node-gyp/pull/837
Reviewed-By: Rod Vagg <rod@vagg.org>