Rich Trott
55ceaec111
tools,benchmark,lib,test: enable no-case-declarations lint rule
...
PR-URL: https://github.com/nodejs/node/pull/41385
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Tierney Cyren <hello@bnb.im >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2022-01-05 07:42:19 -08:00
Michael Dawson
c85e67b600
test: mark test-repl-sigint-nested-eval as flaky
...
Refs: https://github.com/nodejs/node/issues/41123
- This is one of the remaining high occurance flaky
tests from the reliability reports and recent
failures in the CI. Mark as flaky until issue
is resolved under referenced issue.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41302
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-01-04 15:59:25 -05:00
Robert Nagy
48e784043d
stream: don't emit finish after destroy
...
PR-URL: https://github.com/nodejs/node/pull/40852
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-01-03 16:32:44 +01:00
Benjamin Gruenbaum and Robert Nagy
55c5120b07
stream: add filter method to readable
...
This continues the work in https://github.com/nodejs/node/pull/40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental `filter` api to streams and tests/docs for it.
See https://github.com/tc39/proposal-iterator-helpers/
Co-Authored-By: Robert Nagy <ronagy@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/41354
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-01-02 09:52:50 +02:00
Rich Trott
4e6fc8d0ca
test: use spawnSync() full name in test-stdio-pipe-stderr
...
test-stdio-pipe-stderr uses `spawnSync()` but renames it as `spawn()`
which can be confusing. Rename it to `spawnSync()` for
readability/maintainability.
PR-URL: https://github.com/nodejs/node/pull/41332
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-30 10:19:30 -08:00
Rich Trott
0465373d77
test: improve expectWarning error message
...
expectWarning() fails with a TypeError and a message about undefined not
being iterable when the warning is emitted more times than expected.
This change produces a more useful error message.
Refs: https://github.com/nodejs/node/pull/41307/files#r775197738
PR-URL: https://github.com/nodejs/node/pull/41326
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-12-30 05:58:53 +00:00
Rich Trott
01c4907696
test: use spawnSync() full name
...
test-cli-bad-options.js uses `spawnSync()` but renames it as `spawn()`
which caused me a bit of confusion for a bit until I realized what was
going on. Rename the variable `spawnSync()` for
readability/maintainability.
PR-URL: https://github.com/nodejs/node/pull/41327
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-12-30 05:58:09 +00:00
Rich Trott
26c973d4b3
child_process: improve argument validation
...
For execFile() and fork(), use INVALID_ARG_TYPE as appropriate instead
of INVALID_ARG_VALUE. Use validator functions where sensible.
PR-URL: https://github.com/nodejs/node/pull/41305
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-12-29 16:41:45 -08:00
Robert Nagy
a698c49993
stream: add isReadable helper
...
PR-URL: https://github.com/nodejs/node/pull/41199
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-29 20:42:10 +01:00
Benjamin Gruenbaum and Robert Nagy
b97b81d4ec
stream: add map method to Readable
...
Implement the map method on readable stream. This starts the alignment
with the tc39-iterator-helpers proposal and adds a `.map` method to
every Node.js readable stream.
Co-Authored-By: Robert Nagy <ronag@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/40815
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-12-29 20:32:36 +01:00
Yoshiki Kurihara
24f4f7f6e2
test: add comments explaining _setSimultaneousAccepts deprecation tests
...
PR-URL: https://github.com/nodejs/node/pull/41307
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-12-27 15:20:24 +01:00
CallMeLaNN
077c75beae
tls: permit null as a pfx value
...
Allow null along with undefined for pfx value.
This is to avoid breaking change when upgrading v14 to v16 and
3rd party library passing null to pfx
Fixes: https://github.com/nodejs/node/issues/36292
PR-URL: https://github.com/nodejs/node/pull/41170
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2021-12-27 14:14:56 +00:00
Ruben Bridgewater
54e9cba336
util: do not reduce to a single line if not appropriate using inspect
...
This makes sure entries are not lined up on a single line if the
content contains any new line. That would otherwise cause confusing
output.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de >
PR-URL: https://github.com/nodejs/node/pull/41083
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-24 07:32:59 -08:00
Tim Perry
cadeabc5f7
http2: handle existing socket data when creating HTTP/2 server sessions
...
When emitting a 'connection' event to manually inject connections into a
server, it's common for the provided stream to already contain readable
data, e.g. after sniffing a connection to detect HTTP/2 from the initial
bytes.
Previously this was supported only for outgoing HTTP/2 sessions created
with http2.connect(). This change ensures that HTTP/2 over existing
streams is supported on both outgoing and incoming sessions.
PR-URL: https://github.com/nodejs/node/pull/41185
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-12-23 18:33:52 +00:00
James M Snell
895c3d937e
events: add EventEmitterAsyncResource to core
...
Signd-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/41246
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-12-23 00:56:57 +00:00
Jordan Harband
8d1f13b376
util: display a present-but-undefined error cause
...
See https://github.com/nodejs/node/pull/41097#issuecomment-997055761
PR-URL: https://github.com/nodejs/node/pull/41247
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-21 23:46:36 +00:00
Michael Dawson
eee1a6f42a
test: mark test-crypto-keygen slow on windows
...
Refs: https://github.com/nodejs/node/issues/41206
This test seems to be failing regularly on
windows with a timeout. Mark it slow to reduce
CI noise until it gets investigated.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/41207
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-21 09:32:59 -05: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
Rich Trott
cf6996458b
benchmark,test: use Object.hasOwn() where applicable
...
Refs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn
PR-URL: https://github.com/nodejs/node/pull/41229
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@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-20 04:03:58 +00:00
Yoshiki Kurihara
9b903d1d1b
test: improve test coverage of dns/promises
...
PR-URL: https://github.com/nodejs/node/pull/41133
Refs: https://coverage.nodejs.org/coverage-18ff5832501b66b4/lib/internal/dns/promises.js.html#L116
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
2021-12-19 22:41:02 +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
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
Richard Lau
4b5b9a8f15
test: do not load absolute path crypto engines twice
...
Newer versions of OpenSSL now throws an error if an engine is loaded
twice by its absolute path (a second load by its id appears to be okay).
PR-URL: https://github.com/nodejs/node/pull/41177
Refs: https://github.com/quictls/openssl/pull/69
Refs: https://mta.openssl.org/pipermail/openssl-announce/2021-December/000212.html
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
2021-12-16 11:51:17 +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
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
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
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
jakub-g
12605000ae
doc: fix comments in test-fs-watch.js
...
PR-URL: https://github.com/nodejs/node/pull/41046
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-12-10 17:27:54 +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
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
e60801aaac
test: skip ESLint tests if no Intl
...
ESLint dependency now requires Intl because it uses regexp unicode
character properties.
Fixes: https://github.com/nodejs/node/issues/41102
PR-URL: https://github.com/nodejs/node/pull/41105
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-12-07 10:01:36 +00: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
Luigi Pinca
fd66ae881b
test: deflake test-trace-atomics-wait
...
Add possible outcome to the `expectedTimelines` array.
Fixes: https://github.com/nodejs/node/issues/41010
PR-URL: https://github.com/nodejs/node/pull/41018
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-12-03 17:07:19 +00: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
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
Hirotaka Tagawa / wafuwafu13
9e0fb1acef
test: add auth option case for url.format
...
PR-URL: https://github.com/nodejs/node/pull/40516
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
2021-12-02 08:23:16 +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
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
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
Daniel Bevenius
10818346bd
Revert "test: skip different params test for OpenSSL 3.x"
...
This reverts commit 269f5132cc .
Fixes: https://github.com/nodejs/node/issues/38216
PR-URL: https://github.com/nodejs/node/pull/40640
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-11-29 10:53:23 -05:00