James M Snell
fb4edf70cf
quic: rework TLSContext, additional cleanups
...
PR-URL: https://github.com/nodejs/node/pull/51340
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-04-29 22:46:27 +02:00
Node.js GitHub Bot
5b52a4870a
deps: update icu to 75.1
...
PR-URL: https://github.com/nodejs/node/pull/52573
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-04-29 22:46:27 +02:00
KaKa
a93f5d4aaa
doc: correct stream.finished changes
...
PR-URL: https://github.com/nodejs/node/pull/52551
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2024-04-29 22:46:27 +02:00
Deokjin Kim
9ffdcade37
lib: use predefined variable instead of bit operation
...
PR-URL: https://github.com/nodejs/node/pull/52580
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-04-29 22:46:27 +02:00
David Benjamin
910533fcfd
crypto: simplify assertions in Safe*Print
...
Checking the X509V3_EXT_METHOD doesn't do anything. X509V3_EXT_get is
already implemented by calling X509V3_EXT_get_nid on the extension's
NID. We may as well just check the NID directly.
PR-URL: https://github.com/nodejs/node/pull/49709
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-04-29 22:46:27 +02:00
Aviv Keller
27ffa35540
doc: add RedYetiDev to triage team
...
PR-URL: https://github.com/nodejs/node/pull/52556
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
2024-04-29 22:46:27 +02:00
Rich Trott
552642a498
tools: update lint-md-dependencies
...
remark-preset-lint-node@5.0.2
rollup@4.14 .3
PR-URL: https://github.com/nodejs/node/pull/52581
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-04-29 22:46:27 +02:00
Node.js GitHub Bot
80cbe72c1f
deps: update undici to 6.13.0
...
PR-URL: https://github.com/nodejs/node/pull/52493
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-04-29 22:46:26 +02:00
Joyee Cheung
3df3afc284
module: detect ESM syntax by trying to recompile as SourceTextModule
...
Instead of using an async function wrapper, just try compiling code with
unknown module format as SourceTextModule when it cannot be compiled
as CJS and the error message indicates that it's worth a retry. If
it can be parsed as SourceTextModule then it's considered ESM.
Also, move shouldRetryAsESM() to C++ completely so that
we can reuse it in the CJS module loader for require(esm).
Drive-by: move methods that don't belong to ContextifyContext
out as static methods and move GetHostDefinedOptions to
ModuleWrap.
PR-URL: https://github.com/nodejs/node/pull/52413
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2024-04-29 22:46:26 +02:00
Joyee Cheung
a56faff4d0
src: parse inspector profiles with simdjson
...
This allows us to start the profilers before context creation
so that more samples can be collected.
PR-URL: https://github.com/nodejs/node/pull/51783
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-04-29 22:46:26 +02:00
Matteo Collina
a7e03d301a
fs: fixes recursive fs.watch crash on Linux when deleting files
...
Signed-off-by: Matteo Collina <hello@matteocollina.com >
Fixes: https://github.com/nodejs/node/issues/52018
PR-URL: https://github.com/nodejs/node/pull/52349
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-29 22:46:26 +02:00
Luigi Pinca
ed080d868d
test: ensure that all worker servers are ready
...
Wait for the `'listening'` message from all workers before creating the
first connection. This fixes an `EMFILE` error that is raised on Windows
when running the following command
```
python tools/test.py -J --repeat=1000 parallel/test-tls-ticket-cluster
```
PR-URL: https://github.com/nodejs/node/pull/52563
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-04-29 22:46:26 +02:00
Aviv Keller
e247a61d15
test_runner: add --test-skip-pattern cli option
...
PR-URL: https://github.com/nodejs/node/pull/52529
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-04-29 22:46:26 +02:00
Hüseyin Açacak
c8c61737e4
test: fix test-tls-ticket-cluster.js
...
Ensured connection end is initiated by worker (server)
Fixes: https://github.com/nodejs/node/issues/2510
PR-URL: https://github.com/nodejs/node/pull/52431
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-04-29 22:46:26 +02:00
Joyee Cheung
4d77fd2c46
module: implement NODE_COMPILE_CACHE for automatic on-disk code caching
...
This patch implements automatic on-disk code caching that can be enabled
via an environment variable NODE_COMPILE_CACHE.
When set, whenever Node.js compiles a CommonJS or a ECMAScript Module,
it will use on-disk [V8 code cache][] persisted in the specified
directory to speed up the compilation. This may slow down the first
load of a module graph, but subsequent loads of the same module graph
may get a significant speedup if the contents of the modules do not
change. Locally, this speeds up loading of
test/fixtures/snapshot/typescript.js from ~130ms to ~80ms.
To clean up the generated code cache, simply remove the directory.
It will be recreated the next time the same directory is used for
`NODE_COMPILE_CACHE`.
Compilation cache generated by one version of Node.js may not be used
by a different version of Node.js. Cache generated by different versions
of Node.js will be stored separately if the same directory is used
to persist the cache, so they can co-exist.
Caveat: currently when using this with V8 JavaScript code coverage, the
coverage being collected by V8 may be less precise in functions that are
deserialized from the code cache. It's recommended to turn this off when
running tests to generate precise coverage.
Implementation details:
There is one cache file per module on disk. The directory layout
is:
- Compile cache directory (from NODE_COMPILE_CACHE)
- 8b23c8fe: CRC32 hash of CachedDataVersionTag + NODE_VERESION
- 2ea3424d:
- 10860e5a: CRC32 hash of filename + module type
- 431e9adc: ...
- ...
Inside the cache file, there is a header followed by the actual
cache content:
```
[uint32_t] code size
[uint32_t] code hash
[uint32_t] cache size
[uint32_t] cache hash
... compile cache content ...
```
When reading the cache file, we'll also check if the code size
and code hash match the code that the module loader is loading
and whether the cache size and cache hash match the file content
read. If they don't match, or if V8 rejects the cache passed,
we'll ignore the mismatch cache, and regenerate the cache after
compilation succeeds and rewrite it to disk.
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-04-29 22:46:25 +02:00
Node.js GitHub Bot
9a44059055
deps: update zlib to 1.3.0.1-motley-7d77fb7
...
PR-URL: https://github.com/nodejs/node/pull/52516
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-04-29 22:46:25 +02:00
Debadree Chatterjee
35643c18c0
benchmark: reduce the buffer size for blob
...
PR-URL: https://github.com/nodejs/node/pull/52548
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-04-29 22:46:25 +02:00
Rich Trott
63cc2b870e
doc: fix issue detected in markdown lint update
...
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/535
PR-URL: https://github.com/nodejs/node/pull/52566
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-04-29 22:46:25 +02:00
Paolo Insogna
3c37ce5710
dns: add order option and support ipv6first
...
PR-URL: https://github.com/nodejs/node/pull/52492
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-04-29 22:46:25 +02:00
Hüseyin Açacak
18aa5d6640
test: split wasi poll test for windows
...
PR-URL: https://github.com/nodejs/node/pull/52538
Fixes: https://github.com/nodejs/node/issues/51822
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2024-04-29 22:46:25 +02:00
Jackson Tian
df61feb655
tools: fix heading spaces for osx-entitlements.plist
...
PR-URL: https://github.com/nodejs/node/pull/52561
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-29 22:46:25 +02:00
Paolo Insogna
d79ae74f71
net: add CLI option for autoSelectFamilyAttemptTimeout
...
PR-URL: https://github.com/nodejs/node/pull/52474
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-04-29 22:46:25 +02:00
IlyasShabi
ac04c6434a
src: remove regex usage for env file parsing
...
PR-URL: https://github.com/nodejs/node/pull/52406
Fixes: https://github.com/nodejs/node/issues/52248
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-04-29 22:46:24 +02:00
mathis-west-1
f283d27285
src: fix loadEnvFile ENOENT error
...
Before this change the error message for `process.loadEnvFile()` without
an `.env` file present in the current working directory was looking like
this: `ENOENT: .env, Failed to load '%s'.` This obviously isn't what the
author intended.
To fix that, just return a "plain" ENOENT open error. It should be
descriptive enough. That means for the above example, the error message
is now `ENOENT: no such file or directory, open '.env'`.
PR-URL: https://github.com/nodejs/node/pull/52438
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-04-29 22:46:24 +02:00
Joyee Cheung
9794d21b07
module: fix submodules loaded by require() and import()
...
Previously there is an edge case where submodules loaded by require()
may not be loaded by import() again from different intermediate
edges in the graph. This patch fixes that, added tests, and added
debug logs.
Drive-by: make loader a private field so it doesn't show up in logs.
PR-URL: https://github.com/nodejs/node/pull/52487
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-04-29 22:46:24 +02:00
Node.js GitHub Bot
d67a9a5360
deps: update minimatch to 9.0.4
...
PR-URL: https://github.com/nodejs/node/pull/52524
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-29 22:46:24 +02:00
Node.js GitHub Bot
6b4bbfbb1f
tools: update lint-md-dependencies to rollup@4.14.2 vfile-reporter@8.1.1
...
PR-URL: https://github.com/nodejs/node/pull/52518
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-29 22:46:24 +02:00
Moshe Atlow
7e93c4892b
doc: update test runner coverage limitations
...
PR-URL: https://github.com/nodejs/node/pull/52515
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2024-04-29 22:46:24 +02:00
Niels Martignène
1fca8baac1
node-api: copy external type tags when they are set
...
In order to adapt to V8 changes regarding storing private
properties on Externals, ExternalWrapper objects were introduced
in #51149 .
However, this new code stores the type tag pointer and not the
128-bit value inside. This breaks some pre-existing code that
were making temporary tags. It also means that unloading the module
will cause existing External objects to have a tag pointer that
points nowhere (use-after-free bug).
Change ExternalWrapper to store tags by value to fix this regression.
PR-URL: https://github.com/nodejs/node/pull/52426
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2024-04-29 22:46:24 +02:00
Michaël Zasso
4e5ce3afb7
tools: use stylistic ESLint plugin for formatting
...
Refs: https://eslint.org/blog/2023/10/deprecating-formatting-rules/
PR-URL: https://github.com/nodejs/node/pull/50714
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2024-04-29 22:46:23 +02:00
Alex Yang and Colin Ihrig
e066ba2ae4
test_runner: better error handing for test hook
...
Co-authored-by: Colin Ihrig <cjihrig@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/52401
Fixes: https://github.com/nodejs/node/issues/52399
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2024-04-29 22:46:23 +02:00
Sinan Sonmez (Chaush)
e34e0a9ba1
test: write tests for assertIsArray http2 util
...
PR-URL: https://github.com/nodejs/node/pull/52511
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-04-29 22:46:23 +02:00
Marco Ippolito
15c5686381
tools: update minimatch index path
...
PR-URL: https://github.com/nodejs/node/pull/52523
Fixes: https://github.com/nodejs/node/issues/52520
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-29 22:46:23 +02:00
Aviv Keller
dc399ddd03
lib, doc: rename readme.md to README.md
...
PR-URL: https://github.com/nodejs/node/pull/52471
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-04-29 22:46:23 +02:00
Node.js GitHub Bot
e70d8a4fa9
meta: move one or more collaborators to emeritus
...
PR-URL: https://github.com/nodejs/node/pull/52457
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ash Cripps <email@ashleycripps.co.uk >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
2024-04-29 22:46:23 +02:00
cjihrig
328755341d
test_runner: don't exceed call stack when filtering
...
This commit updates filteredRun() to call postRun() after a
microtask instead of synchronously. Currently, if approximately
1,545 subtests are filtered, enough synchronous calls can be
made to cause a call stack exceeded exception.
PR-URL: https://github.com/nodejs/node/pull/52488
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-29 22:46:22 +02:00
cjihrig
b4ccb6c626
test_runner: move end of work check to finalize()
...
This commit moves the end of work check from postRun() to
finalize(). The reasoning is that finalize() is guaranteed to
run in the order that the tests are defined, while postRun() is
not. This makes the check a little simpler.
PR-URL: https://github.com/nodejs/node/pull/52488
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-29 22:46:22 +02:00
Jacob Smith
b00766d9e7
module: tidy code and comments
...
PR-URL: https://github.com/nodejs/node/pull/52437
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
2024-04-29 22:46:22 +02:00
Ali Hassan
7cdfe8a3fc
benchmark: inherit stdio/stderr instead of pipe
...
PR-URL: https://github.com/nodejs/node/pull/52456
Fixes: https://github.com/nodejs/node/issues/52233
Refs: https://github.com/nodejs/performance/pull/161
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
2024-04-29 22:46:22 +02:00
Ali Hassan
7b82c17f22
benchmark: add ipc support to spawn stdio config
...
Enabled inter-process communication (ipc) in the stdio configuration
of the spawn function within the benchmark subsystem.
This change allows for improved data exchange between parent
and benchmarked child processes, addressing limitations in performance
testing scenarios.
Fixes: https://github.com/nodejs/node/issues/52233
Refs: https://github.com/nodejs/performance/pull/161
PR-URL: https://github.com/nodejs/node/pull/52456
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
2024-04-29 22:46:22 +02:00
Jungku Lee
dfda6fed61
buffer: add missing ARG_TYPE(ArrayBuffer) for isUtf8
...
PR-URL: https://github.com/nodejs/node/pull/52477
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-04-29 22:46:22 +02:00
Antoine du Hamel
8ae1507ae1
tools: add a linter for README lists
...
PR-URL: https://github.com/nodejs/node/pull/52476
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2024-04-29 22:46:22 +02:00
Ali Hassan
9b18df9dcb
url: implement parse method for safer URL parsing
...
Implement the static parse method as per the WHATWG URL specification.
Unlike the URL constructor, URL.parse does not throw on invalid input,
instead returning null. This behavior allows safer parsing of URLs
without the need for try-catch blocks around constructor calls. The
implementation follows the steps outlined in the WHATWG URL standard,
ensuring compatibility and consistency with web platform URL parsing
APIs.
Fixes: https://github.com/nodejs/node/issues/52208
Refs: https://github.com/whatwg/url/pull/825
PR-URL: https://github.com/nodejs/node/pull/52280
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-04-29 22:46:22 +02:00
Victor Chen
fdcde845ee
lib: refactor lazy loading of undici for fetch method
...
Object.defineProperty is updated to lazily load the undici dependency
for the fetch method. This change allows for simpler and more reliable
mocking of the fetch method for testing purposes, resolving issues
encountered with premature method invocation during testing.
Fixes: https://github.com/nodejs/node/issues/52015
PR-URL: https://github.com/nodejs/node/pull/52275
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2024-04-29 22:46:21 +02:00
Chengzhong Wu
f6145aa2ca
lib: convert WeakMaps in cjs loader with private symbol properties
...
Symbol properties are typically more GC-efficient than using WeakMaps,
since WeakMap requires ephemeron GC. `module[kModuleExportNames]`
would be easier to read than `importedCJSCache.get(module).exportNames`
as well.
PR-URL: https://github.com/nodejs/node/pull/52095
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-04-29 22:46:21 +02:00
Yagiz Nizipli and Daniel Lemire
44ee04cf9f
buffer: improve base64 and base64url performance
...
Co-authored-by: Daniel Lemire <daniel@lemire.me >
PR-URL: https://github.com/nodejs/node/pull/52428
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-04-29 22:46:21 +02:00
npm CLI robot
8738b89971
deps: upgrade npm to 10.5.2
...
PR-URL: https://github.com/nodejs/node/pull/52458
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-04-29 22:46:21 +02:00
Shelley Vohr
61e1ac0b8c
crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL
...
PR-URL: https://github.com/nodejs/node/pull/52217
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-04-29 22:46:21 +02:00
Aviv Keller
014bf01efc
lib: replace string prototype usage with alternatives
...
PR-URL: https://github.com/nodejs/node/pull/52440
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-04-29 22:46:11 +02:00
RafaelGSS
95c515eddf
Working on v22.0.1
...
PR-URL: https://github.com/nodejs/node/pull/52505
2024-04-24 15:16:11 -03:00