The previous wording sounded like this was a necessary for
contributing. This clarifies that it is not, and tells people what
we do use their info for.
PR-URL: https://github.com/nodejs/node/pull/22433
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
`npm ci` fails where there is no package-lock.json.
Also add the `node_modules` directory to .gitignore.
PR-URL: https://github.com/nodejs/node/pull/22500
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
To enable automatic update of WPT, move all our custom
WHATWG URL tests that are not present in the upstream into
files starting with `test-whatwg-url-custom-`, so it's easier
to identify test cases that can be upstreamed and test cases
that should be rolled into our repo (possibly with automation).
PR-URL: https://github.com/nodejs/node/pull/22442
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Muffle xcodebuild warnings by introducing an alternative quieter
alternative to GetStdout, called GetStdoutQuiet, and call it selectively
in particularly noisy xcodebuild commands.
Co-authored-by: Gibson Fahnestock <gibfahn@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/21999
Original-PR-URL: https://github.com/nodejs/node-gyp/pull/1370
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
test: remove third argument from assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/22451
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
`common.isCPPSymbolsNotMapped` is used only by the tests in the
`test/tick-processor` folder. Move it local to those to get it
out of `common`.
PR-URL: https://github.com/nodejs/node/pull/22459
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Incrementally making `require('../common')` less of a monolith.
Move the `common.onGC()` utility to a separate standalone module
that is only imported when it's actually needed.
PR-URL: https://github.com/nodejs/node/pull/22446
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Move the hijackstdio functions out of common so that they are
imported only into the tests that actually need them
PR-URL: https://github.com/nodejs/node/pull/22462
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Pulls out another common argument validator to `internal/validators`
PR-URL: https://github.com/nodejs/node/pull/22249
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
The former implementation lacked symbols on the iterator objects
without prototype. This is now fixed.
The special handling for overriding `Symbol.iterator` was removed as
it's very difficult to deal with this properly. Manipulating the
symbols is just not supported.
PR-URL: https://github.com/nodejs/node/pull/22437
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Added test to check ERR_UNKNOWN_CREDENTIAL of process.setgroups to
increase coverage.
PR-URL: https://github.com/nodejs/node/pull/22368
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Added tests for dnsPromises.lookup to increase coverage and test
`onlookup()` and `onlookupall()` methods.
PR-URL: https://github.com/nodejs/node/pull/21559
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This test is ported automatically in readable-stream, and it fails there
on Windows and older Node.js versions because of some bad interactions
between the code and the event loop on Windows.
See: https://github.com/nodejs/readable-stream/issues/353
PR-URL: https://github.com/nodejs/node/pull/22456
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Move the macOS-firewall note to the end of "Building Node.js"
and above "Running Tests".
I think it's more reasonable when user prepare to build node
step by step. Just read and build from top to end in case ignore
the note.
PR-URL: https://github.com/nodejs/node/pull/22440
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
In a continuing effort to de-monolithize `require('../common')`,
move `common.ArrayStream` out to a separate module that is
imported only when it is needed.
PR-URL: https://github.com/nodejs/node/pull/22447
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
The `common.isGlibc()` function is called exactly once from only
one test. There's no reason for it to be in `require('../common')`
at the current time. If it ends up needing to be used by multiple
tests, it can easily be moved into it's own common sub-module
(e.g. `require('../common/isglibc')` ... for now tho, just move
it into the one test that uses it and simplify the implementation
a bit to remove unnecessary caching.
PR-URL: https://github.com/nodejs/node/pull/22443
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This flag is not set on other platforms so it can produce inconsistent
behaviour across platforms. For example, if you build an async node
add-on which uses statics you can get race conditions due to static
not supporting threads if the node add-on inherits from the Node
common.gypi config. It is not disabled on other platforms such as
Linux, it is not disabled by default in Xcode or clang.
This setting has been there since the initial commit that introduces
`common.gypi` and thus has been there since the start, it doesn't seem
to be have added for any particular reason other than to potentially
match the Xcode defaults at the time.
PR-URL: https://github.com/nodejs/node/pull/22198
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
There is no need to call `setupPortReferencing` in `setupChild`
as which has been called with the same arguments in the `oninit`
prototype method of `MessagePort`.
PR-URL: https://github.com/nodejs/node/pull/22298
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
We don't know what will return when successful or failure for
the callback of the function. So this commit makes it more detailled.
PR-URL: https://github.com/nodejs/node/pull/22366
Refs: https://github.com/nodejs/node/issues/22322
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1) This adds a better error logging so we are able to address further
failures easier.
2) It adds a extra epsilon so the test runs into less issues in case
the machine is under heavy load.
3) The epsilon in increased if the CPU is under heavy load.
4) The total startup epsilon was reduced due to recent startup time
improvements.
PR-URL: https://github.com/nodejs/node/pull/22404
Fixes: https://github.com/nodejs/node/issues/19197
Refs: https://github.com/nodejs/reliability/issues/14
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
test/parallel/test-cli-eval.js covers them, and many more things.
PR-URL: https://github.com/nodejs/node/pull/22355
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Update the N-API documentation to reflect that wrapping no longer
affects the object's prototype chain.
PR-URL: https://github.com/nodejs/node/pull/22363
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.
PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
There is no guarantee that a timeout won't be delayed considerably due
to unrelated activity on the host. Instead of checking that the timeout
happens within a certain tolerance, simply check that it did not happen
too soon.
Fixes: https://github.com/nodejs/node/issues/22041
PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
`test/parallel/test-util-inspect.js` has a call to
`assert.strictEqual()` that receives three arguments.
The third argument is a string literal. Unfortunately,
calling assert.strictEqual() this way means that if
there is an AssertionError, the value of the variables
pos and npos are not reported.
This PR removes this argument.
PR-URL: https://github.com/nodejs/node/pull/22371
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Currently node_use_openssl uses the available-node variable before it is
defined causing the conditions that use it before that point to
evaluate incorrectly. As an example running the target
test/addons/.docbuildstamp will currently be skipped:
$ make test/addons/.docbuildstamp
Skipping .docbuildstamp (no crypto)
With this commit the target will only be skipped if configured --without-ssl.
PR-URL: https://github.com/nodejs/node/pull/22356
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
getCheckedFunction() is used internally by the os module to
handle errors from the binding layer in several methods. This
commit adds a test for the case where the binding layer returns
an error.
PR-URL: https://github.com/nodejs/node/pull/22394
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This algorithm uses less data transformations and is therefore
significantly faster than the one before.
PR-URL: https://github.com/nodejs/node/pull/22359
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>