Commit graph

17 commits

Author SHA1 Message Date
Luke Karrys
192eec2aca
Sync deps and engines with npm (#2770)
* feat!: update `engines.node` to `^14.17.0 || ^16.13.0 || >=18.0.0`

* deps: nopt@^7.0.0

* feat: replace npmlog with proc-log

* deps: standard@17.0.0 and fix linting errors

* deps: which@3.0.0
- this also promiisifies the build command

* deps: glob@8.0.3

* feat: drop rimraf dependency

* fix: use fs/promises in favor of fs.promises
2023-06-20 15:44:18 +02:00
Rod Vagg
ab2a4cc209
src: update to standard@14
PR-URL: https://github.com/nodejs/node-gyp/pull/1899
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-10-02 13:57:30 +10:00
Richard Townsend
2441932dc4 src,win: add support for fetching arm64 node.lib
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>
2019-09-30 22:49:26 +01:00
Rod Vagg
e40c99e283
src: implement standard.js linting
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>
2019-07-06 14:36:37 +10:00
Pavel Medvedev
03683f09d6
lib: code de-duplication
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>
2019-06-22 12:04:25 +10:00
Samuel Attard
1cfdb28886
lib: reintroduce support for iojs file naming for releases >= 1 && < 4
For Electron 3

PR-URL: https://github.com/nodejs/node-gyp/pull/1777
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-06-20 11:22:15 +10:00
Ben Noordhuis
4748f6ab75 Remove deprecated compatibility code.
* Remove support for the IOJS_ORG_MIRROR, NVM_IOJS_ORG_MIRROR
  and NVM_NODEJS_ORG_MIRROR enviroment variables.

* Remove obsolete support for io.js. It's been out of support
  for over three years now.

PR-URL: https://github.com/nodejs/node-gyp/pull/1670
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-05-06 09:29:14 +02:00
Jon Moss
9e46872ea3
bin,lib: remove extra comments/lines/spaces
- 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>
2019-04-24 10:27:29 +10:00
Ben Noordhuis
241752f381 Log dist-url.
The default download URL can be overridden by `--dist-url` or one of the
`*_MIRROR` environment variables.  Log the URL to ease troubleshooting.

Fixes: https://github.com/nodejs/node-gyp/issues/1169
PR-URL: https://github.com/nodejs/node-gyp/pull/1170
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-05-17 11:36:10 +02:00
Rod Vagg
818d854a4d Introduce NODEJS_ORG_MIRROR and IOJS_ORG_MIRROR
Deprecate NVM_NODEJS_ORG_MIRROR and NVM_IOJS_ORG_MIRROR as they
were only ever intended to be internal nvm environment variables.
These will be removed in the next semver-major release.

PR-URL: https://github.com/nodejs/node-gyp/pull/878
Reviewed-By: ralphtheninja
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-02-16 15:56:07 +11:00
Rod Vagg
d1e4cc4b62 Download headers tarball for ~0.12.10 || ~0.10.42
Properly created -headers.tar.gz files were not available until
v0.12.10 and v0.10.42 (in addition to >= 3).

PR-URL: https://github.com/nodejs/node-gyp/pull/877
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-02-15 11:55:30 +11:00
Lars-Magnus Skog
ad827cda30 tarballUrl global and && when checking for iojs
PR-URL: https://github.com/nodejs/node-gyp/pull/729
2015-09-14 10:53:18 +10:00
Rod Vagg
6e8c3bf3c6 add back support for passing additional cmdline args
PR-URL: https://github.com/nodejs/node-gyp/pull/723
2015-09-12 13:20:17 +10:00
Rod Vagg
846337e36b normalise versions for target == this comparison
PR-URL: https://github.com/nodejs/node-gyp/pull/716
2015-09-08 17:52:32 +10:00
Rod Vagg
6dcf220db7 test version major directly, don't use semver.satisfies()
semver.satisfies() doesn't play nicely with prerelease tags

PR-URL: https://github.com/nodejs/node-gyp/pull/711
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-08 10:01:17 +10:00
Rod Vagg
938dd18d1c refactor for clarity, fix dist-url, add env var dist-url functionality
PR-URL: https://github.com/nodejs/node-gyp/pull/711
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-08 10:01:07 +10:00
Rod Vagg
9e9df66a06 use process.release, make aware of io.js & node v4 differences
PR-URL: https://github.com/nodejs/node-gyp/pull/711
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-08 09:59:31 +10:00