Rich Trott
73d2d90122
policy: add missing JSDoc @param entry
...
PR-URL: https://github.com/nodejs/node/pull/41239
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-12-21 17:53:39 +00:00
Bradley Farias
c3866b09c1
async_hooks: fix AsyncLocalStorage in unhandledRejection cases
...
PR-URL: https://github.com/nodejs/node/pull/41202
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2021-12-21 09:33:45 -06:00
Rafael Gonzaga
113133badb
stream: fix enqueue race condition on esm modules
...
stream: use nextTick on close
PR-URL: https://github.com/nodejs/node/pull/40901
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-12-21 10:24:15 +00:00
Qingyu Deng
3f7dabdfdc
lib: fix checking syntax of esm module
...
Fixes: https://github.com/nodejs/node/issues/41189
PR-URL: https://github.com/nodejs/node/pull/41198
Refs: https://github.com/nodejs/node/pull/37468
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-12-19 23:33:34 +00:00
Antoine du Hamel
81812bad7b
child_process: add support for URL to cp.fork
...
PR-URL: https://github.com/nodejs/node/pull/41225
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-19 22:40:53 +00:00
James M Snell
23637e9a3b
perf_hooks: multiple fixes for Histogram
...
* The createHistogram(options) options weren't actually implemented
* Add a new count property that tracks the number of samples
* Adds BigInt options for relevant properties
* Adds add(other) method for RecordableHistogram
* Cleans up and expands tests
* Eliminates unnecessary ELDHistogram native class
* Improve/Simplify histogram transfer impl
Signed-off-by: James M Snell <jasnell@gmail.com >
perf_hooks: simplify Histogram constructor options
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41153
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-12-19 09:56:36 -08:00
Rich Trott
29f714b152
lib,tools: remove empty lines between JSDoc tags
...
This is in preparation for enabling a recommended JSDoc lint rule.
PR-URL: https://github.com/nodejs/node/pull/41147
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-19 05:30:09 +00:00
Robert Nagy
752d75d8bc
stream: add isErrored helper
...
Refs: https://github.com/nodejs/undici/pull/1134
PR-URL: https://github.com/nodejs/node/pull/41121
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2021-12-16 14:28:31 +01:00
Darshan Sen
ced5fc3930
assert: prefer reference comparison over string comparison
...
Pointer comparison takes constant time and string comparison takes
linear time unless there is some string interning going on, so this
might be a little bit faster.
Signed-off-by: Darshan Sen <darshan.sen@postman.com >
PR-URL: https://github.com/nodejs/node/pull/41015
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-12-14 14:58:47 +00:00
Darshan Sen
0d9f3bd9e8
process: add getActiveResourcesInfo()
...
This is supposed to be a public alternative of the private APIs,
`process._getActiveResources()` and `process._getActiveHandles()`. When
called, it returns an array of strings containing the types of the
active resources that are currently keeping the event loop alive.
Signed-off-by: Darshan Sen <darshan.sen@postman.com >
PR-URL: https://github.com/nodejs/node/pull/40813
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-12-14 14:09:08 +00:00
Gabriel Bota
85d4cd3079
loader: return package format from defaultResolve if known
...
This is a proposed modification of defaultResolve to return the package
format in case it has been found during package resolution.
The format will be returned as described in the documentation:
https://nodejs.org/api/esm.html#resolvespecifier-context-defaultresolve
There is one new unit test as well:
test/es-module/test-esm-resolve-type.js
PR-URL: https://github.com/nodejs/node/pull/40980
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-12-13 20:44:00 +00:00
Antoine du Hamel
e5c1fd7a2a
fs: accept URL as argument for fs.rm and fs.rmSync
...
PR-URL: https://github.com/nodejs/node/pull/41132
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-12-13 14:45:09 +00:00
Rich Trott
88dd9724b0
lib: include return types in JSDoc
...
Add types to @returns JSDoc annotations where the type is missing.
PR-URL: https://github.com/nodejs/node/pull/41130
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-12-12 03:51:00 +00:00
Ruben Bridgewater
c2ff69db4c
util: serialize falsy cause values while inspecting errors
...
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41097
Fixes: https://github.com/nodejs/node/issues/41096
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2021-12-11 12:05:41 +00:00
Ruben Bridgewater
1133796dbf
util: make sure error causes of any type may be inspected
...
An error cause may be of any type. Handle all of them, no matter
if they are an error or not.
Fixes: https://github.com/nodejs/node/issues/41096
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41097
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2021-12-11 12:05:41 +00:00
Ruben Bridgewater
4569674e39
util: pass through the inspect function to custom inspect functions
...
This allows to use more portable custom inspect functions.
Fixes: https://github.com/nodejs/node/issues/35956
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41019
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-12-11 11:49:45 +00:00
James M Snell
29a909ab22
lib: make AbortSignal cloneable/transferable
...
Allows for using `AbortSignal` across worker threads and contexts.
```js
const ac = new AbortController();
const mc = new MessageChannel();
mc.port1.onmessage = ({ data }) => {
data.addEventListener('abort', () => {
console.log('aborted!');
});
};
mc.port2.postMessage(ac.signal, [ac.signal]);
```
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41050
Refs: https://github.com/whatwg/dom/issues/948
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-12-10 19:22:05 -08:00
Irakli Gozalishvili
2e1fa8ab28
buffer: fix Blob constructor on various TypedArrays
...
Fixes: https://github.com/nodejs/node/issues/40705
PR-URL: https://github.com/nodejs/node/pull/40706
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-11 00:36:20 +01:00
Santiago Gimeno
ef7a686ed9
http: don't write empty data on req/res end()
...
When calling OutgoingMessage.end() with empty data argument, avoid
writing to the socket unless there's still pending data to be sent.
Fixes: https://github.com/nodejs/node/issues/41062
PR-URL: https://github.com/nodejs/node/pull/41116
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-10 19:44:24 +00:00
James M Snell
3f72c72bbb
lib: add abortSignal.throwIfAborted()
...
Refs: https://github.com/whatwg/dom/pull/1034
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/40951
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-10 07:51:41 -08:00
Antoine du Hamel
2f602258e0
fs: fix error codes for fs.cp
...
The context passed into this error must have `.code`, `.syscall` and
`.message`.
Fixes: https://github.com/nodejs/node/issues/41104
PR-URL: https://github.com/nodejs/node/pull/41106
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-10 10:26:47 +00:00
Shinho Ahn
10493b48c7
fs: fix length option being ignored during read()
...
Currently, `length` in an options object is ignored.
PR-URL: https://github.com/nodejs/node/pull/40906
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-10 10:26:37 +00:00
Rich Trott
8aa3ce8b59
doc,lib,tools: align multiline comments
...
These changes are in preparation for enabling a JSDoc lint rule.
PR-URL: https://github.com/nodejs/node/pull/41109
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-09 08:31:35 -08:00
Jameson Nash and Momtchil Momtchev
f3fbeafeec
tls: improve handling of shutdown
...
RFC 5246 section-7.2.1 requires that the implementation must immediately
stop reading from the stream, as it is no longer TLS-encrypted. The
underlying stream is permitted to still pump events (and errors) to
other users, but those are now unencrypted, so we should not process
them here. But therefore, we do not want to stop the underlying stream,
as there could be another user of it, but we do need to remove ourselves
as a listener.
Per TLS v1.2, we should have also destroy the TLS state entirely here
(including the writing side), but this was revised in TLS v1.3 to permit
the stream to continue to flush output.
There appears to be some inconsistencies in the way nodejs handles
ownership of the underlying stream, with `TLS.close()` on the write side
also calling shutdown on the underlying stream (thus assuming other
users of the underlying stream are not permitted), while receiving EOF
on the read side leaves the underlying channel open. These
inconsistencies are left for a later person to resolve, if the extra
functionality is needed (as described in #35904 ). The current goal here
is to the fix the occasional CI exceptions depending on the timing of
these kernel messages through the TCP stack.
PR-URL: https://github.com/nodejs/node/pull/36111
Fixes: https://github.com/nodejs/node/pull/35946
Refs: https://github.com/libuv/libuv/pull/3036
Refs: https://github.com/nodejs/node/issues/35904
Co-authored-by: Momtchil Momtchev <momtchil@momtchev.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-08 07:29:55 +01:00
Rich Trott
c241ef1a12
lib: use consistent types in JSDoc @returns
...
PR-URL: https://github.com/nodejs/node/pull/41089
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-12-07 06:23:30 -08:00
Robert Nagy
1fa507f098
stream: allow readable to end early without error
...
PR-URL: https://github.com/nodejs/node/pull/40881
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-06 20:42:12 +01:00
Ruben Bridgewater
414bc7bec1
assert: use stricter stack frame detection in .ifError()
...
This makes sure arbitrary stack traces are not handled as stack
frames.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41006
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-06 17:38:26 +00:00
Ruben Bridgewater
76372607a6
util: escape lone surrogate code points using .inspect()
...
Unpaired surrogate code points have no representation in UTF8.
Therefore, such code points are just "random" output that is
unreadable. Instead, escape the code points similar to C0 and C1
control characters.
Refs: https://unicodebook.readthedocs.io/unicode_encodings.html#utf-16-surrogate-pairs
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41001
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-06 17:38:15 +00:00
James M Snell
8bce46aff1
timers: add experimental scheduler api
...
Adds experimental implementations of the yield and wait APIs being
explored at https://github.com/WICG/scheduling-apis .
When I asked the WHATWG folks about the possibility of standardizing the
[awaitable versions of setTimeout/setImmediate](https://github.com/whatwg/html/issues/7340 )
that we have implemented in `timers/promises`, they pointed at the work
in progress scheduling APIs draft as they direction they'll be going.
While there is definitely a few thing in that draft that have
questionable utility to Node.js, the yield and wait APIs map cleanly to
the setImmediate and setTimeout we already have.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/40909
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-12-05 07:36:50 -08:00
Ruben Bridgewater
85764c0e1a
util: add numericSeparator to util.inspect
...
This adds the `numericSeparator` option to util.inspect. Using it
separates numbers by thousands adding the underscore accordingly.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41003
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-12-03 14:56:43 +00:00
James M Snell
c8a04049be
events: propagate abortsignal reason in new AbortError ctor in events
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-02 12:14:14 -08:00
James M Snell
5401e96e5d
lib: propagate abortsignal reason in new AbortError constructor in blob
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-02 12:14:14 -08:00
James M Snell
b3f5c3b9d6
fs: propagate abortsignal reason in new AbortSignal constructors
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-02 12:14:13 -08:00
James M Snell
582c5fa313
http2: propagate abortsignal reason in new AbortError constructor
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-02 12:14:13 -08:00
James M Snell
af28b0d540
stream: use cause options in AbortError constructors
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-02 12:14:10 -08:00
James M Snell
07fbed3d5f
readline: propagate signal.reason in awaitable question
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-02 12:13:02 -08:00
James M Snell
a2982798e3
timers: propagate signal.reason in awaitable timers
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-02 12:13:00 -08:00
James M Snell
36c0ac05e6
errors: add support for cause in aborterror
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41008
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-12-02 12:12:59 -08:00
Rich Trott
1086468aa3
url: detect hostname more reliably in url.parse()
...
Based on existing tests and code comments, url.parse() is expected to
treat any URL containing user@host as having a hostname. However, it
turns out this behavior relies on the URL having a hash which is
surprising, to put it mildly. Detect the host even without the hash.
PR-URL: https://github.com/nodejs/node/pull/41031
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-12-02 17:58:05 +00:00
Ruben Bridgewater
dab8ab2837
assert,util: compare RegExp.lastIndex while using deep equal checks
...
Compare the `lastIndex` property of regular expressions next to the
flags and source property.
Fixes: https://github.com/nodejs/node/issues/28766
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41020
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2021-12-02 08:01:40 +00:00
Ruben Bridgewater
9121bb301f
lib: do not lazy load EOL in blob
...
This addresses a comment by loading the EOL from the constants file.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41004
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-02 06:02:01 +00:00
Ruben Bridgewater
0a9cb170fe
util: always visualize cause property in errors during inspection
...
While inspecting errors, always visualize the cause. That property
is non-enumerable by default while being useful in general for
debugging.
Duplicated stack frames are hidden.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41002
Fixes: https://github.com/nodejs/node/issues/40859
Fixes: https://github.com/nodejs/node/issues/38725
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-12-02 06:01:50 +00:00
James M Snell
722f113e0d
lib: add AbortSignal.timeout
...
Refs: https://github.com/whatwg/dom/pull/1032
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/40899
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-12-01 16:26:24 -08:00
James M Snell
606f7213c4
events: propagate weak option for kNewListener
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/40899
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-12-01 16:26:23 -08:00
James M Snell
94de738aa4
stream: remove whatwg streams experimental warning
...
The API is still experimental, but the warning isn't necessary any
longer
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/40971
Refs: https://github.com/nodejs/node/issues/40950
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-12-01 08:02:13 +00:00
Ruben Bridgewater
bbed2a77d3
readline: skip escaping characters again
...
This is a minor performance improvement for readline. It skips to
escape individual characters again after escaping them before.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41005
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-12-01 01:50:34 +00:00
Robert Nagy
40a52bde95
stream: cleanup eos
...
PR-URL: https://github.com/nodejs/node/pull/40998
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-01 01:50:24 +00:00
Bradley Farias
1998e83983
esm: working mock test
...
PR-URL: https://github.com/nodejs/node/pull/39240
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2021-11-29 14:54:01 -06:00
Michaël Zasso
42c0b2ae65
perf_hooks: use spec-compliant structuredClone
...
Serialize PerformanceMark's `detail` correctly.
Fixes: https://github.com/nodejs/node/issues/40840
PR-URL: https://github.com/nodejs/node/pull/40904
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-11-29 12:45:46 +00:00
Rich Trott
1e8b296c58
lib,test,tools: use consistent JSDoc types
...
This could be in preparation of implementing the jsdoc/check-types
ESLint rule.
PR-URL: https://github.com/nodejs/node/pull/40989
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-11-29 06:48:00 +00:00