Commit graph

18 commits

Author SHA1 Message Date
Felix Rieseberg
e25ec9e836 fix: Monkey-patch fs 2024-10-08 10:36:26 -04:00
Luke Karrys
355622f4aa feat: convert all internal functions to async/await
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.
2023-10-28 08:59:57 -07:00
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
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
Jon Moss
a5b7410497
Add ESLint no-unused-vars rule
- 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>
2019-04-24 10:27:29 +10: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
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
Nathan Rajlich
800179a5cd remove: fix "remove" command after semver v2 upgrade
Closes #278.
2013-06-28 09:39:50 -07:00
Nathan Rajlich
f7969a2d42 fix error message 2012-06-06 18:22:52 -07:00
Nathan Rajlich
47de81f963 initial take at using 'npmlog' for logging
* adds a '--loglevel' switch to node-gyp which accepts the same values as npm
 * now the '--verbose' flag is simply an alias to '--loglevel=verbose'
 * this simplifies the code a bit, since any logging logic is now removed
 * more log levels! it's mostly verbose() and info() being used
   * still need to go back and move some of logging calls to a better level
2012-06-06 18:01:08 -07:00
Nathan Rajlich
ae39e1adb3 core: centralize the dev dir logic into node-gyp.js 2012-03-30 20:02:27 -07:00
Nathan Rajlich
119e0303ad remove: better error message when no version is passed in 2012-03-28 18:33:48 -07:00
Nathan Rajlich
f3e8a70835 Use 'semver' to install full patch version of node instead of minor.
Closes #37.
Closes #38.
Closes #39.
2012-03-07 11:52:39 -08:00
Nathan Rajlich
80f857a470 Use path.resolve() everywhere. 2012-02-27 18:15:20 -08:00
Nathan Rajlich
2461ff762c Prepare for a potential "0.10" release.
We can no longer treat the version like a Number, since `0.10`
gets represented as `0.1`.
2012-02-11 17:08:50 -08:00
Nathan Rajlich
f2d57b469c Make sure 'remove' doesn't call 'current' and 'use' anymore. 2012-02-11 13:00:53 -08:00
Nathan Rajlich
4f7231c36e Clean up the 'current' file in the 'remove' command. 2012-02-04 22:16:37 -08:00
Nathan Rajlich
8a75de1cbb Initial 'remove' command implementation. 2012-02-04 20:15:14 -08:00