- Apr 02, 2020
-
-
Richard Lau authored
The setup-node GitHub Action installs problem matchers that happen to match the warning message format of Visual Studio's C/C++ compiler. This is resulting in all of our pull requests being annotated with `Unchanged files with check annotations` which are confusing to new contributors as they are not due to the changes in the pull request. The action is used to run `npx envinfo` to dump some information into the logs before the actual build. All GitHub hosted runners already have a version of Node.js installed (12.x at the time of this commit) which we can use to run `envinfo`. Remove the action to avoid using the problematic problem matcher. Backport-PR-URL: https://github.com/nodejs/node/pull/32608 PR-URL: https://github.com/nodejs/node/pull/31349 Fixes: https://github.com/nodejs/node/issues/31347 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Jiawen Geng <technicalcute@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
扩散性百万甜面包 authored
Backport-PR-URL: https://github.com/nodejs/node/pull/32608 PR-URL: https://github.com/nodejs/node/pull/31327 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Jiawen Geng <technicalcute@gmail.com> Reviewed-By:
Minwoo Jung <nodecorelab@gmail.com> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Richard Lau authored
The CI workflow doesn't use the matrix strategy so there is no `${{ matrix.node-version }}` variable to use in the `Use Node.js` step names. Backport-PR-URL: https://github.com/nodejs/node/pull/32608 PR-URL: https://github.com/nodejs/node/pull/31323 Reviewed-By:Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Jiawen Geng <technicalcute@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Richard Lau authored
Add jobs to our GitHub Actions workflow to run our various lint Makefile targets. The `setup-node` action used to run the JavaScript linter contains problem matchers for eslint that will annotate the files in a pull request if there are failures. Backport-PR-URL: https://github.com/nodejs/node/pull/32608 PR-URL: https://github.com/nodejs/node/pull/31323 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Jiawen Geng <technicalcute@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
gengjiawen authored
Backport-PR-URL: https://github.com/nodejs/node/pull/32608 PR-URL: https://github.com/nodejs/node/pull/31153 Reviewed-By:
Christian Clauss <cclauss@me.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
ExE Boss authored
Define `util.promisify.custom` as `Symbol.for("nodejs.util.inspect.custom")`, rather than as `Symbol("util.inspect.custom")`. This allows custom `promisify` wrappers to easily/safely be defined in non‑Node.js environments. Fixes: https://github.com/nodejs/node/issues/31647 Backport-PR-URL: https://github.com/nodejs/node/pull/32349 PR-URL: https://github.com/nodejs/node/pull/31672 Reviewed-By:Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Anna Henningsen authored
Refs: https://github.com/nodejs/node/issues/29802#issuecomment-607522598 PR-URL: https://github.com/nodejs/node/pull/32607 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Gerhard Stoebich authored
Original commit message: Remove noscript_shared_function_infos SharedFunctionInfos that do not belong to a script were tracked in noscript_shared_function_infos. However this was only used in object-stats. Remove this since it was actually leaking memory in some use cases. Bug: v8:9674 Change-Id: I9482f7e5dedf975666a70684b3d2ea04c9a23518 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1798423 Reviewed-by:Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Michael Stanton <mvstanton@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#63685} PR-URL: https://github.com/nodejs/node/pull/31939 Refs: https://github.com/v8/v8/commit/cb1c2b0fbfe730ed46d2b7a1ad3f58a21facc477 Refs: https://github.com/nodejs/node/issues/31914 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Matheus Marchini <mat@mmarchini.me>
-
Matheus Marchini authored
While landing some of the V8 upgrades on the v12 branch, something went wrong and git made unecessary (and incorrect) whitespace changes to test fixtures, which broke V8 tests. This was likely caused by the use of `git node land` or a simiar tool. Revert those changes to fix our tests. Since this only reverts unwanted changes on deps/v8, and it only affects tests, don't bump v8_embedder_string. PR-URL: https://github.com/nodejs/node/pull/32605 Reviewed-By:
Myles Borins <myles.borins@gmail.com> Reviewed-By:
Shelley Vohr <codebytere@gmail.com>
-
Myles Borins authored
Moved emeritus members keys and fixed alphabetization issues PR-URL: https://github.com/nodejs/node/pull/32577 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Robert Nagy authored
pipe() ondata should not control flow state if cleaned up. Fixes: https://github.com/nodejs/node/issues/31190 Backport-PR-URL: https://github.com/nodejs/node/pull/32264 PR-URL: https://github.com/nodejs/node/pull/31191 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Backport-PR-URL: https://github.com/nodejs/node/pull/32264
-
Rod Vagg authored
Backport-PR-URL: https://github.com/nodejs/node/pull/32527 PR-URL: https://github.com/nodejs/node/pull/31459 Refs: https://github.com/nodejs/node/issues/29216 Reviewed-By:
Christian Clauss <cclauss@me.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Ash Cripps <ashley.cripps@ibm.com> Signed-off-by:
Rod Vagg <rod@vagg.org>
-
Rod Vagg authored
Includes hardened-runtime patch from gdams from https://github.com/nodejs/node/issues/29216#issuecomment-546932966 Backport-PR-URL: https://github.com/nodejs/node/pull/32527 PR-URL: https://github.com/nodejs/node/pull/31459 Refs: https://github.com/nodejs/node/issues/29216 Reviewed-By:
Christian Clauss <cclauss@me.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Ash Cripps <ashley.cripps@ibm.com> Signed-off-by:
Rod Vagg <rod@vagg.org>
-
Ruy Adorno authored
Backport-PR-URL: https://github.com/nodejs/node/pull/32527 PR-URL: https://github.com/nodejs/node/pull/32495 Reviewed-By:
Myles Borins <myles.borins@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Rod Vagg authored
Backport-PR-URL: https://github.com/nodejs/node/pull/32527 PR-URL: https://github.com/nodejs/node/pull/31459 Refs: https://github.com/nodejs/node/issues/29216 Refs: https://github.com/sindresorhus/macos-term-size/pull/3 Reviewed-By:
Christian Clauss <cclauss@me.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Ash Cripps <ashley.cripps@ibm.com> Signed-off-by:
Rod Vagg <rod@vagg.org>
-
Ben Noordhuis authored
These seem to have accidentally slipped into the npm source tarball and cause problems when contributors update their git checkout of node. Backport-PR-URL: https://github.com/nodejs/node/pull/32527 PR-URL: https://github.com/nodejs/node/pull/32387 Refs: https://github.com/nodejs/node/pull/32368 Refs: https://github.com/npm/cli/issues/1037 Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Myles Borins authored
Backport-PR-URL: https://github.com/nodejs/node/pull/32527 PR-URL: https://github.com/nodejs/node/pull/32368 Refs: https://github.com/nodejs/node/issues/32296 Reviewed-By:
Bradley Farias <bradley.meck@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
isaacs authored
Backport-PR-URL: https://github.com/nodejs/node/pull/32527 PR-URL: https://github.com/nodejs/node/pull/31977 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Shelley Vohr <codebytere@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Anna Henningsen authored
Fix the condition for deleting the underlying data pointed to by a `BaseObjectWeakPtr`, which erroneously skipped that deletion when `ptr->get()` was `nullptr`. This fixes a memory leak reported by some of the tests. Refs: https://github.com/nodejs/node/pull/30374#issuecomment-601848973 Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/32393 Reviewed-By:
Matheus Marchini <mat@mmarchini.me> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Anna Henningsen authored
Prevent mistakes like the one fixed by the previous commit by destroying the callback immediately after it has been called. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31468 Refs: https://github.com/nodejs/node/pull/31386 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com>
-
Anna Henningsen authored
de2c68c7 moved this call to the destructor, under the assumption that that would essentially be equivalent to running it as part of the callback since the worker would be destroyed along with the callback. However, the actual code in `Environment::RunAndClearNativeImmediates()` comes with the subtlety that testing whether a JS exception has been thrown happens between the invocation of the callback and its destruction, leaving a possible exception from `JoinThread()` potentially unhandled (and unintentionally silenced through the `TryCatch`). This affected exceptions thrown from the `'exit'` event of the Worker, and made the `parallel/test-worker-message-type-unknown` test flaky, as the invalid message was sometimes only received during the Worker thread’s exit handler. Fix this by moving the `JoinThread()` call back to where it was before. Refs: https://github.com/nodejs/node/pull/31386 Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31468 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com>
-
Anna Henningsen authored
Make `SetImmediate()` behave more like `process.nextTick()` (which matches how we use it) by also running tasks that have been added during previous `SetImmediate()` calls. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31502 Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Minwoo Jung <nodecorelab@gmail.com>
-
Anna Henningsen authored
Include a report for each sub-Worker of the current Node.js instance. This adds a feature that is necessary for eventually making the report feature stable, as was discussed during the last collaborator summit. Refs: https://github.com/openjs-foundation/summit/pull/240 Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31386 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Anna Henningsen authored
This is a) the right thing to do anyway because these functions can not be inlined by the compiler and b) avoids compilation warnings in the following commit. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31386 Refs: https://github.com/openjs-foundation/summit/pull/240 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Anna Henningsen authored
Allow doing what V8’s `v8::Isolate::RequestInterrupt()` does for V8. This also works when there is no JS code currently executing. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31386 Refs: https://github.com/openjs-foundation/summit/pull/240 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Anna Henningsen authored
Remove `AsyncRequest` from the source code, and replace its usage with threadsafe `SetImmediate()` calls. This has the advantage of being able to pass in any function, rather than one that is defined when the `AsyncRequest` is “installed”. This necessitates two changes: - The stopping flag (which was only used in one case and ignored in the other) is now a direct member of the `Environment` class. - Workers no longer have their own libuv handles, requiring manual management of their libuv ref count. As a drive-by fix, the `can_call_into_js` variable was turned into an atomic variable. While there have been no bug reports, the flag is set from `Stop(env)` calls, which are supposed to be possible from any thread. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31386 Refs: https://github.com/openjs-foundation/summit/pull/240 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Anna Henningsen authored
Add a variant of `SetImmediate()` that can be called from any thread. This allows removing the `AsyncRequest` abstraction and replaces it with a more generic mechanism. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31386 Refs: https://github.com/openjs-foundation/summit/pull/240 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Anna Henningsen authored
There is no real reason to manage a count manually, given that checking whether there are C++ callbacks is a single pointer comparison. This makes it easier to add other kinds of native C++ callbacks that are managed in a similar way. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31386 Refs: https://github.com/openjs-foundation/summit/pull/240 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Anna Henningsen authored
Refactor for clarity and reusability. Make it more obvious that the list is a FIFO queue. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/31386 Refs: https://github.com/openjs-foundation/summit/pull/240 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Anna Henningsen authored
This can be necessary, because some parts of the Node.js code base perform cleanup operations in the Immediate callbacks, e.g. HTTP/2. This resolves flakiness in an HTTP/2 test that failed when a `SetImmediate()` callback was not run or destroyed before the `Environment` destructor started, because that callback held a strong reference to the `Http2Session` object and the expectation was that no such objects exist once the `Environment` constructor starts. Another, slightly more direct, alternative would have been to clear the immediate queue rather than to run it. However, this approach seems to make more sense as code generally assumes that the `SetImmediate()` callback will always run; For example, N-API uses an immediate callback to call buffer finalization callbacks. Unref’ed immediates are skipped, as the expectation is generally that they may not run anyway. Fixes: https://github.com/nodejs/node/issues/30643 Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30666 Refs: https://github.com/nodejs/node/pull/30374 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Guard against running `SetImmediate()` from the destructor. The object will not be alive or usable in the callback, so it does not make sense to attempt to schedule the `SetImmediate()`. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30666 Fixes: https://github.com/nodejs/node/issues/30643 Refs: https://github.com/nodejs/node/pull/30374 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
This is in preparation for running native `SetImmediate()` callbacks during shutdown. Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30666 Fixes: https://github.com/nodejs/node/issues/30643 Refs: https://github.com/nodejs/node/pull/30374 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
This was overlooked in a489583e. Refs: https://github.com/nodejs/node/pull/30374 Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30666 Fixes: https://github.com/nodejs/node/issues/30643 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
This allows keeping `BaseObjectPtr`s to `HandleWrap` instances. Previously, the pointer kept the `HandleWrap` object alive, leaving the Environment cleanup code that waits for the handle list to drain in a busy loop, because only the `HandleWrap` destructor removed the item from the list. Refs: https://github.com/nodejs/quic/pull/165 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30374 Refs: https://github.com/nodejs/quic/pull/141 Refs: https://github.com/nodejs/quic/pull/149 Refs: https://github.com/nodejs/quic/pull/141 Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
This is no longer necessary now that the copyable `BaseObjectPtr` is available (as opposed to the only-movable `v8::Global`). Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30374 Refs: https://github.com/nodejs/quic/pull/141 Refs: https://github.com/nodejs/quic/pull/149 Refs: https://github.com/nodejs/quic/pull/141 Refs: https://github.com/nodejs/quic/pull/165 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30374 Refs: https://github.com/nodejs/quic/pull/141 Refs: https://github.com/nodejs/quic/pull/149 Refs: https://github.com/nodejs/quic/pull/141 Refs: https://github.com/nodejs/quic/pull/165 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
Refs: https://github.com/nodejs/quic/pull/141 Reviewed-By:
James M Snell <jasnell@gmail.com> Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30374 Refs: https://github.com/nodejs/quic/pull/149 Refs: https://github.com/nodejs/quic/pull/165 Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
Referring to `BaseObject` instances using standard C++ smart pointers can interfere with BaseObject’s own cleanup mechanisms (explicit delete, delete-on-GC and delete-on-cleanup). Introducing custom smart pointers allows referring to `BaseObject`s safely while keeping those mechanisms intact. Refs: https://github.com/nodejs/quic/pull/141 Refs: https://github.com/nodejs/quic/pull/149 Reviewed-By:
James M Snell <jasnell@gmail.com> Backport-PR-URL: https://github.com/nodejs/node/pull/32301 PR-URL: https://github.com/nodejs/node/pull/30374 Refs: https://github.com/nodejs/quic/pull/165 Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Ruben Bridgewater authored
This completely refactors the `expectsError` behavior: so far it's almost identical to `assert.throws(fn, object)` in case it was used with a function as first argument. It had a magical property check that allowed to verify a functions `type` in case `type` was passed used in the validation object. This pattern is now completely removed and `assert.throws()` should be used instead. The main intent for `common.expectsError()` is to verify error cases for callback based APIs. This is now more flexible by accepting all validation possibilites that `assert.throws()` accepts as well. No magical properties exist anymore. This reduces surprising behavior for developers who are not used to the Node.js core code base. This has the side effect that `common` is used significantly less frequent. Backport-PR-URL: https://github.com/nodejs/node/pull/31449 PR-URL: https://github.com/nodejs/node/pull/31092 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Myles Borins authored
This test is somewhat regularly flaky on 12.x and it appears master as well. There appears to be an issue tracking flakes for 6+ months. Seems reasonable to mark this to keep us from having red CI. Refs: https://github.com/nodejs/node/issues/29802 PR-URL: https://github.com/nodejs/node/pull/32595 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-