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
Halit Ogunc
cdc49ee3f6
bin: fix the usage instructions
PR-URL: https://github.com/nodejs/node-gyp/pull/1888
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-09-26 11:59:04 +10: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
Nathan Rajlich
ae4d8d1e79 list: use Array.isArray() 2012-06-15 11:15:35 -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
f1082e5773 use graceful-fs everywhere 2012-04-05 17:19:29 -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
80f857a470 Use path.resolve() everywhere. 2012-02-27 18:15:20 -08:00
Nathan Rajlich
4ecfd1427e Don't look up the 'current' in the 'list' command.
Part of #20.
2012-02-11 12:52:48 -08:00
Nathan Rajlich
d917f6aed0 Remove dead code. 2012-02-05 00:55:23 -08:00
Nathan Rajlich
d46d0fd295 Make 'list' not error when no .node-gyp dir exists. 2012-02-05 00:54:10 -08:00
Nathan Rajlich
ad7ab4e7b6 Don't use 'log()'. 2012-02-04 22:14:49 -08:00
Nathan Rajlich
ec9e24d6d5 Use the 'log' event for the 'list' command. 2012-02-04 19:58:37 -08:00
Nathan Rajlich
8c45a71b62 Initial 'list' implementation. 2012-02-04 19:26:56 -08:00