Michael Dawson
c43a944231
tools: fix error reported by coverity in js2c.cc
...
Coverity reported using the wrong argument types
to printf
Signed-off-by: Michael Dawson <midawson@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/52142
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-25 09:52:53 -04:00
Michaël Zasso
4e278f0253
build: speed up compilation of some V8 files
...
This introduces a special target to compile some of the
'v8_initializers' files with "-O1" instead of "-O3" to avoid huge
compilation times with GCC versions <13.
PR-URL: https://github.com/nodejs/node/pull/52083
Fixes: https://github.com/nodejs/node/issues/52068
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
2024-03-19 08:49:33 +01:00
Node.js GitHub Bot
a21b15a14e
tools: update github_reporter to 1.7.0
...
PR-URL: https://github.com/nodejs/node/pull/52121
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-19 00:27:30 +00:00
Marco Ippolito
d60a871db2
tools: remove gyp-next .github folder
...
PR-URL: https://github.com/nodejs/node/pull/52064
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tierney Cyren <hello@bnb.im >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2024-03-15 08:44:08 +00:00
Node.js GitHub Bot
6ad5353764
tools: update gyp-next to 0.16.2
...
PR-URL: https://github.com/nodejs/node/pull/52062
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-15 02:27:44 +00:00
Po-Chuan Hsieh
dab85bdc06
tools: install manpage to share/man for FreeBSD
...
FreeBSD now install manpages to share/man/ instead of man/.
Refs: https://cgit.freebsd.org/ports/commit/?id=003a571d1d6585196545295efc181514f171c4c4
Refs: https://cgit.freebsd.org/ports/commit/?id=99ea45a72a2800fc90e98ee225a42c3e88da8602
Refs: https://cgit.freebsd.org/ports/commit/?id=94cb251581ce0b94a40dee0728884367c3a4a82d
PR-URL: https://github.com/nodejs/node/pull/51791
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-03-11 17:42:51 +00:00
Marco Ippolito
cde37e7b63
tools: automate gyp-next update
...
PR-URL: https://github.com/nodejs/node/pull/52014
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-11 10:33:57 +00:00
Cheng Zhao
6aa1d98fa5
tools: fix installing node with shared mode
...
Fix a bug caused by https://github.com/nodejs/node/pull/50737 that,
make install fails for --shared mode.
PR-URL: https://github.com/nodejs/node/pull/51910
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-01 12:20:53 +00:00
Node.js GitHub Bot
6bb7c4d916
tools: update eslint to 8.57.0
...
PR-URL: https://github.com/nodejs/node/pull/51867
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-02-27 00:48:14 +00:00
Node.js GitHub Bot
13f66c24da
crypto: update root certificates to NSS 3.98
...
This is the certdata.txt[0] from NSS 3.98, released on 2024-02-15.
This is the version of NSS that will ship in Firefox 124 on
2024-03-19.
Certificates added:
- Telekom Security TLS ECC Root 2020
- Telekom Security TLS RSA Root 2023
Certificates removed:
- Security Communication Root CA
[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_98_RTM/lib/ckfw/builtins/certdata.txt
PR-URL: https://github.com/nodejs/node/pull/51794
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-02-25 18:33:50 +00:00
Node.js GitHub Bot
cb13e52226
tools: update lint-md-dependencies to rollup@4.12.0
...
PR-URL: https://github.com/nodejs/node/pull/51795
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-02-25 11:20:08 +00:00
Node.js GitHub Bot
921b883535
tools: update lint-md-dependencies to rollup@4.12.0
...
PR-URL: https://github.com/nodejs/node/pull/51795
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-02-25 11:20:07 +00:00
Cheng Zhao
d8586db699
tools: fix missing [[fallthrough]] in js2c
...
The latest clang warns about this.
PR-URL: https://github.com/nodejs/node/pull/51845
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-02-25 08:10:00 +00:00
BuShe Pie
56ced192a1
build: remove librt libs link for Android compatibility
...
PR-URL: https://github.com/nodejs/node/pull/51632
Fixes: https://github.com/nodejs/node/issues/50184
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2024-02-25 06:39:00 +00:00
Cheng Zhao
f04abdbe3d
build: do not rely on gn_helpers in GN build
...
PR-URL: https://github.com/nodejs/node/pull/51439
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-02-23 20:49:43 +09:00
Cheng Zhao
b1468d21ee
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-02-23 16:14:42 +09:00
Joyee Cheung
72df124e38
build: encode non-ASCII Latin1 characters as one byte in JS2C
...
Previously we had two encodings for JS files:
1. If a file contains only ASCII characters, encode it as a one-byte
string (interpreted as uint8_t array during loading).
2. If a file contains any characters with code point above 127,
encode it as a two-byte string (interpreted as uint16_t array
during loading).
This was done because V8 only supports Latin-1 and UTF16 encoding
as underlying representation for strings. To store the JS code
as external strings to save encoding cost and memory overhead
we need to follow the representations supported by V8.
Notice that there is a gap in the Latin1 range (128-255) that we
encoded as two-byte, which was an undocumented TODO for a long
time. That was fine previously because then files that contained
code points beyond the 0-127 range contained code points >255.
Now we have undici which contains code points in the range 0-255
(minus a replaceable code point >255). So this patch adds handling
for the 128-255 range to reduce the size overhead caused by encoding
them as two-byte. This could reduce the size of the binary by
~500KB and helps future files with this kind of code points.
Drive-by: replace `’` with `'` in undici.js to make it a Latin-1
only string. That could be removed if undici updates itself to
replace this character in the comment.
PR-URL: https://github.com/nodejs/node/pull/51605
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2024-02-17 17:09:24 +00:00
Michaël Zasso
3f4f642ede
deps: update icu to 74.2
...
Refs: https://github.com/unicode-org/icu/releases/tag/release-74-2
PR-URL: https://github.com/nodejs/node/pull/51723
Refs: https://github.com/nodejs/node/pull/51721
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Steven R Loomis <srl295@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-02-15 19:46:30 +00:00
Michaël Zasso
1c147423d0
tools: fix update-icu.sh
...
The name of the sources MD5 file has changed.
Refs: https://github.com/unicode-org/icu/releases/tag/release-74-2
PR-URL: https://github.com/nodejs/node/pull/51723
Refs: https://github.com/nodejs/node/pull/51721
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Steven R Loomis <srl295@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-02-15 19:46:29 +00:00
Node.js GitHub Bot
a8de25ed15
tools: update lint-md-dependencies to rollup@4.10.0
...
PR-URL: https://github.com/nodejs/node/pull/51720
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-02-11 11:51:02 +00:00
Node.js GitHub Bot
8a41d9b636
tools: update github_reporter to 1.6.0
...
PR-URL: https://github.com/nodejs/node/pull/51658
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-02-06 00:46:47 +00:00
Joyee Cheung
ad0bcb9c02
vm: support using the default loader to handle dynamic import()
...
This patch adds support for using
`vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER` as
`importModuleDynamically` in all APIs that take the option
except `vm.SourceTextModule`. This allows users to have a shortcut
to support dynamic import() in the compiled code without missing
the compilation cache if they don't need customization of the
loading process. We emit an experimental warning when the
`import()` is actually handled by the default loader through
this option instead of requiring `--experimental-vm-modules`.
In addition this refactors the documentation for
`importModuleDynamically` and adds a dedicated section for it
with examples.
`vm.SourceTextModule` is not supported in this patch because
it needs additional refactoring to handle `initializeImportMeta`,
which can be done in a follow-up.
PR-URL: https://github.com/nodejs/node/pull/51244
Fixes: https://github.com/nodejs/node/issues/51154
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-02-01 11:45:42 +00:00
Node.js GitHub Bot
44476be9bf
tools: update lint-md-dependencies to rollup@4.9.6
...
PR-URL: https://github.com/nodejs/node/pull/51583
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-01-30 00:45:49 +00:00
Shi Pujin
6ae20aa63d
tools: fix loong64 build
...
PR-URL: https://github.com/nodejs/node/pull/51401
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-01-24 21:02:10 +00:00
Marco Ippolito
d8e385a5a2
tools: set normalizeTD text default to empty string
...
PR-URL: https://github.com/nodejs/node/pull/51543
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-01-24 17:39:36 +00:00
Richard Lau
6ce718df60
tools: limit parallelism with ninja in V8 builds
...
If `JOBS` has been set in the environment to limit build parallelism,
pass that onto `ninja` when building V8.
PR-URL: https://github.com/nodejs/node/pull/51473
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: Michael Dawson <midawson@redhat.com >
2024-01-17 17:56:46 +00:00
Michaël Zasso
b180512aef
tools: do not pass invalid flag to C compiler
...
`-Wno-invalid-offsetof` is only valid for C++ and GCC warns about its
usage for C.
PR-URL: https://github.com/nodejs/node/pull/51409
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-01-15 12:29:56 +01:00
Node.js GitHub Bot
4257c0870b
tools: update lint-md-dependencies to rollup@4.9.5
...
PR-URL: https://github.com/nodejs/node/pull/51460
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-01-14 11:44:40 +00:00
Kohei Ueno
d102d16e98
tools: update inspector_protocol to 83b1154
...
PR-URL: https://github.com/nodejs/node/pull/51309
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-01-11 04:41:26 +00:00
Node.js GitHub Bot
e0b159ee82
tools: update github_reporter to 1.5.4
...
PR-URL: https://github.com/nodejs/node/pull/51395
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-01-10 08:08:18 +00:00
Richard Lau
15b38fa2c1
tools: fix version parsing in brotli update script
...
Update `tools/dep_updaters/update-brotli.sh` to parse the current
version of brotli from the newer macros `BROTLI_VERSION_MAJOR`,
`BROTLI_VERSION_MINOR` and `BROTLI_VERSION_PATCH`.
PR-URL: https://github.com/nodejs/node/pull/51373
Refs: https://github.com/nodejs/node/pull/50804
Refs: https://github.com/nodejs/security-wg/issues/1181
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-01-07 15:39:22 +00:00
Node.js GitHub Bot
ad6c340416
tools: update lint-md-dependencies to rollup@4.9.4
...
PR-URL: https://github.com/nodejs/node/pull/51396
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-01-07 10:23:17 +00:00
Marco Ippolito
5d412a738a
tools: remove openssl v1 update script
...
PR-URL: https://github.com/nodejs/node/pull/51378
Fixes: https://github.com/nodejs/security-wg/issues/1182
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2024-01-07 09:07:11 +00:00
Alex Yang
921406ce71
tools: remove deprecated python api
...
PR-URL: https://github.com/nodejs/node/pull/49731
Fixes: https://github.com/nodejs/node/issues/49729
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-01-06 20:58:03 -06:00
Node.js GitHub Bot
477d6d7cd5
tools: update lint-md-dependencies to rollup@4.9.2
...
PR-URL: https://github.com/nodejs/node/pull/51320
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-01-02 00:47:40 +00:00
Michaël Zasso
07f3df4453
tools: fix dep_updaters dir updates
...
Replace directories instead of just copying to take removed files into
account.
PR-URL: https://github.com/nodejs/node/pull/51294
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-12-29 15:10:58 +00:00
cola119
f6a83cdb6f
tools: update inspector_protocol to c488ba2
...
PR-URL: https://github.com/nodejs/node/pull/51293
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-12-29 13:10:25 +00:00
cola119
02cdc95126
tools: update inspector_protocol to 9b4a4aa
...
PR-URL: https://github.com/nodejs/node/pull/51293
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-12-29 13:10:24 +00:00
cola119
323ad042b9
tools: update inspector_protocol to 2f51e05
...
PR-URL: https://github.com/nodejs/node/pull/51293
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-12-29 13:10:23 +00:00
cola119
0faa94cac8
tools: update inspector_protocol to d7b099b
...
PR-URL: https://github.com/nodejs/node/pull/51293
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-12-29 13:10:23 +00:00
cola119
5cada97466
tools: update inspector_protocol to 912eb68
...
PR-URL: https://github.com/nodejs/node/pull/51293
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-12-29 13:10:22 +00:00
cola119
ef5bac0a46
tools: update inspector_protocol to 547c5b8
...
PR-URL: https://github.com/nodejs/node/pull/51293
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-12-29 13:10:21 +00:00
cola119
39ea735091
tools: update inspector_protocol to ca525fc
...
PR-URL: https://github.com/nodejs/node/pull/51293
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-12-29 13:10:21 +00:00
Cheng Zhao
df16c69983
doc: the GN files should use Node's license
...
PR-URL: https://github.com/nodejs/node/pull/50694
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tierney Cyren <hello@bnb.im >
2023-12-28 20:27:05 +00:00
Michaël Zasso
ee61c2c6d3
build: add -flax-vector-conversions to V8 build
...
The flag is on by default in Clang and V8 recently made a change that
makes it necessary with GCC.
Refs: 7fbbf93ea8
Refs: 54067c5fbe/clang/include/clang/Basic/LangOptions.def (L133-L134)
Refs: https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-flax-vector-conversions
PR-URL: https://github.com/nodejs/node/pull/51257
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-12-24 11:24:11 +00:00
Node.js GitHub Bot
894f1d5ebf
tools: update lint-md-dependencies to rollup@4.9.1
...
PR-URL: https://github.com/nodejs/node/pull/51276
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2023-12-24 09:26:33 +00:00
Node.js GitHub Bot
7014eaca7d
tools: update lint-md-dependencies to rollup@4.9.0
...
PR-URL: https://github.com/nodejs/node/pull/51193
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-12-19 10:15:54 +00:00
Antoine du Hamel
898149fed8
doc: remove version from maintaining-dependencies.md
...
Those create unreasonable maintenance burden as updating one dependency
will conflict with another one. It's unclear we get much value out from
duplicating this information in this document, so this commit removes it
PR-URL: https://github.com/nodejs/node/pull/51195
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-12-19 10:04:25 +00:00
Gabriel Schulhof
7a216d5fd6
node-api: segregate nogc APIs from rest via type system
...
We define a new type called `node_api_nogc_env` as the `const` version
of `napi_env` and `node_api_nogc_finalize` as a variant of
`napi_finalize` that accepts a `node_api_nogc_env` as its first
argument.
We then modify those APIs which do not affect GC state as accepting a
`node_api_nogc_env`. APIs accepting finalizer callbacks are modified to
accept `node_api_nogc_finalize` callbacks. Thus, the only way to attach
a `napi_finalize` callback, wherein Node-APIs affecting GC state may be
called is to call `node_api_post_finalizer` from a
`node_api_nogc_finalize` callback.
In keeping with the process of introducing new Node-APIs, this feature
is guarded by `NAPI_EXPERIMENTAL`. Since this feature modifies APIs
already marked as stable, it is additionally guared by
`NODE_API_EXPERIMENTAL_NOGC_ENV`, so as to provide a further buffer to
adoption. Nevertheless, both guards must be removed upon releasing a
new version of Node-API.
PR-URL: https://github.com/nodejs/node/pull/50060
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2023-12-19 07:37:15 +00:00
Node.js GitHub Bot
8573146f72
tools: update eslint to 8.56.0
...
PR-URL: https://github.com/nodejs/node/pull/51194
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2023-12-19 04:38:28 +00:00