Commit graph

10 commits

Author SHA1 Message Date
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
Rod Vagg
a52c6eb9e8
test: migrate from tape to tap
PR-URL: https://github.com/nodejs/node-gyp/pull/1795
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-06-25 11:26:08 +10:00
João Reis
43031fadcb
python: clean-up detection
Try everything until Python is found.

PR-URL: https://github.com/nodejs/node-gyp/pull/1582
Reviewed-By: Rod Vagg <rod@vagg.org>
2019-04-24 10:29:00 +10:00
Refael Ackermann
49ab79d221
python: more informative error
PR-URL: https://github.com/nodejs/node-gyp/pull/1269
Refs: https://github.com/nodejs/node-gyp/pull/1582
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: João Reis <reis@janeasystems.com>
2019-04-24 10:29:00 +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
Yang Guo
536759c7e9 configure: use sys.version_info to get python version
This is cleaner than filtering additional strings from
platform.python_version().

PR-URL: https://github.com/nodejs/node-gyp/pull/1504
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Rod Vagg <rod@vagg.org>
2018-08-09 10:45:12 +10:00
Ben Noordhuis
49801716c2
test: fix test-find-python on v0.10.x buildbot.
Work around a v0.10.x CI issue where path.resolve() on UNIX systems
prefixes Windows paths with the current working directory.

v0.12 and up are free of this issue because they use
path.win32.resolve() which does the right thing.

PR-URL: https://github.com/nodejs/node-gyp/pull/1172
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-25 15:52:51 +01:00
Ben Noordhuis
37ae7be114 Try python launcher when stock python is python 3.
Consult the python launcher when the python on the path is python 3.
If a python 2 exists on the system, it will tell us.

Fixes: https://github.com/nodejs/node-gyp/issues/987
PR-URL: https://github.com/nodejs/node-gyp/pull/992
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-10-08 10:45:36 +02:00
Ben Noordhuis
e3778d9907 Add lots of findPython() tests.
Break up findPython() into pieces that can be tested in isolation and
add tests that do so.

PR-URL: https://github.com/nodejs/node-gyp/pull/992
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-10-08 10:45:03 +02:00
Ben Noordhuis
817ed9bd78 Add test for python executable search logic.
Break out the search logic into a separate function and add a regression
test.

References: https://github.com/nodejs/node-gyp/pull/668
PR-URL: https://github.com/nodejs/node-gyp/pull/756
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-11-24 14:59:38 +01:00