Commit Graph

42752 Commits

Author SHA1 Message Date
Marco Ippolito
4379dfb1fd
http: add diagnostic channel http.client.request.created
PR-URL: https://github.com/nodejs/node/pull/55586
Fixes: https://github.com/nodejs/node/issues/55352
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
2024-10-31 13:04:25 +00:00
Tobias Nießen
a465b206d7
sqlite: add readOnly option
Allow opening existing SQLite databases with SQLITE_OPEN_READONLY set.

PR-URL: https://github.com/nodejs/node/pull/55567
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-10-31 11:41:14 +00:00
Charles Kerr
996708042b
src: use NewFromUtf8Literal in NODE_DEFINE_CONSTANT
Small efficiency improvement over NewFromUtf8(): the literal's
length is known at compile time, so V8 doesn't have to call
strlen() or ToLocalChecked().

PR-URL: https://github.com/nodejs/node/pull/55581
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-10-31 04:48:58 +00:00
Aviv Keller
8807549ed9
dns: stop using deprecated ares_query
PR-URL: https://github.com/nodejs/node/pull/55430
Refs: https://github.com/nodejs/node/issues/52464
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-30 14:10:28 +00:00
Aviv Keller
26dae592bd
doc: capitalize "MIT License"
PR-URL: https://github.com/nodejs/node/pull/55575
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-10-30 13:33:04 +00:00
Julian Gassner
6dea41d2f7
test: split up test-runner-mock-timers test
PR-URL: https://github.com/nodejs/node/pull/55506
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-10-30 02:10:30 +00:00
Michael Cho
81517facea
build: fix building with system icu 76
ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
add `icu-uc` when linking to shared libraries. This results in undefined
symbols/references when trying to build with system ICU 76.

[^1]: unicode-org/icu@199bc82

PR-URL: https://github.com/nodejs/node/pull/55563
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-29 23:24:38 +00:00
Luigi Pinca
84fe809535
test: remove unneeded listeners
Unhandled `'error'` events will make the process exit with an unclean
exit code anyway.

PR-URL: https://github.com/nodejs/node/pull/55486
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-29 21:52:09 +00:00
Joyee Cheung
8aac7da7d6
module: fix error thrown from require(esm) hitting TLA repeatedly
This tracks the asynchronicity in the ModuleWraps when they turn out to
contain TLA after instantiation, and throw the right error
(ERR_REQUIRE_ASYNC_MODULE) when it's required again. It removes
the freezing of ModuleWraps since it's not meaningful to freeze
this when the rest of the module loader is mutable, and we
can record the asynchronicity in the ModuleWrap right after
compilation after we get a V8 upgrade that contains
v8::Module::HasTopLevelAwait() instead of searching through
the module graph repeatedly which can be slow.

PR-URL: https://github.com/nodejs/node/pull/55520
Fixes: https://github.com/nodejs/node/issues/55516
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2024-10-29 21:15:19 +00:00
Joyee Cheung
3b3a95ac0c module: trim off internal stack frames for require(esm) warnings
Trim off irrelevant internal stack frames for require(esm) warnings
so it's easier to locate where the call comes from when
--trace-warnings is used.

PR-URL: https://github.com/nodejs/node/pull/55496
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2024-10-29 18:29:27 +01:00
Richard Lau
4354a1de0e
2024-10-29, Version 22.11.0 'Jod' (LTS)
Notable changes:

This release marks the transition of Node.js 22.x into Long Term Support (LTS)
with the codename 'Jod'. The 22.x release line now moves into "Active LTS"
and will remain so until October 2025. After that time, it will move into
"Maintenance" until end of life in April 2027.

Other than updating metadata, such as the `process.release` object, to reflect
that the release is LTS, no further changes from Node.js 22.10.0 are included.

PR-URL: https://github.com/nodejs/node/pull/55504
2024-10-29 13:39:57 +00:00
Yagiz Nizipli
e160e54b63
src: do not run IsWindowsBatchFile on non-windows
PR-URL: https://github.com/nodejs/node/pull/55560
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2024-10-29 12:10:17 +00:00
Node.js GitHub Bot
ece37bc88c
deps: update nghttp2 to 1.64.0
PR-URL: https://github.com/nodejs/node/pull/55559
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-10-29 02:11:33 +00:00
Node.js GitHub Bot
21d6f53329
deps: update acorn to 8.13.0
PR-URL: https://github.com/nodejs/node/pull/55558
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-10-29 01:36:48 +00:00
Aviv Keller
45c6a9e1f6
src: migrate String::Value to String::ValueView
Fixes #54417
Ref: #55452

PR-URL: https://github.com/nodejs/node/pull/55458
Refs: https://github.com/nodejs/node/issues/55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-29 00:32:26 +00:00
Robert Nagy
5633c62219
http: don't emit error after destroy
PR-URL: https://github.com/nodejs/node/pull/55457
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-28 12:57:58 +00:00
Joyee Cheung
7cb3a662da
module: allow ESM that failed to be required to be re-imported
When a ESM module cannot be loaded by require due to the presence
of TLA, its module status would be stopped at kInstantiated. In
this case, when it's imported again, we should allow it to be
evaluated asynchronously, as it's also a common pattern for users
to retry with dynamic import when require fails.

PR-URL: https://github.com/nodejs/node/pull/55502
Fixes: https://github.com/nodejs/node/issues/55500
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-28 12:21:22 +00:00
Shelley Vohr
4b48f9b633
build: fix GN arg used in generate_config_gypi.py
PR-URL: https://github.com/nodejs/node/pull/55530
Reviewed-By: Cheng Zhao <zcbenz@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-28 09:27:31 +00:00
Antoine du Hamel
7270f84596
fs: make dirent.path writable
PR-URL: https://github.com/nodejs/node/pull/55547
Refs: https://github.com/nodejs/node/issues/55538
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-28 08:33:39 +00:00
Marco Ippolito
2a965493a9
doc: move typescript support to active development
PR-URL: https://github.com/nodejs/node/pull/55536
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-10-27 14:35:11 +00:00
Marco Ippolito
bca53e8421
doc: add suggested tsconfig for type stripping
PR-URL: https://github.com/nodejs/node/pull/55534
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2024-10-27 13:52:50 +00:00
Shelley Vohr
c35cbcde4b
build: fix GN build for sqlite and nghttp2
PR-URL: https://github.com/nodejs/node/pull/55529
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Cheng Zhao <zcbenz@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-27 09:21:39 +00:00
Antoine du Hamel
5d4fee8975
test: increase coverage of pathToFileURL
PR-URL: https://github.com/nodejs/node/pull/55493
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2024-10-27 02:21:26 +00:00
Alfredo González
51eb4c0cda
doc: add esm examples to node:string_decoder
PR-URL: https://github.com/nodejs/node/pull/55507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-26 20:36:25 +00:00
Livia Medeiros
5e27e595fb
test: avoid apply() calls with large amount of elements
PR-URL: https://github.com/nodejs/node/pull/55501
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-26 20:27:20 +00:00
Node.js GitHub Bot
f0e5b6a34a
deps: update undici to 6.20.1
PR-URL: https://github.com/nodejs/node/pull/55503
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-26 18:52:23 +00:00
Filip Skokan
c63255b0c0
test,crypto: update WebCryptoAPI WPT
PR-URL: https://github.com/nodejs/node/pull/55512
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-26 07:41:27 +00:00
Tobias Nießen
0668e64cea
sqlite: refactor open options
Move options that are only relevant for opening the database into a
self-contained class.

PR-URL: https://github.com/nodejs/node/pull/55442
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-10-26 00:22:07 +00:00
Jacob Smith
e312d60e3f
module: add findPackageJSON util
PR-URL: https://github.com/nodejs/node/pull/55412
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-25 20:40:54 +00:00
Juan José
1ba8fbe4b8
test: increase test coverage for http.OutgoingMessage.appendHeader()
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55467
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-10-25 17:39:45 +00:00
Jason Zhang
2505e217bb doc: add jazelly to collaborators
PR-URL: https://github.com/nodejs/node/pull/55531
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-25 20:59:23 +10:30
Antoine du Hamel
7ddd2c2282
2024-10-24, Version 23.1.0 (Current)
Notable changes:

assert:
  * (SEMVER-MINOR) make `assertion_error` use Myers diff algorithm (Giovanni Bucci) https://github.com/nodejs/node/pull/54862
buffer:
  * (SEMVER-MINOR) make `Buffer` work with resizable `ArrayBuffer` (James M Snell) https://github.com/nodejs/node/pull/55377
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) https://github.com/nodejs/node/pull/55333
lib:
  * (SEMVER-MINOR) add `UV_UDP_REUSEPORT` for udp (theanarkh) https://github.com/nodejs/node/pull/55403
net:
  * (SEMVER-MINOR) add `UV_TCP_REUSEPORT` for tcp (theanarkh) https://github.com/nodejs/node/pull/55408
test_runner:
  * mark `MockTimers` as stable (Erick Wendel) https://github.com/nodejs/node/pull/55398

PR-URL: https://github.com/nodejs/node/pull/55513
2024-10-24 23:26:25 +02:00
Marco Ippolito
53b1050e6f
module: add module.stripTypeScriptTypes
PR-URL: https://github.com/nodejs/node/pull/55282
Fixes: https://github.com/nodejs/node/issues/54300
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-10-24 18:27:58 +00:00
Shelley Vohr
cbb72ebfa7
test,crypto: make crypto tests work with BoringSSL
PR-URL: https://github.com/nodejs/node/pull/55491
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2024-10-24 13:37:15 +00:00
Chengzhong Wu
7b5d660bb1 test: add repl preview timeout test
PR-URL: https://github.com/nodejs/node/pull/55484
Refs: f915fa4c9f
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-23 13:11:07 +00:00
Chengzhong Wu
f630fde68b deps: V8: cherry-pick f915fa4c9f41
Original commit message:

    [osr] Ensure trying to osr does not skip loop interrupts

    Fixed: 374013413
    Change-Id: I52d7b4e165e0abd0bd517a81d2e8ef3f1f802bfb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5946288
    Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
    Auto-Submit: Olivier Flückiger <olivf@chromium.org>
    Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96708}

Refs: f915fa4c9f
PR-URL: https://github.com/nodejs/node/pull/55484
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-23 13:11:06 +00:00
adriancuadrado
c1bbd63458
doc: changed the command used to verify SHASUMS256
PR-URL: https://github.com/nodejs/node/pull/55420
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-10-23 12:06:41 +00:00
Pietro Marchini
025d8ada5f
lib: ensure FORCE_COLOR forces color output in non-TTY environments
PR-URL: https://github.com/nodejs/node/pull/55404
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-23 06:51:50 +00:00
Cheng
e90704cd9e
build: fix GN build for cares/uv deps
PR-URL: https://github.com/nodejs/node/pull/55477
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-10-23 03:48:59 +00:00
Joyee Cheung
f6cfdb918e
doc: move dual package shipping docs to separate repo
Refs: https://github.com/nodejs/admin/issues/917
Refs: https://github.com/nodejs/package-examples/pull/1
Refs: https://github.com/nodejs/node/pull/54648
PR-URL: https://github.com/nodejs/node/pull/55444
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-10-22 20:14:50 +00:00
Joyee Cheung
dacbfb1657
module: include module information in require(esm) warning
When emitting the experimental warning for `require(esm)`, include
information about the parent module and the module being require()-d
to help users locate and update them.

PR-URL: https://github.com/nodejs/node/pull/55397
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-10-22 16:51:45 +00:00
Marvin ROGER
4a00f9a1c4
stream: propagate AbortSignal reason
PR-URL: https://github.com/nodejs/node/pull/55473
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-22 16:14:02 +00:00
Antoine du Hamel
603e55d94d
esm: add a fallback when importer in not a file
PR-URL: https://github.com/nodejs/node/pull/55471
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-10-22 18:09:32 +02:00
Shelley Vohr
d448368342
test: make test-node-output-v8-warning more flexible
PR-URL: https://github.com/nodejs/node/pull/55401
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-10-22 13:53:42 +00:00
Node.js GitHub Bot
90b5a2e308
tools: update lint-md-dependencies
- @rollup/plugin-commonjs@28.0.1
- @rollup/plugin-node-resolve@15.3.0
- remark-preset-lint-node@5.1.2
- rollup@4.24.0

PR-URL: https://github.com/nodejs/node/pull/55470
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-10-22 12:55:44 +00:00
Node.js GitHub Bot
a3693d2c49
tools: update gyp-next to 0.18.3
PR-URL: https://github.com/nodejs/node/pull/55464
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-10-22 12:37:29 +00:00
Aviv Keller
7ae73b90d4
fs: pass correct path to DirentFromStats during glob
PR-URL: https://github.com/nodejs/node/pull/55071
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2024-10-22 11:38:09 +00:00
Wuli Zuo
864ff620da
typings: add missing type of ArrayBufferPrototypeGetByteLength
PR-URL: https://github.com/nodejs/node/pull/55439
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-22 08:25:12 +00:00
Antoine du Hamel
47ad609d64
test: fix addons and node-api test assumptions
PR-URL: https://github.com/nodejs/node/pull/55441
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-22 07:49:19 +00:00
devstone
eb63cd24d2
test: update wpt test for webmessaging/broadcastchannel
PR-URL: https://github.com/nodejs/node/pull/55205
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-22 06:47:26 +00:00