Node.js GitHub Bot
203c3cf4ca
tools: update lint-md-dependencies
...
Update to @rollup/plugin-commonjs@25.0.2 and rollup@3.25 .2.
PR-URL: https://github.com/nodejs/node/pull/48544
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-07-03 10:38:40 -03:00
Keyhan Vakil
4f4d0b802e
child_process: improve spawn performance on Linux
...
Speed up child_process.spawn by enabling the new V8 build flag which
makes fork/exec faster.
Here are the results of running the existing benchmark. Note that this
optimization helps more for applications with larger heaps, so this is
somewhat of an underestimate of the real world performance benefits.
```console
$ ./node benchmark/compare.js --runs 15 \
--new ./node \
--old ~/node-v20/out/Release/node \
--filter params child_process > cpr
$ node-benchmark-compare cpr
confidence improvement (***)
methodName='exec' n=1000 *** 60.84 % ±5.43%
methodName='execFile' n=1000 *** 53.72 % ±3.33%
methodName='execFileSync' n=1000 *** 9.10 % ±0.84%
methodName='execSync' n=1000 *** 10.44 % ±0.97%
methodName='spawn' n=1000 *** 53.10 % ±2.90%
methodName='spawnSync' n=1000 *** 8.64 % ±1.22%
0.01 false positives, when considering a 0.1% risk acceptance (***)
```
Fixes: https://github.com/nodejs/node/issues/25382
Fixes: https://github.com/nodejs/node/issues/14917
Refs: https://github.com/nodejs/performance/issues/93
Refs: https://github.com/nodejs/performance/issues/89
PR-URL: https://github.com/nodejs/node/pull/48523
Refs: https://github.com/v8/v8/commit/1a782f6543ae999bf9e497e23042af0b70191f10
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2023-07-03 10:38:39 -03:00
Keyhan Vakil
333907b19d
tools: speedup compilation of js2c output
...
Incremental compilation of Node.js is slow. Currently on a powerful
Linux machine, it takes about 9 seconds and 830 MB of memory to compile
`gen/node_javascript.cc` with g++. This is the longest step when
recompiling a small change to a Javascript file.
`gen/node_javascript.cc` contains a lot of large binary literals of our
Javascript source code. It is well-known that embedding large binary
literals as C/C++ arrays is slow. One workaround is to include the data
as string literals instead. This is particularly nice for the Javascript
included via js2c, which look better as string literals anyway.
Add a build flag `NODE_JS2C_USE_STRING_LITERALS` to js2c. When this flag
is set, we emit string literals instead of array literals, i.e.:
```c++
// old: static const uint8_t X[] = { ... };
static const uint8_t *X = R"JS2C1b732aee(...)JS2C1b732aee";
// old: static const uint16_t Y[] = { ... };
static const uint16_t *Y = uR"JS2C1b732aee(...)JS2C1b732aee";
```
This requires some modest refactoring in order to deal with the flag
being on or off, but the new code itself is actually shorter.
I only enabled the new flag on Linux/macOS, since those are systems that
I have available for testing. On my Linux system with gcc, it speeds up
compilation by 5.5s (9.0s -> 3.5s). On my Mac system with clang, it
speeds up compilation by 2.2s (3.7s -> 1.5s). (I don't think this flag
will work with MSVC, but it'd probably speed up clang on windows.)
The long-term goal here is probably to allow this to occur incrementally
per Javascript file & in parallel, to avoid recompiling all of
`gen/node_javascript.cc`. Unfortunately the necessary gyp incantations
seem impossible (or at least, far beyond me). Anyway, a 60% speedup is a
nice enough win.
Refs: https://github.com/nodejs/node/issues/47984
PR-URL: https://github.com/nodejs/node/pull/48160
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-07-03 10:38:39 -03:00
Node.js GitHub Bot
2b141c413f
deps: update icu to 73.2
...
PR-URL: https://github.com/nodejs/node/pull/48502
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-07-03 10:38:38 -03:00
Node.js GitHub Bot
10bd5f4d97
tools: update lint-md-dependencies
...
Updates: rollup@3.25 .1 to-vfile@8.0.0 vfile-reporter@8.0.0
PR-URL: https://github.com/nodejs/node/pull/48486
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
2023-07-03 10:38:37 -03:00
Luigi Pinca
4345526644
tools: replace sed with perl
...
For cross-platform compatibility use perl instead of sed.
Fixes: https://github.com/nodejs/node/issues/48496
PR-URL: https://github.com/nodejs/node/pull/48499
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-07-03 10:36:50 -03:00
Marco Ippolito
6c590835f3
tools: automate update openssl v16
...
PR-URL: https://github.com/nodejs/node/pull/48377
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2023-07-03 10:36:50 -03:00
Node.js GitHub Bot
90b5335338
tools: update eslint to 8.43.0
...
PR-URL: https://github.com/nodejs/node/pull/48487
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-03 10:36:50 -03:00
Node.js GitHub Bot
cd83530a11
tools: update doc to to-vfile@8.0.0
...
PR-URL: https://github.com/nodejs/node/pull/48485
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-07-03 10:36:49 -03:00
Rich Trott
e500b439bd
tools: prepare tools/doc for to-vfile 8.0.0
...
toVFile.readSync() is removed in favor of readSync().
PR-URL: https://github.com/nodejs/node/pull/48485
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-07-03 10:36:49 -03:00
Node.js GitHub Bot
d623616813
tools: update lint-md-dependencies
...
- `@rollup/plugin-commonjs@25.0.1`
- `rollup@3.24 .1`
PR-URL: https://github.com/nodejs/node/pull/48417
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-03 10:36:49 -03:00
Node.js GitHub Bot
fe333d2584
crypto: update root certificates to NSS 3.90
...
This is the certdata.txt[0] from NSS 3.90, released on 2023-04-06.
This is the version of NSS that shipped in Firefox 113 on
2023-05-09.
Certificates added:
- BJCA Global Root CA1
- BJCA Global Root CA2
[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_90_RTM/lib/ckfw/builtins/certdata.txt
PR-URL: https://github.com/nodejs/node/pull/48416
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-07-03 10:36:48 -03:00
Joyee Cheung
e60b6dedd8
bootstrap: unify snapshot builder and embedder entry points
...
- Run the embedder entry point directly through
runEmbedderEntryPoint(), instead of going through another
JS -> C++ trip through the function returned by
getEmbedderEntryFunction()
- For --build-snapshot, read the snapshot script code directly in C++
and pass it to SnapshotBuilder::Generate(), this makes the entry point
more explicit instead of hiding it in JS land, and also makes it
possible to invoke SnapshotBuilder::Generate() internally to create
a custom snapshot.
- Previously we used process.execPath for the embedder to create
__filename and __dirname in the snapshot builder script while using
process.argv[1] for --build-snapshot (where it's always set) which
results in inconsistencies. We now require the embedder to also set
args[1] when creating the Environment if they intend to run snapshot
scripts with a context that contains __filename and __dirname, which
would be derived from args[1]. If they prefer not to include
build-time paths in the snapshot, we now provide
node::GetAnonymousMainPath() as an alternative.
PR-URL: https://github.com/nodejs/node/pull/48242
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-07-03 10:32:48 -03:00
Richard Lau
8009e2c3be
tools: update eslint-plugin-jsdoc
...
Run a subset of `tools/dep_updaters/update-eslint.sh` to update
`eslint-plugin-jsdoc` to get rid of a spurious ENOENT error when
running the linter.
PR-URL: https://github.com/nodejs/node/pull/48393
Fixes: https://github.com/nodejs/node/issues/48374
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-07-03 10:32:48 -03:00
Andrea Fassina
10385c8565
tools: add version update to external dependencies
...
Refs: nodejs/security-wg#973
Most of the duplicated code in all the dependencies updaters
has been moved in the `utils.sh` file
PR-URL: https://github.com/nodejs/node/pull/48081
Refs: https://github.com/nodejs/security-wg/issues/973
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-07-03 10:32:47 -03:00
Node.js GitHub Bot
b1cef81b18
tools: update eslint to 8.42.0
...
PR-URL: https://github.com/nodejs/node/pull/48328
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-07-03 10:32:46 -03:00
Tobias Nießen
9c17e335f1
msi: do not create AppData\Roaming\npm
...
This effectively reverts e431cae7e7 due to
security concerns. The directory is being created with elevated
privileges but its path may depend on an unprivileged user's environment
variables. Creating a directory in certain sensitive locations can cause
Windows to become inoperable.
Creating AppData\Roaming\npm was an intentional addition in order to
resolve https://github.com/nodejs/node-v0.x-archive/issues/8141 , which
appears to have been a common issue for users of npm. However, this was
implemented before 4cfe5eb9af , which
changed the MSI installation scope to perMachine. There were concerns
about creating the npm directory in that PR, albeit not related to
security (see https://github.com/nodejs/node-v0.x-archive/pull/25640 ).
Refs: https://github.com/nodejs/node-v0.x-archive/issues/8141
Refs: https://github.com/nodejs/node-v0.x-archive/pull/8838
Refs: https://github.com/nodejs/node-v0.x-archive/pull/25640
PR-URL: https://github.com/nodejs-private/node-private/pull/408
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
CVE-ID: CVE-2023-30585
2023-06-19 12:10:40 -03:00
Node.js GitHub Bot
62f847d0b3
tools: update rollup lint-md-dependencies
...
- @rollup/plugin-node-resolve@15.1.0
- rollup@3.23 .0
PR-URL: https://github.com/nodejs/node/pull/48329
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-06-04 14:31:33 +02:00
Ben Noordhuis
5f08bfe35f
tools: don't gitignore base64 config.h
...
The file is checked into git. Ignoring it causes a very non-obvious way
of breaking tarball builds:
1. Download and unpack tarball
2. Check the sources into git with `git init; git add .; git commit -a`
3. Clean the source tree with `git clean -dfx`
4. Run `./configure && make`
5. Observe build failure because config.h is missing
Fixes: https://github.com/nodejs/node/issues/47638
PR-URL: https://github.com/nodejs/node/pull/48174
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-06-04 14:31:10 +02:00
Santiago Gimeno
ded0e2d755
tools: update LICENSE and license-builder.sh
...
A libuv `LICENSE-extra` file was added and a couple of files were
removed (stdint-msvc2008.h and pthread-fixes.c).
PR-URL: https://github.com/nodejs/node/pull/48078
Fixes: https://github.com/nodejs/node/issues/43931
Fixes: https://github.com/nodejs/node/issues/42496
Fixes: https://github.com/nodejs/node/issues/47715
Fixes: https://github.com/nodejs/node/issues/47259
Fixes: https://github.com/nodejs/node/issues/47241
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2023-06-04 14:31:10 +02:00
Santiago Gimeno
bfcb3d1d9a
deps: upgrade to libuv 1.45.0
...
- linux: introduce io_uring support https://github.com/libuv/libuv/pull/3952
- src: add new metrics APIs https://github.com/libuv/libuv/pull/3749
- unix,win: give thread pool threads an 8 MB stack https://github.com/libuv/libuv/pull/3787
- win,unix: change execution order of timers https://github.com/libuv/libuv/pull/3927
Fixes: https://github.com/nodejs/node/issues/43931
Fixes: https://github.com/nodejs/node/issues/42496
Fixes: https://github.com/nodejs/node/issues/47715
Fixes: https://github.com/nodejs/node/issues/47259
Fixes: https://github.com/nodejs/node/issues/47241
PR-URL: https://github.com/nodejs/node/pull/48078
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2023-06-04 14:31:09 +02:00
Marco Ippolito
07aa264366
tools: automate histogram update
...
PR-URL: https://github.com/nodejs/node/pull/48171
Refs: https://github.com/nodejs/security-wg/issues/828
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-05-30 12:24:35 +02:00
Luigi Pinca
1416b75eaa
tools: use shasum instead of sha256sum
...
By default, there is no sha256sum command in macOS.
PR-URL: https://github.com/nodejs/node/pull/48229
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-05-30 12:24:34 +02:00
Antoine du Hamel
b81e9d9b7b
tools: harmonize dep_updaters scripts
...
PR-URL: https://github.com/nodejs/node/pull/48201
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-05-30 12:24:33 +02:00
Andrea Fassina
a60bc41e53
tools: deps update authenticate github api request
...
PR-URL: https://github.com/nodejs/node/pull/48200
Fixes: https://github.com/nodejs/node/issues/48119
Refs: https://github.com/nodejs/security-wg/issues/973
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mestery <mestery@protonmail.com >
2023-05-30 12:24:33 +02:00
Andrea Fassina
360df25d04
doc: fix broken link to new folder doc/contributing/maintaining
...
PR-URL: https://github.com/nodejs/node/pull/48205
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-05-30 12:24:32 +02:00
Michaël Zasso
568a705799
tools: refactor v8_pch config
...
Avoid repetition by defining a new GYP target.
PR-URL: https://github.com/nodejs/node/pull/47364
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-05-30 12:24:32 +02:00
Andrea Fassina
801573ba46
tools: log and verify sha256sum
...
PR-URL: https://github.com/nodejs/node/pull/48088
Refs: https://github.com/nodejs/security-wg/issues/973
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-05-30 12:24:30 +02:00
Andrea Fassina
4cf5a9edaf
tools: use latest upstream commit for zlib updates
...
Zlib rarely gets new tags or releases, so now we use the latest commit
on the upstream default branch to check if an update is available.
Refs: https://github.com/nodejs/security-wg/issues/973
PR-URL: https://github.com/nodejs/node/pull/48054
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-05-30 12:24:27 +02:00
Joyee Cheung
5d92202220
build: replace js2c.py with js2c.cc
...
PR-URL: https://github.com/nodejs/node/pull/46997
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-05-30 12:24:25 +02: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
Tobias Nießen
6c60d90277
tools: fix race condition when npm installing
...
The update scripts that install dependencies from npm blindly assume
that `npm install` will always install the version that was previously
fetched as `dist-tags.latest`. That is not necessarily true, so instead
always install the specific version that the script thinks is current.
PR-URL: https://github.com/nodejs/node/pull/48101
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-05-30 11:36:21 +02:00
Rich Trott
0ab840a58f
tools: refloat 7 Node.js patches to cpplint.py
...
Cherry-pick 12c8b4d154
Original commit message:
This commit is a suggestion for adding a rule for NULL usages in the
code base. This will currently report a number of errors which could be
ignored using // NOLINT (readability/null_usage)
PR-URL: https://github.com/nodejs/node/pull/17373
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Refs: https://github.com/nodejs/node/commit/12c8b4d15471cb6211b39c3a2ca5b10fa4b9f12b
Cherry-pick fc81e80191
Original commit message:
Update cpplint.py to check for inline headers when the corresponding
header is already included.
PR-URL: https://github.com/nodejs/node/pull/21521
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Refs: https://github.com/nodejs/node/commit/fc81e801913de3e3f3c0c8e26c105f983a74e539
Cherry-pick cbc3dd997e
Original commit message:
src, tools: add check for left leaning pointers
This commit adds a rule to cpplint to check that pointers in the code
base lean to the left and not right, and also fixes the violations
reported.
PR-URL: https://github.com/nodejs/node/pull/21010
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Refs: https://github.com/nodejs/node/commit/cbc3dd997eb90d629d1b9912b7a5a40eb82343df
Cherry-pick 902998190a
Original commit message:
tools: fix cpplint.py header rules
THIS COMMIT SHOULD GO WITH THE NEXT. IT WILL FIND NEW LINT.
PR-URL: https://github.com/nodejs/node/pull/26306
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Refs: https://github.com/nodejs/node/commit/902998190a55d6915b881936f6dd5b6e9cca6ad8
Cherry-pick 0a25ace9c3
Original commit message:
tools: move cpplint configuration to .cpplint
PR-URL: https://github.com/nodejs/node/pull/27098
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Refs: https://github.com/nodejs/node/commit/0a25ace9c35b62ece4d32fd90b326d8063265109
Cherry-pick afa9a7206c
Original commit message:
tools: refloat update link to google styleguide for cpplint
This commit updates two old links to Google's C++ styleguide which
currently result in a 404 when accessed.
PR-URL: https://github.com/nodejs/node/pull/30876
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Refs: https://github.com/nodejs/node/commit/afa9a7206c26a29a2af226696c145c924a6d3754
Cherry-pick e23bf8f771
Original commit message:
tools,src: refloat forbid usage of v8::Persistent
`v8::Persistent` comes with the surprising catch that it requires
manual cleanup. `v8::Global` doesn’t, making it easier to use,
and additionally provides move semantics. New code should always
use `v8::Global`.
PR-URL: https://github.com/nodejs/node/pull/31018
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
PR-URL: https://github.com/nodejs/node/pull/35569
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35719
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35866
PR-URL: https://github.com/nodejs/node/pull/36213
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36235
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36324
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/38851
Reviewed-By: Khaidi Chu <i@2333.moe >
PR-URL: https://github.com/nodejs/node/pull/42416
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/48098
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-05-30 11:36:21 +02:00
Yagiz Nizipli
a298193378
tools: update cpplint to 1.6.1
...
PR-URL: https://github.com/nodejs/node/pull/48098
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-05-30 11:36:21 +02:00
Node.js GitHub Bot
f6725751b7
tools: update eslint to 8.41.0
...
PR-URL: https://github.com/nodejs/node/pull/48097
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-05-30 11:36:20 +02:00
Node.js GitHub Bot
6539361f4e
tools: update lint-md-dependencies
...
Update to remark-parse@10.0.2, remark-stringify@10.0.3, and
rollup@3.22 .0.
PR-URL: https://github.com/nodejs/node/pull/48096
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-05-30 11:36:20 +02:00
Node.js GitHub Bot
5d94dbb951
tools: update doc to remark-parse@10.0.2
...
PR-URL: https://github.com/nodejs/node/pull/48095
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-05-30 11:36:20 +02:00
Marco Ippolito
2226088048
tools: add debug logs
...
PR-URL: https://github.com/nodejs/node/pull/48060
Reviewed-By: Ruy Adorno <ruyadorno@google.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-05-30 11:36:18 +02:00
Luigi Pinca
0c8c383583
tools: fix zconf.h path
...
Use the `DEPS_DIR` variable to build the path instead of hardcoding it.
PR-URL: https://github.com/nodejs/node/pull/48089
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-05-30 11:36:18 +02:00
Node.js GitHub Bot
6adaf4c648
tools: update remark-preset-lint-node to 4.0.0
...
PR-URL: https://github.com/nodejs/node/pull/47995
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-05-30 11:36:12 +02:00
Marco Ippolito
a4e261e910
tools: debug log for nghttp3
...
PR-URL: https://github.com/nodejs/node/pull/47992
Refs: https://github.com/nodejs/node/pull/47576
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-05-15 11:37:36 +02:00
Jithil P Ponnan
1aec718619
src: add cjs_module_lexer_version base64_version
...
src: add cjs_module_lexer_version base64_version
PR-URL: https://github.com/nodejs/node/pull/45629
Refs: https://github.com/nodejs/node/issues/45260
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-05-15 11:37:35 +02:00
Keyhan Vakil
190596c189
src: register external references for source code
...
Currently we use external strings for internalized builtin source code.
However when a snapshot is taken, any external string whose resource
is not registered is flattened into a SeqString (see ref). The
result is that module source code stored in the snapshot does not
use external strings after deserialization. This patch registers an
external string resource for each internalized builtin's source. The
savings are substantial: ~1.9 MB of heap memory per isolate, or ~44%
of an otherwise empty isolate's heap usage:
```console
$ node --expose-gc -p 'gc(),process.memoryUsage().heapUsed'
4190968
$ ./node --expose-gc -p 'gc(),process.memoryUsage().heapUsed'
2327536
```
The savings can be even higher for user snapshots which may include
more internal modules.
The existing UnionBytes implementation was ill-suited, because it only
created an external string resource when ToStringChecked was called,
but we need to register the external string resources before the
isolate even exists. We change UnionBytes to no longer own the data,
and shift ownership of the data to a new external resource class
called StaticExternalByteResource. StaticExternalByteResource are
either statically allocated (for internalized builtin code) or owned
by the static `externalized_builtin_sources` map, so they will only be
destructed when static resources are destructed. We change JS2C to emit
statements to register a string resource for each internalized builtin.
Refs: https://github.com/v8/v8/blob/d2c8fbe9ccd1a6ce5591bb7dd319c3c00d6bf489/src/snapshot/serializer.cc#L633
PR-URL: https://github.com/nodejs/node/pull/47055
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-05-12 11:57:20 +02:00
Marco Ippolito
f6ff318d4c
tools: automate icu-small update
...
PR-URL: https://github.com/nodejs/node/pull/47727
Refs: https://github.com/nodejs/security-wg/issues/828
Reviewed-By: Steven R Loomis <srl295@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-05-12 11:57:20 +02:00
Node.js GitHub Bot
706c305381
tools: update lint-md-dependencies to rollup@3.21.5
...
PR-URL: https://github.com/nodejs/node/pull/47903
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-05-12 11:57:19 +02:00
Node.js GitHub Bot
e22c686ca9
tools: update eslint to 8.40.0
...
PR-URL: https://github.com/nodejs/node/pull/47906
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-05-12 11:57:19 +02:00
Moshe Atlow
17945a2495
test: migrate a pseudo_tty test to use assertSnapshot
...
PR-URL: https://github.com/nodejs/node/pull/47803
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-05-12 11:57:01 +02:00
Node.js GitHub Bot
36f7cfac93
tools: update eslint to 8.39.0
...
PR-URL: https://github.com/nodejs/node/pull/47789
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
2023-05-12 11:56:59 +02:00
Marco Ippolito
4c26e28c33
doc: create maintaining folder for deps
...
PR-URL: https://github.com/nodejs/node/pull/47589
Refs: https://github.com/nodejs/security-wg/issues/828
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2023-05-03 08:53:20 +02:00
Node.js GitHub Bot
c620eb80a0
tools: update doc to highlight.js@11.8.0
...
PR-URL: https://github.com/nodejs/node/pull/47786
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-05-03 08:34:27 +02:00