Colin Ihrig
1ef3c53e24
test_runner: better handle async bootstrap errors
...
The test runner is bootstrapped synchronously, with the exception
of importing custom reporters. To better handle asynchronously
throw errors, this commit introduces an internal error type that
can be checked for from the test runner's uncaughtException
handler.
After https://github.com/nodejs/node/pull/46707 and this change
land, the other throw statement in the uncaughtException handler
can be removed. This will allow the test runner to handle errors
thrown from outside of tests (which currently prevents the test
runner from reporting results).
PR-URL: https://github.com/nodejs/node/pull/46720
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-03-04 23:03:34 -05:00
Richie McColl
0a690efb76
test_runner: add describe.only and it.only shorthands
...
PR-URL: https://github.com/nodejs/node/pull/46604
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/46562
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-03-04 23:03:34 -05:00
Moshe Atlow
28a1317efe
test_runner: bootstrap reporters before running tests
...
PR-URL: https://github.com/nodejs/node/pull/46737
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/46747
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-03-04 23:03:34 -05:00
Richie McColl
cd3aaa8fac
test_runner: emit test-only diagnostic warning
...
PR-URL: https://github.com/nodejs/node/pull/46540
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/46448
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-03-04 23:03:34 -05:00
Colin Ihrig
c19fa45a65
test_runner: centralize CLI option handling
...
The test runner relies on a few CLI options. That code was spread
across a few locations. This commit centralizes that logic.
PR-URL: https://github.com/nodejs/node/pull/46707
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-03-04 23:03:33 -05:00
Richie McColl
0898145e37
test_runner: display skipped tests in spec reporter output
...
PR-URL: https://github.com/nodejs/node/pull/46651
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-03-04 23:03:33 -05:00
Mert Can Altın
894d7117fa
test_runner: parse non-ascii character correctly
...
PR-URL: https://github.com/nodejs/node/pull/45736
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-03-04 23:03:33 -05:00
Moshe Atlow
5b3c606626
test_runner: flatten TAP output when running using --test
...
PR-URL: https://github.com/nodejs/node/pull/46440
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/45833
Refs: https://github.com/nodejs/node/issues/45833
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-03-04 23:03:33 -05:00
Moshe Atlow
391ff0dba4
test_runner: allow nesting test within describe
...
PR-URL: https://github.com/nodejs/node/pull/46544
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/46478
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-03-04 23:03:33 -05:00
Pulkit Gupta
4f5aff2557
test: fix tap parser fails if a test logs a number
...
PR-URL: https://github.com/nodejs/node/pull/46056
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/46048
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-03-04 23:03:33 -05:00
Moshe Atlow
ba784e87b4
test_runner: fix missing test diagnostics
...
PR-URL: https://github.com/nodejs/node/pull/46450
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/45911
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-03-04 23:03:33 -05:00
Pulkit Gupta
c5f16fb5fb
test_runner: top-level diagnostics not ommited when running with --test
...
PR-URL: https://github.com/nodejs/node/pull/46441
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/45910
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-03-04 23:03:33 -05:00
Pulkit Gupta
32b020cf84
test: fix tap escaping with and without --test
...
PR-URL: https://github.com/nodejs/node/pull/46311
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/45836
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-03-04 23:03:33 -05:00
cjihrig
63563f8a7a
doc,lib,src,test: rename --test-coverage
...
Add experimental to the name as requested during review.
PR-URL: https://github.com/nodejs/node/pull/46017
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-03-04 23:03:33 -05:00
cjihrig
28a775b32f
test_runner: add initial code coverage support
...
This commit adds code coverage functionality to the node:test
module. When node:test is used in conjunction with the new
--test-coverage CLI flag, a coverage report is created when
the test runner finishes. The coverage summary is forwarded to
any test runner reporters so that the display can be customized
as desired. This new functionality is compatible with the
existing NODE_V8_COVERAGE environment variable as well.
There are still several limitations, which will be addressed in
subsequent pull requests:
- Coverage is only reported for a single process. It is possible
to merge coverage reports together. Once this is done, the
--test flag will be supported as well.
- Source maps are not currently supported.
- Excluding specific files or directories from the coverage
report is not currently supported. Node core modules and
node_modules/ are excluded though.
PR-URL: https://github.com/nodejs/node/pull/46017
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-03-04 23:03:33 -05:00
Colin Ihrig
0d999e373a
test_runner: make built in reporters internal
...
This commit updates the test runner to make the built in test
reporters internal modules.
PR-URL: https://github.com/nodejs/node/pull/46092
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-03-04 23:03:33 -05:00
Moshe Atlow
79f4b426fe
test_runner: report file in test runner events
...
PR-URL: https://github.com/nodejs/node/pull/46030
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-03-04 23:03:33 -05:00
Geoffrey Booth
403df210ac
module: move test reporter loading
...
Move the logic for handling --test-reporter out of the
general module loader and into the test_runner subsystem.
PR-URL: https://github.com/nodejs/node/pull/45923
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-03-04 23:03:32 -05:00
Moshe Atlow
4d50db14b3
test_runner: add reporters
...
PR-URL: https://github.com/nodejs/node/pull/45712
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Fixes: https://github.com/nodejs/node/issues/45648
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-03-04 23:03:32 -05:00
MURAKAMI Masahiko
5fdf374c74
test_runner: avoid swallowing of asynchronously thrown errors
...
Fixes: https://github.com/nodejs/node/issues/44612
PR-URL: https://github.com/nodejs/node/pull/45264
Backport-PR-URL: https://github.com/nodejs/node/pull/46839
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-03-04 23:03:32 -05:00
Colin Ihrig
643545ab79
fs: add statfs() functions
...
This commit adds statfs() and statfsSync() to the fs module, and
statfs() to the fsPromises module.
Co-authored-by: cjihrig <cjihrig@gmail.com >
Fixes: https://github.com/nodejs/node/issues/10745
Refs: https://github.com/nodejs/node/pull/31351
PR-URL: https://github.com/nodejs/node/pull/46358
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-03-04 23:03:31 -05:00
Anna Henningsen
110ead9abb
vm: expose cachedDataRejected for vm.compileFunction
...
Having this information available is useful for functions just as
it is for scripts. Therefore, expose it in the same way that other
information related to code caching is reported.
As part of this, de-duplify the code for setting the properties on
the C++ side and add proper exception handling to it.
PR-URL: https://github.com/nodejs/node/pull/46320
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-03-04 23:03:30 -05:00
Antoine du Hamel
a97774603b
tools: require more trailing commas
...
All of the import and export statements in the codebase already use
trailing commas, this commit adds a linter rule to enforce that.
PR-URL: https://github.com/nodejs/node/pull/46346
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-03-04 23:03:30 -05:00
theanarkh
02632b42cf
v8: support gc profile
...
PR-URL: https://github.com/nodejs/node/pull/46255
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2023-03-04 23:03:30 -05:00
theanarkh
f09b838408
src,lib: add constrainedMemory API for process
...
PR-URL: https://github.com/nodejs/node/pull/46218
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-03-04 23:03:30 -05:00
Antoine du Hamel
2f7319e387
readline: fix detection of carriage return
...
Fixes: https://github.com/nodejs/node/issues/45992
PR-URL: https://github.com/nodejs/node/pull/46306
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-03-04 23:03:30 -05:00
Antoine du Hamel
08bafc84f6
url: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/45966
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-03-04 23:03:30 -05:00
Deokjin Kim
94421b4cfe
doc: mark some parameters as optional in webstreams
...
Some parameters are described as optional in spec, so update
mismatched parameter.
Refs: https://streams.spec.whatwg.org/
PR-URL: https://github.com/nodejs/node/pull/46269
Refs: https://streams.spec.whatwg.org/
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-03-04 23:03:29 -05:00
Erick Wendel
3acfe9bf92
stream: fix readable stream as async iterator function
...
Since v19.2 it's not possible to use readableStreams
as async iterators (confirmed bug).
This patch fixes the problem by reading the Stream.Duplex property
from 'streams/duplex' instead of 'streams/legacy' module
Fixes: https://github.com/nodejs/node/issues/46141
PR-URL: https://github.com/nodejs/node/pull/46147
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-03-04 23:03:28 -05:00
Yagiz Nizipli
cb5bb12422
buffer: add isAscii method
...
PR-URL: https://github.com/nodejs/node/pull/46046
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-03-04 23:03:28 -05:00
Antoine du Hamel
23b875806c
test_runner: update comment to comply with eslint no-fallthrough rule
...
PR-URL: https://github.com/nodejs/node/pull/46258
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-03-04 23:03:28 -05:00
Marco Ippolito
5019b5473f
http: res.setHeaders first implementation
...
PR-URL: https://github.com/nodejs/node/pull/46109
Backport-PR-URL: https://github.com/nodejs/node/pull/46365
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-03-04 23:03:27 -05:00
RafaelGSS
0e3b796cc5
lib: makeRequireFunction patch when experimental policy
...
PR-URL: https://github.com/nodejs-private/node-private/pull/358
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/371
Reviewed-by: Bradley Farias <bradley.meck@gmail.com >
Reviewed-by: Michael Dawson <midawson@redhat.com >
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
2023-02-14 21:53:43 -05:00
RafaelGSS and Bradley Farias
7cccd5565f
policy: makeRequireFunction on mainModule.require
...
PR-URL: https://github.com/nodejs-private/node-private/pull/358
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/371
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
Co-authored-by: Bradley Farias <bradley.meck@gmail.com >
Reviewed-by: Bradley Farias <bradley.meck@gmail.com >
Reviewed-by: Michael Dawson <midawson@redhat.com >
2023-02-14 21:40:02 -05:00
Deokjin Kim
de2b7a9640
doc: fix mismatched arguments of NodeEventTarget
...
Arguments of some APIs are mismatched and 2 APIs are not as
described.
PR-URL: https://github.com/nodejs/node/pull/45678
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:21 -05:00
Debadree Chatterjee
a87963de6b
stream: fix pipeline calling end on destination more than once
...
Fixes: https://github.com/nodejs/node/issues/42866
PR-URL: https://github.com/nodejs/node/pull/46226
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-01-31 08:04:21 -05:00
Deokjin Kim
0defe4effa
trace_events: refactor to use validateStringArray
...
`options.categories` is string[]. So used `validateStringArray`
Refs: https://nodejs.org/dist/latest-v19.x/docs/api/tracing.html#trace_eventscreatetracingoptions
PR-URL: https://github.com/nodejs/node/pull/46012
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-31 08:04:21 -05:00
Deokjin Kim
297773c6d1
events: change status of event.returnvalue to legacy
...
`event.returnvalue` is described as legacy in spec.
Plus, add missed '#'(private member) of defaultPrevented
in implementation.
Refs: https://dom.spec.whatwg.org/#interface-event
Refs: https://developer.mozilla.org/en-US/docs/Web/API/Event/returnValue
PR-URL: https://github.com/nodejs/node/pull/46175
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-31 08:04:21 -05:00
Filip Skokan
52a7887b94
crypto: add CryptoKey Symbol.toStringTag
...
closes #45987
PR-URL: https://github.com/nodejs/node/pull/46042
Fixes: https://github.com/nodejs/node/issues/45987
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2023-01-31 08:04:21 -05:00
Debadree Chatterjee
cde59606cd
stream: implement finished() for ReadableStream and WritableStream
...
Refs: https://github.com/nodejs/node/issues/39316
PR-URL: https://github.com/nodejs/node/pull/46205
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:21 -05:00
vitpavlenko
a558774a40
crypto: add cipher update/final methods encoding validation
...
Refs #45189
PR-URL: https://github.com/nodejs/node/pull/45990
Refs: https://github.com/nodejs/node/issues/45189
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2023-01-31 08:04:20 -05:00
Antoine du Hamel
463bb9602e
esm: mark importAssertions as required
...
We already always specify a value, and failing to do so would likely be
a bug.
PR-URL: https://github.com/nodejs/node/pull/46164
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2023-01-31 08:04:20 -05:00
Deokjin Kim
e620de6444
http: refactor to use validateHeaderName
...
Remove duplicate implementation by using validateHeaderName.
PR-URL: https://github.com/nodejs/node/pull/46143
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-31 08:04:20 -05:00
Marco Ippolito
3e70b7d863
http: writeHead if statusmessage is undefined dont override headers
...
PR-URL: https://github.com/nodejs/node/pull/46173
Fixes: https://github.com/nodejs/node/issues/32395
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-01-31 08:04:20 -05:00
theanarkh
08a6a61575
src,lib: the handle keeps loop alive in cluster rr mode
...
PR-URL: https://github.com/nodejs/node/pull/46161
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-01-31 08:04:20 -05:00
Deokjin Kim
edcd4fc576
lib: use kEmptyObject and update JSDoc in webstreams
...
Use kEmptyObject as default value of strategy.
Plus, make reason and chunk as optional.
And refactor to use validateBuffer.
Refs: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md#transformstreamdefaultcontrollerenqueuechunk
Refs: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md#transformstreamdefaultcontrollererrorreason
Refs: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md#writablestreamdefaultwriterabortreason
Refs: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md#writablestreamdefaultwriterwritechunk
PR-URL: https://github.com/nodejs/node/pull/46183
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-01-31 08:04:19 -05:00
Deokjin Kim
d6fc855b8a
lib: refactor to use validate function
...
Throwing error after checking type is repeated. So replace
it with validate function.
PR-URL: https://github.com/nodejs/node/pull/46101
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-01-31 08:04:19 -05:00
Deokjin Kim
277d9da876
vm: refactor to use validate function
...
Throwing error after checking type is repeated.
So replace it with validate function.
PR-URL: https://github.com/nodejs/node/pull/46176
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:18 -05:00
Deokjin Kim
3d1dd96c4f
http: refactor to use min of validateNumber for maxTotalSockets
...
Remove duplicate implementation by using min of validateNumber.
PR-URL: https://github.com/nodejs/node/pull/46115
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-31 08:04:18 -05:00
Rafael Gonzaga
bc17f37b98
lib: reuse invalid state errors on webstreams
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs/node/pull/46086
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-01-31 08:04:18 -05:00