Chengzhong Wu
721e9e1217
test: add initial test426 coverage
...
Source map has been standardized as ECMA426, with a developing test
suite. Add an initial coverage of the source map tests.
PR-URL: https://github.com/nodejs/node/pull/56436
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-03-06 13:38:06 +01:00
吴小白
ae683a9e1f
build: set DESTCPU correctly for 'make binary' on loongarch64
...
Signed-off-by: 吴小白 <296015668@qq.com >
PR-URL: https://github.com/nodejs/node/pull/56271
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-01-24 22:18:58 +01:00
minkyu_kim
720d23f3ac
build: fix make errors that occur in Makefile
...
fix make errors that occur in
coverage-clean case and coverage-test in Makefile
PR-URL: https://github.com/nodejs/node/pull/55287
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-01-24 22:17:31 +01:00
Michaël Zasso
f25a5b6dc4
build: use rclone instead of aws CLI
...
Use rclone to upload assets to Cloudflare as it is more reliable.
Refs: https://github.com/nodejs/build/issues/3508
PR-URL: https://github.com/nodejs/node/pull/55617
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-11-17 11:51:49 +01:00
Aviv Keller
67834ee646
build: print Running XYZ linter... for py and yml
...
PR-URL: https://github.com/nodejs/node/pull/54386
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-11-17 11:51:29 +01:00
Joyee Cheung
82d8051c39
build: don't clean obj.target directory if it doesn't exist
...
This can happen to ninja builds, which would then throw an
error instead of being a noop if the command is executed.
PR-URL: https://github.com/nodejs/node/pull/54337
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-10-02 07:57:40 +02:00
Aviv Keller
6e550b1f26
build: update ruff to 0.5.2
...
PR-URL: https://github.com/nodejs/node/pull/53909
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-10-02 07:57:36 +02:00
Benjamin E. Coe
61b90e7c5e
build: update gcovr to 7.2 and codecov config
...
PR-URL: https://github.com/nodejs/node/pull/54019
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-08-19 10:32:50 +02:00
Daniel Bayley
2eea8502e1
src,test: further cleanup references to osx
...
PR-URL: https://github.com/nodejs/node/pull/53820
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-08-19 10:32:38 +02:00
Antoine du Hamel
daab9e170f
tools: do not run Corepack code before it's reviewed
...
Also enable running `make corepack-update` when `node`/`npm` is not
available globally.
PR-URL: https://github.com/nodejs/node/pull/53405
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-07-19 15:27:08 +02:00
jakecastelli
e1951a4804
build: fix spacing before NINJA_ARGS
...
PR-URL: https://github.com/nodejs/node/pull/53181
Fixes: https://github.com/nodejs/node/issues/53176
Refs: https://github.com/nodejs/node/issues/53176
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-07-19 15:27:06 +02:00
Yagiz Nizipli
1e57c67fdb
build: update ruff to v0.4.5
...
PR-URL: https://github.com/nodejs/node/pull/53180
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-07-19 15:26:57 +02:00
Antoine du Hamel
28e71ede63
build: add --skip-tests to test-ci-js target
...
PR-URL: https://github.com/nodejs/node/pull/53105
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-07-19 15:26:57 +02:00
Tobias Nießen
9aa896e7f5
build: fix -j propagation to ninja
...
The expression containing MAKEFLAGS must be evaluated in a deferred
context for the propagation to work in GNU make. Otherwise, regardless
of the -j value passed to make, ninja will spawn a potentially greater
number of parallel compilation tasks, which can quickly exhaust all
available memory.
PR-URL: https://github.com/nodejs/node/pull/53088
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-07-19 15:26:54 +02:00
flakey5 and Michaël Zasso
5215b6fd8e
build, tools: copy release assets to staging R2 bucket once built
...
Co-authored-by: Michaël Zasso <targos@protonmail.com >
PR-URL: https://github.com/nodejs/node/pull/51394
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-06-17 13:33:03 +02:00
Michaël Zasso
f71a777e6e
tools: update Ruff to v0.3.4
...
- Use `check` command as suggested
- Adapt deprecated config
- Ignore cpplint.py as it's a third-party script
PR-URL: https://github.com/nodejs/node/pull/52302
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-05-03 08:30:29 +02:00
Antoine du Hamel
58255e73ae
build: respect the NODE env variable in Makefile
...
PR-URL: https://github.com/nodejs/node/pull/51743
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 19:28:54 +00:00
Cheng Zhao
ffe467b062
build,tools: make addons tests work with GN
...
PR-URL: https://github.com/nodejs/node/pull/50737
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-03-25 19:27:09 +00:00
Joyee Cheung
b30754aa87
build: run embedtest using node executable
...
We should use the node executable to run this test, instead of
counting on embedtest, the binary being tested, as the test runner.
Otherwise bugs can go unnoticed if the embedtest binary itself
does not work correctly.
PR-URL: https://github.com/nodejs/node/pull/49506
Fixes: https://github.com/nodejs/node/issues/49501
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-09-27 23:07:15 -04:00
legendecas
567afc71b8
test: avoid copying test source files
...
Converting the helper functions to be inlined and making the helper file
header only.
PR-URL: https://github.com/nodejs/node/pull/49515
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
2023-09-27 22:30:07 -04:00
Rich Trott
52de27b9fe
tools: pin ruff version number
...
New versions have new rules and end up breaking builds unexpectedly.
PR-URL: https://github.com/nodejs/node/pull/48505
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Ruy Adorno <ruyadorno@google.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-03 10:38:37 -03:00
Gabriel Schulhof
dbf9e9ffc8
node-api: provide napi_define_properties fast path
...
Implement defining properties via V8's
`v8::Object::CreateDataProperty()`, which is faster for data-valued,
writable, configurable, and enumerable properties.
Re: https://github.com/nodejs/node/issues/45905
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/48440
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-07-03 10:36:49 -03:00
Joyee Cheung
5325be1d99
tools: port js2c.py to C++
...
This makes it easier to use third-party dependencies in this tool
(e.g. adding compression using algorithms not available in Python).
It is also much faster - locally js2c.py takes ~1.5s to generate the
output whereas this version takes ~0.1s - and consumes less memory
(~110MB v.s. 66MB).
This also modifies the js2c.py a bit to simplify the output, making
it easier to compare with one generated by the C++ version. Locally
the output from the two are identical. We'll remove js2c.py in a
subsequent commit when the C++ version is used by default.
PR-URL: https://github.com/nodejs/node/pull/46997
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-05-30 12:24:24 +02:00
Filip Skokan
84fa9fd725
test: refactor WPTRunner and enable parallel WPT execution
...
PR-URL: https://github.com/nodejs/node/pull/47635
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-05-02 09:34:06 +02:00
Filip Skokan
9d3768eb01
Revert "test: run WPT files in parallel again"
...
This reverts commit c05689ea6b .
PR-URL: https://github.com/nodejs/node/pull/47627
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2023-05-02 09:34:00 +02:00
Filip Skokan
c17f2688b8
Revert "tools: ensure failed daily wpt run still generates a report"
...
This reverts commit b17227b6e2 .
PR-URL: https://github.com/nodejs/node/pull/47627
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2023-05-02 09:34:00 +02:00
Christian Clauss
78c08243df
build: replace Python linter flake8 with ruff
...
PR-URL: https://github.com/nodejs/node/pull/47519
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2023-05-02 09:33:53 +02:00
Filip Skokan
b17227b6e2
tools: ensure failed daily wpt run still generates a report
...
PR-URL: https://github.com/nodejs/node/pull/47376
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-04-03 13:06:27 +02:00
Christian Clauss
cce5a8c9ae
build: remove Python pip --no-user option
...
Python pip no longer has a `--no-user` option.
Refs: https://github.com/nodejs/build/issues/3273
Refs: https://github.com/pypa/pip/pull/5116/files
PR-URL: https://github.com/nodejs/node/pull/47372
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-04-02 19:58:57 +02:00
Filip Skokan
c05689ea6b
test: run WPT files in parallel again
...
PR-URL: https://github.com/nodejs/node/pull/47283
Refs: https://github.com/nodejs/node/issues/47146
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-03-31 17:56:40 +00:00
Antoine du Hamel
553b052648
tools: remove targets for individual test suites in Makefile
...
PR-URL: https://github.com/nodejs/node/pull/46892
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-03-31 13:48:59 +00:00
Chengzhong Wu
c6f23ee937
tools: run format-cpp on node-api test c files
...
PR-URL: https://github.com/nodejs/node/pull/46694
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-02-24 10:01:27 +00:00
Xu Meng
a3211e18b4
build,test: add proper support for IBM i
...
Python 3.9 on IBM i now properly returns "os400" for sys.platform
instead of claiming to be AIX as it did previously. While the IBM i PASE
environment is compatible with AIX, it is a subset and has numerous
differences which makes it beneficial to distinguish, however this means
that it now needs explicit support here.
PR-URL: https://github.com/nodejs/node/pull/46739
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-02-22 04:18:56 +00:00
Filip Skokan
ffdbdf4ab1
test: add WPTRunner support for variants and generating WPT reports
...
PR-URL: https://github.com/nodejs/node/pull/46498
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-02-17 15:59:34 +00:00
Yagiz Nizipli
df05cf7c36
deps: add ada as a dependency
...
PR-URL: https://github.com/nodejs/node/pull/46410
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2023-02-06 19:21:38 +00:00
npm CLI robot
66b1356ebc
deps: upgrade npm to 9.3.0
...
PR-URL: https://github.com/nodejs/node/pull/46193
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-01-17 03:38:23 +00:00
Yagiz Nizipli
f4c200dc76
deps: add simdutf dependency
...
PR-URL: https://github.com/nodejs/node/pull/45803
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2022-12-22 20:22:27 +00:00
Keyhan Vakil
691f8d1427
build: convert V8 test JSON to JUnit XML
...
This introduces some code to convert from V8's test JSON output to JUnit
XML. We need this because V8's latest refactor of their test runner has
made it difficult to float our JUnit reporter patch on top (see the
referenced issue).
I also think that there needs to be the same changes to vcbuild.bat, but
I don't know how to do test those yet. I can create a Windows VM and
test it if we decide to go with this approach.
Refs: https://github.com/nodejs/node-v8/issues/236
PR-URL: https://github.com/nodejs/node/pull/44049
Fixes: https://github.com/nodejs/node-v8/issues/236
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2022-10-03 17:45:40 +00:00
Jeff Dickey
fd07bab7ae
build: added NINJA env to customize ninja binary
...
Fixes: https://github.com/nodejs/node/issues/44286
PR-URL: https://github.com/nodejs/node/pull/44293
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-08-22 11:39:00 +00:00
Tobias Nießen and Rich Trott
e9f69e88b0
build: clarify missing clang-format tool
...
PR-URL: https://github.com/nodejs/node/pull/42762
Co-authored-by: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2022-07-07 22:17:49 +02:00
Feng Yu
a42099564c
tools: refactor tools/license2rtf to ESM
...
This reverts commit 331088f4a4 .
PR-URL: https://github.com/nodejs/node/pull/43232
Refs: https://github.com/nodejs/node/issues/43213
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2022-07-08 02:38:04 +08:00
Feng Yu
24623dc586
doc: update default branch name in Makefile
...
PR-URL: https://github.com/nodejs/node/pull/43441
Refs: https://github.com/nodejs/node/issues/33864
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-06-17 09:41:07 +02:00
Richard Lau
331088f4a4
Revert "tools: refactor tools/license2rtf to ESM"
...
This reverts commit 30cb1bf8b8 .
PR-URL: https://github.com/nodejs/node/pull/43214
Fixes: https://github.com/nodejs/node/issues/43213
Refs: https://github.com/nodejs/node/pull/43101
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-05-26 17:03:12 +01:00
Feng Yu
30cb1bf8b8
tools: refactor tools/license2rtf to ESM
...
PR-URL: https://github.com/nodejs/node/pull/43101
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-05-25 17:11:42 +02:00
Feng Yu
b4398df2e5
tools: refactor build-addons.js to ESM
...
PR-URL: https://github.com/nodejs/node/pull/43099
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-05-22 14:28:41 +01:00
Richard Lau
899753c034
build: run V8 tests with detected Python version
...
V8's test runner now requires Python 3. Use the Python binary we
detected that is used elsewhere in the Makefile.
PR-URL: https://github.com/nodejs/node/pull/42740
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2022-04-21 11:56:01 +02:00
Maël Nison
e84b635db4
build: add corepack to the auto-updated dependencies
...
PR-URL: https://github.com/nodejs/node/pull/42090
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
2022-02-25 22:36:05 +00:00
Michael Dawson
a199387f04
doc: make contributing info more discoverable
...
There are been several discussions in recent PRs about
the docs related to contributing not being very discoverable.
Move these docs from doc/guides/ to doc/contributing.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41408
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
Reviewed-By: Mary Marchini <oss@mmarchini.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-01-18 14:24:30 -05:00
Antoine du Hamel
f8f3d35bd6
tools: add missing .PHONY and .NOTPARALLEL targets in Makefile
...
PR-URL: https://github.com/nodejs/node/pull/41515
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yash Ladha <yash@yashladha.in >
2022-01-18 18:05:06 +00:00
Michaël Zasso
331b906195
build: fix npm version detection
...
Npm's package.json now contains two fields named "version".
Grep for the top-level one.
Fixes: https://github.com/nodejs/build/issues/2850
PR-URL: https://github.com/nodejs/node/pull/41575
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Christian Clauss <cclauss@me.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-01-18 14:22:45 +01:00