Maël Nison
b7d836e2c7
lib: reset the cwd cache before execution
...
PR-URL: https://github.com/nodejs/node/pull/49684
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2023-09-21 16:56:33 +00:00
Daniel X Moore
f7414a8b8e
repl: don't accumulate excess indentation in .load
...
When using .load the REPL would accumulate indentation with each line
including the indentation from all previous lines. Now it keeps the
indentation at the correct level.
Fixes: https://github.com/nodejs/node/issues/47673
PR-URL: https://github.com/nodejs/node/pull/49461
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
2023-09-21 13:37:41 +00:00
Antoine du Hamel
20b996dcf1
esm: fix return type of import.meta.resolve
...
PR-URL: https://github.com/nodejs/node/pull/49698
Fixes: https://github.com/nodejs/node/issues/49695
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2023-09-20 10:09:15 +00:00
Raz Luvaton
346abdd060
stream: improve readable webstream pipeTo
...
PR-URL: https://github.com/nodejs/node/pull/49690
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-09-19 19:22:06 +00:00
Geoffrey Booth
f91b4e2bf0
esm: update loaders warning
...
PR-URL: https://github.com/nodejs/node/pull/49633
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2023-09-19 03:59:50 +00:00
Geoffrey Booth
7517c9f95b
module, esm: jsdoc for modules files
...
PR-URL: https://github.com/nodejs/node/pull/49523
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-09-19 02:48:24 +00:00
Raz Luvaton
5c39ee6f87
stream: improve webstream readable async iterator performance
...
PR-URL: https://github.com/nodejs/node/pull/49662
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-09-18 14:17:39 +00:00
Antoine du Hamel
ccca547e28
util: runtime deprecate promisify-ing a function returning a Promise
...
PR-URL: https://github.com/nodejs/node/pull/49609
Fixes: https://github.com/nodejs/node/issues/49607
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-09-18 10:29:13 +00:00
Joyee Cheung
07e8539347
bootstrap: do not expand argv1 for snapshots
...
To avoid capturing build machine states into the snapshot
PR-URL: https://github.com/nodejs/node/pull/49506
Fixes: https://github.com/nodejs/node/issues/49501
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-09-18 00:06:20 +02:00
Yagiz Nizipli
7e12d0e16d
fs: improve error performance of sync methods
...
PR-URL: https://github.com/nodejs/node/pull/49593
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2023-09-17 20:42:46 +00:00
Antoine du Hamel
56ecf29283
esm: fix support for URL instances in register
...
PR-URL: https://github.com/nodejs/node/pull/49655
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-09-17 00:48:48 +00:00
Uzlopak
db8217b1bf
errors: improve classRegExp in errors.js
...
PR-URL: https://github.com/nodejs/node/pull/49643
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-09-16 01:36:48 +00:00
Geoffrey Booth
f42a103991
esm: require braces for modules code
...
PR-URL: https://github.com/nodejs/node/pull/49657
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-09-15 19:18:13 +00:00
Daniel Compton
6a489df73b
esm: clarify ERR_REQUIRE_ESM errors
...
In #39175 , better ESM errors were introduced. This commit tweaks the
language in the error slightly to make it clear that there are three
different options to resolve the error.
Refs: https://github.com/nodejs/node/pull/39175
PR-URL: https://github.com/nodejs/node/pull/49521
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2023-09-15 05:13:54 +00:00
Joyee Cheung
bc9a875c99
module: use symbol in WeakMap to manage host defined options
...
Previously when managing the importModuleDynamically callback of
vm.compileFunction(), we use an ID number as the host defined option
and maintain a per-Environment ID -> CompiledFnEntry map to retain
the top-level referrer function returned by vm.compileFunction() in
order to pass it back to the callback, but it would leak because with
how we used v8::Persistent to maintain this reference, V8 would not
be able to understand the cycle and would just think that the
CompiledFnEntry was supposed to live forever. We made an attempt
to make that reference known to V8 by making the CompiledFnEntry weak
and using a private symbol to make CompiledFnEntry strongly
references the top-level referrer function in
https://github.com/nodejs/node/pull/46785 , but that turned out to be
unsound, because the there's no guarantee that the top-level function
must be alive while import() can still be initiated from that
function, since V8 could discard the top-level function and only keep
inner functions alive, so relying on the top-level function to keep
the CompiledFnEntry alive could result in use-after-free which caused
a revert of that fix.
With this patch we use a symbol in the host defined options instead of
a number, because with the stage-3 symbol-as-weakmap-keys proposal
we could directly use that symbol to keep the referrer alive using a
WeakMap. As a bonus this also keeps the other kinds of referrers
alive as long as import() can still be initiated from that
Script/Module, so this also fixes the long-standing crash caused by
vm.Script being GC'ed too early when its importModuleDynamically
callback still needs it.
PR-URL: https://github.com/nodejs/node/pull/48510
Refs: https://github.com/nodejs/node/issues/44211
Refs: https://github.com/nodejs/node/issues/42080
Refs: https://github.com/nodejs/node/issues/47096
Refs: https://github.com/nodejs/node/issues/43205
Refs: https://github.com/nodejs/node/issues/38695
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2023-09-14 15:42:24 +00:00
Moshe Atlow
22907ce366
test_runner: add junit reporter
...
PR-URL: https://github.com/nodejs/node/pull/49614
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-09-14 08:43:53 +00:00
Caio Borghi
4efa3744a0
test_runner: add jsdocs to mock.js
...
PR-URL: https://github.com/nodejs/node/pull/49555
Reviewed-By: Erick Wendel <erick.workspace@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-09-14 04:24:39 +00:00
Uzlopak
4e01842943
net: improve performance of isIPv4 and isIPv6
...
PR-URL: https://github.com/nodejs/node/pull/49568
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-09-13 20:01:36 +00:00
LiviaMedeiros
f5bb2c7d20
tools: restrict internal code from using public url module
...
PR-URL: https://github.com/nodejs/node/pull/49590
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-09-13 18:03:15 +00:00
LiviaMedeiros
2a0e5de163
debugger: use internal/url.URL instead of url.parse
...
PR-URL: https://github.com/nodejs/node/pull/49590
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-09-13 18:03:14 +00:00
Antoine du Hamel
d3e0331953
errors: use determineSpecificType in more error messages
...
PR-URL: https://github.com/nodejs/node/pull/49580
Fixes: https://github.com/nodejs/node/issues/49576
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2023-09-11 23:18:58 +00:00
William Marlow
d8b378cb3f
fs: fix readdir and opendir recursive with unknown file types
...
If the libuv operations invoked by `readdir`/`opendir` return
`uv_dirent_t` values where the `type` is `UV_DIRENT_UNKNOWN` then a
further `lstat` is issued to fully construct the `Dirent` values. In the
recursive versions of these functions, the `path` parameter was
incorrectly assumed to be the path to the entry when it should be the
path to the directory containing the entry.
Fixes #49499 .
PR-URL: https://github.com/nodejs/node/pull/49603
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-09-11 19:08:08 +00:00
Raz Luvaton
a7fe8b042a
stream: improve tee perf by reduce ReflectConstruct usages
...
also added more webstream creation benchmarks
PR-URL: https://github.com/nodejs/node/pull/49546
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-09-11 07:45:11 +00:00
Deokjin Kim
b3fc9173ed
lib: use internal fileURLToPath
...
For internal usage, `internal/url` should be used.
Refs: https://github.com/nodejs/node/pull/49553
PR-URL: https://github.com/nodejs/node/pull/49558
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-09-10 14:57:37 +00:00
Livia Medeiros
afea87ee14
lib: use internal pathToFileURL
...
PR-URL: https://github.com/nodejs/node/pull/49553
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-09-10 10:27:37 +00:00
Jacob Smith
705e623ac4
esm: remove globalPreload hook (superseded by initialize)
...
PR-URL: https://github.com/nodejs/node/pull/49144
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-09-10 04:32:36 +00:00
Antoine du Hamel
5bb0cb2660
typings: fix missing property in ExportedHooks
...
PR-URL: https://github.com/nodejs/node/pull/49567
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-09-09 20:06:29 +00:00
Antoine du Hamel
b64c3ee6cb
esm: remove return value for Module.register
...
The current API shape si not great because it's too limited and
redundant with the use of `MessagePort`.
PR-URL: https://github.com/nodejs/node/pull/49529
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-09-09 12:44:28 +00:00
Antoine du Hamel
fdc65d9769
esm: fix loading of CJS modules from ESM
...
PR-URL: https://github.com/nodejs/node/pull/49500
Fixes: https://github.com/nodejs/node/issues/49497
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-09-06 10:12:14 +00:00
Milan Burda
cfe4166f0f
lib: check SharedArrayBuffer availability in freeze_intrinsics.js
...
PR-URL: https://github.com/nodejs/node/pull/49482
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-09-06 09:19:29 +00:00
Jithil P Ponnan
54021850f9
process: add custom dir support for heapsnapshot-signal
...
PR-URL: https://github.com/nodejs/node/pull/47854
Refs: https://github.com/nodejs/node/issues/47842
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Erick Wendel <erick.workspace@gmail.com >
2023-09-05 15:13:01 -07:00
Erick Wendel
a61bc9d933
test_runner: fix invalid timer call
...
Signed-off-by: Erick Wendel <erick.workspace@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/49477
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-09-05 21:17:28 +00:00
Erick Wendel
f139cc3ee8
test_runner: add jsdocs to MockTimers
...
Signed-off-by: Erick Wendel <erick.workspace@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/49476
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-09-05 16:53:07 +00:00
Moshe Atlow
47c5152545
test_runner: fix typescript coverage
...
PR-URL: https://github.com/nodejs/node/pull/49406
Fixes: https://github.com/nodejs/node/issues/49398
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-09-04 21:45:07 +00:00
Deokjin Kim
c8628ed1cf
tls: remove redundant code in onConnectSecure()
...
Remove redundant code by moving it to outside of `if/else`.
PR-URL: https://github.com/nodejs/node/pull/49457
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2023-09-04 10:55:34 +00:00
Erick Wendel
8e82cfcbb3
test_runner: preserve original property descriptor
...
PR-URL: https://github.com/nodejs/node/pull/49433
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-09-03 19:08:26 +00:00
Deokjin Kim
0add7a8f0c
tls: refactor to use validateFunction
...
Use validateFunction to remove duplicate implementation.
Plus, remove `assert()` statement because validateFunction
has the same purpose.
PR-URL: https://github.com/nodejs/node/pull/49422
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-09-02 16:10:09 +00:00
Filip Skokan
457cedda9d
crypto: remove webcrypto EdDSA key checks and properties
...
As per https://github.com/WICG/webcrypto-secure-curves/pull/24
PR-URL: https://github.com/nodejs/node/pull/49408
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-09-01 12:00:16 +00:00
Tim Perry
048e0bec51
tls: ensure TLS Sockets are closed if the underlying wrap closes
...
This fixes a potential segfault, among various other likely-related
issues, which all occur because TLSSockets were not informed if their
underlying stream was closed in many cases.
This also significantly modifies an existing TLS test. With this change
in place, that test no longer works, as it tries to mess with internals
to trigger a race, and those internals are now cleaned up earlier. This
test has been simplified to a more general TLS shutdown test.
PR-URL: https://github.com/nodejs/node/pull/49327
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2023-09-01 07:00:05 +00:00
LiviaMedeiros
57e78bc9ef
url: validate pathToFileURL(path) argument as string
...
PR-URL: https://github.com/nodejs/node/pull/49161
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-08-31 20:35:04 +08:00
Tim Perry
47add7eb85
net: use asserts in JS Socket Stream to catch races in future
...
PR-URL: https://github.com/nodejs/node/pull/49400
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-31 12:26:40 +00:00
Tim Perry
dcf6670783
net: fix crash due to simultaneous close/shutdown on JS Stream Sockets
...
A JS stream socket wraps a stream, exposing it as a socket for something
on top which needs a socket specifically (e.g. an HTTP server).
If the internal stream is closed in the same tick as the layer on top
attempts to close this stream, the race between doShutdown and doClose
results in an uncatchable exception. A similar race can happen with
doClose and doWrite.
It seems legitimate these can happen in parallel, so this resolves that
by explicitly detecting and handling that situation: if a close is in
progress, both doShutdown & doWrite allow doClose to run
finishShutdown/Write for them, cancelling the operation, without trying
to use this._handle (which will be null) in the meantime.
PR-URL: https://github.com/nodejs/node/pull/49400
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-31 12:26:39 +00:00
Erick Wendel
c750049318
test_runner: add support for setImmediate
...
PR-URL: https://github.com/nodejs/node/pull/49397
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-08-31 06:42:03 +00:00
Phil Nash
3a6a80a4e1
test_runner: report covered lines, functions and branches to reporters
...
This is a breaking change for the format of test:coverage events. But
the test coverage is still experimental, so I don't believe it requires
a semver-major bump.
Fixes https://github.com/nodejs/node/issues/49303
PR-URL: https://github.com/nodejs/node/pull/49320
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-08-30 20:22:45 +00:00
Tobias Nießen
5a0777776d
crypto: do not overwrite _writableState.defaultEncoding
...
This only affects the writable side of LazyTransform and should not
change the behavior of any LazyTransform streams (Cipher, Decipher,
Cipheriv, Decipheriv, Hash, Hmac).
If the user does not set defaultEncoding when creating a transform
stream, WritableState uses 'utf8' by default. Only LazyTransform
overwrites this with 'buffer' for strict backward compatibility. This
was necessary when crypto.DEFAULT_ENCODING still existed. Now that
DEFAULT_ENCODING has been removed, defaultEncoding is always 'buffer'.
The writable side of LazyTransform appears to treat 'utf8' and 'buffer'
in exactly the same way. Therefore, there seems to be no need to
overwrite _writableState.defaultEncoding at this point.
Nevertheless, because Node.js has failed to hide implementation details
such as _writableState from the ecosystem, we may want to consider this
a breaking change.
Refs: https://github.com/nodejs/node/pull/47182
Refs: https://github.com/nodejs/node/pull/8611
PR-URL: https://github.com/nodejs/node/pull/49140
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-08-27 14:12:29 +00:00
Yeseul Lee
76e659a103
fs: add the options param description in openAsBlob()
...
PR-URL: https://github.com/nodejs/node/pull/49308
Refs: https://github.com/nodejs/node/blob/main/doc/api/fs.md#fsopenasblobpath-options
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-26 14:48:59 +00:00
Khafra
4ba7370650
stream: use Buffer.from when constructor is a Buffer
...
When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use `Buffer.from` over `new ctor`.
Fixes https://github.com/nodejs/node/issues/49245
PR-URL: https://github.com/nodejs/node/pull/49250
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-08-26 11:43:58 +00:00
Antoine du Hamel
69f7583ee5
policy: fix path to URL conversion
...
PR-URL: https://github.com/nodejs/node/pull/49133
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-08-26 05:45:13 +00:00
Deokjin Kim
c5cad08476
fs: remove redundant code in readableWebStream()
...
Remove redundant code by moving it to outside of `if/else`. Plus,
make `options` optional in doc.
PR-URL: https://github.com/nodejs/node/pull/49298
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-25 15:23:15 +00:00
Raz Luvaton and Robert Nagy
b0f423390f
stream: add highWaterMark for the map operator
...
this is done so we don't wait for the first items to
finish before starting new ones
Fixes: https://github.com/nodejs/node/issues/46132
Co-authored-by: Robert Nagy <ronagy@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/49249
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2023-08-24 12:11:21 +00:00