Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: implement AbortSignal.any() #47821

Merged

Conversation

atlowChemi
Copy link
Member

Fixes: #47811
Refs: whatwg/dom#1152

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label May 2, 2023
@atlowChemi atlowChemi force-pushed the abortsignal-any-implemantation branch from 413e398 to 035c07f Compare May 2, 2023 14:17
lib/internal/validators.js Outdated Show resolved Hide resolved
@atlowChemi atlowChemi force-pushed the abortsignal-any-implemantation branch from 035c07f to 5e81dac Compare May 2, 2023 14:43
@atlowChemi atlowChemi marked this pull request as ready for review May 2, 2023 15:44
@atlowChemi atlowChemi force-pushed the abortsignal-any-implemantation branch from 5e81dac to 3b3e6e5 Compare May 2, 2023 16:19
@anonrig anonrig added the semver-minor PRs that contain new features and should be released in the next minor version. label May 2, 2023
doc/api/globals.md Outdated Show resolved Hide resolved
lib/internal/abort_controller.js Outdated Show resolved Hide resolved
lib/internal/abort_controller.js Show resolved Hide resolved
lib/internal/abort_controller.js Outdated Show resolved Hide resolved
@benjamingr
Copy link
Member

Don't we want to wait for browsers + the WhatWG DOM PR to land before implementing?

* @param {AbortSignal[]} signals
* @returns {AbortSignal}
*/
static any(signals) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be simplified to:

function any(signals) {
  const ac = new AbortController();
  validateAbortSignalArray(signals, 'signals');
  for(const signal of signals) {
    if (signal.aborted) {
      ac.abort(signal);
      return ac.signal;
    }
  }
  for(const signal of signals) {
    signal.addEventListener("abort", (e) => {
      ac.signal.abort(e);
    }, { once: true, [kWeakListener]: ac.signal });
  }
  return ac.signal;
}

Since we already support weak listeners on event handlers inside core. You've effectively reimplemented parts of this in this PR and we can reuse the existing machinery.

Copy link
Member Author

@atlowChemi atlowChemi May 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benjamingr The implementation currently is spec compliant. do we want to implement it differently than the spec?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atlowChemi the spec talks about behavior not about how we implement the spec behavior. We can be spec compliant even if we don't follow the spec machinery word for word as long as we have the same external API and the same behavior.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benjamingr Got it, thanks for the explanation 🙂
That said, I tried implementing based on your suggestion, but it causes the execution order to change (which is breaking the tests - as it doesn't comply with spec). I was unable to figure this out, any suggestions?

[UNEXPECTED_FAILURE][FAIL] Abort events for AbortSignal.any() signals fire in the right order (using AbortController)
assert_equals: expected "01234" but got "41230"
    at Test.<anonymous> (/Users/chemiatlow/Documents/node/test/fixtures/wpt/dom/abort/resources/abort-signal-any-tests.js:183:5)
    at Test.step (/Users/chemiatlow/Documents/node/test/fixtures/wpt/resources/testharness.js:2595:25)
    at test (/Users/chemiatlow/Documents/node/test/fixtures/wpt/resources/testharness.js:628:30)
    at abortSignalAnyTests (/Users/chemiatlow/Documents/node/test/fixtures/wpt/dom/abort/resources/abort-signal-any-tests.js:164:3)
    at /Users/chemiatlow/Documents/node/test/fixtures/wpt/dom/abort/abort-signal-any.any.js:4:1
Command: /Users/chemiatlow/Documents/node/out/Release/node  /Users/chemiatlow/Documents/node/test/wpt/test-abort.js 'abort-signal-any.any.js'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting and really surprising behavior for the signal "abort" to not be in "listener added order. We can work around it but I wonder if there is context regarding why they did this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worst case this is just event listener order and not hard to work around but I wanna understand why

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See spec discussion in whatwg/dom#1152 (comment)

Just for completeness the way to work around it with my suggestion implementation without absorbing the additional complexity is to add the ability to tag event listeners as "run first" perhaps in an EventTarget subclass.

I generally think it's better to fix it in the spec but to be absolutely clear I feel strongly our behavior should be aligned with the spec as that was a big part of the motivation to implement AbortSignal and web standard more generally and diverging would defeat the purpose.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benjamingr I am not fully sure I follow the discussion in whatwg... As far as I understood, concerns were raised regarding using addEventListener related to user-land being able to call stopImmediatePropagation.
Were does this suggestion stand currently?
Should it be implemented?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We patiently wait (or engage in the discussion) until @shaseley and @annevk decide and then follow what they decide. I've raised my concerns there but I feel strongly we should follow whatever consensus that PR concludes with and the correct spec.

Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start!

@atlowChemi
Copy link
Member Author

The tests seem to be failing due to #47635 (specifically the change from Map to Set which doesn't have a get function - https://github.com/nodejs/node/pull/47635/files#diff-044c4e3128d6bcf139f31a36cf054f2e59954367d4493e1c1b1a42d7b9d88067R481)
@MoLow @benjamingr @anonrig @panva What should I be doing about this?

@panva
Copy link
Member

panva commented May 2, 2023

The tests seem to be failing due to #47635 (specifically the change from Map to Set which doesn't have a get function - #47635 (files)) @MoLow @benjamingr @anonrig @panva What should I be doing about this?

Good news is that #47826 deals with the runner issue. Bad news is that it's not why the tests are failing here. The parent process which executes the WPT files is exiting while the underlying wpt worker apparently still runs.

./node test/wpt/test-abort.js abort-signal-any.any.js
[PASS] AbortSignal.any() works with an empty array of signals
[PASS] AbortSignal.any() follows a single signal (using AbortController)
[PASS] AbortSignal.any() follows multiple signals (using AbortController)
[PASS] AbortSignal.any() returns an aborted signal if passed an aborted signal (using AbortController)
[PASS] AbortSignal.any() can be passed the same signal more than once (using AbortController)
[PASS] AbortSignal.any() uses the first instance of a duplicate signal (using AbortController)
[PASS] AbortSignal.any() signals are composable (using AbortController)
[PASS] AbortSignal.any() works with intermediate signals (using AbortController)
[PASS] Abort events for AbortSignal.any() signals fire in the right order (using AbortController)
[UNEXPECTED_FAILURE][INCOMPLETE] Unknown


{
  "abort-signal-any.any.js": {
    "fail": {
      "unexpected": [
        "Unknown"
      ]
    }
  }
}

Ran 1/1 tests, 0 skipped, 0 passed, 0 expected failures, 1 unexpected failures, 0 unexpected passes
/repo/node/test/common/wpt.js:748
        throw new Error(
        ^

Error: Found 1 unexpected failures. Consider updating test/wpt/status/dom/abort.json for these files:
abort-signal-any.any.js
    at process.<anonymous> (/repo/node/test/common/wpt.js:748:15)
    at process.emit (node:events:511:28)

Node.js v21.0.0-pre

@panva
Copy link
Member

panva commented May 2, 2023

This particular test doesn't log a status

  async_test(t => {
    const controller = new controllerInterface();
    const timeoutSignal = AbortSignal.timeout(5);

    const combinedSignal = signalInterface.any([controller.signal, timeoutSignal]);

    combinedSignal.onabort = t.step_func_done(() => {
      assert_true(combinedSignal.aborted);
      assert_true(combinedSignal.reason instanceof DOMException,
          "combinedSignal.reason is a DOMException");
      assert_equals(combinedSignal.reason.name, "TimeoutError",
          "combinedSignal.reason is a TimeoutError");
    });
  }, `${desc} works with signals returned by AbortSignal.timeout() ${suffix}`);

@panva
Copy link
Member

panva commented May 2, 2023

Using this branch, the test just never completes, onabort is not executed.

const assert = require('node:assert')

const controller = new AbortController();
const timeoutSignal = AbortSignal.timeout(5);

const combinedSignal = AbortSignal.any([controller.signal, timeoutSignal]);

combinedSignal.onabort = () => {
    // This never runs
    assert.equal(combinedSignal.aborted, true);
    assert.equal(combinedSignal.reason instanceof DOMException, true);
    assert.equal(combinedSignal.reason.name, "TimeoutError");
}

@panva
Copy link
Member

panva commented May 2, 2023

Don't we want to wait for browsers + the WhatWG DOM PR to land before implementing?

I come with the same question, so far only chromium has an implementation but not in a stable release, so it's only available behind an experimental flag.

If this were marked as experimental in Node docs and had a runtime warning it would be fine. It can easily follow the spec as it evolves and the status can be changed when it lands in the DOM spec and others adopt it.

That would be the same that we do for https://wicg.github.io/webcrypto-secure-curves/ in WebCryptoAPI, it's marked as experimental in the docs and emits an experimental warning upon first use.

Tests of our own are also needed, running and passing WPTs are complimentary but in my opinion don't remove the need to thoroughly test the feature.

@benjamingr benjamingr mentioned this pull request May 3, 2023
4 tasks
@atlowChemi atlowChemi force-pushed the abortsignal-any-implemantation branch from 3b3e6e5 to 35cef89 Compare May 4, 2023 05:14
* @returns {AbortSignal}
*/
static any(signals) {
emitExperimentalWarning('AbortSignal.any');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't worry about emitting a warning here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine either way, but in previous comments I was asked to add it 🙂
#47821 (comment)
#47821 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine without a warning when the API lands at whatwg/dom but not before - so if you need someone who feels strongly about having an experimental warning until then - I'm that person :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is supposed to land Monday so as long as this lands after that I'm fine with it landing without a warning.

@atlowChemi atlowChemi force-pushed the abortsignal-any-implemantation branch from 35cef89 to c36aaf6 Compare May 5, 2023 09:40
@atlowChemi
Copy link
Member Author

Tests of our own are also needed, running and passing WPTs are complimentary but in my opinion don't remove the need to thoroughly test the feature.

@panva I added UT 🙂
I am currently struggling with the WPT test that is hanging (the test you mentioned here "the test just never completes, onabort is not executed."). I was not able to figure out how to connect a debugger to the test itself, but I see when running the same logic outside of the WPT scope it works fine. Do you have any suggestions? 🙏🏽

@panva
Copy link
Member

panva commented May 5, 2023

Works fine as in the onabort block gets executed now? It didn't when I tried.

I have not tried attaching a debugger to WPTs.

@atlowChemi
Copy link
Member Author

Works fine as in the onabort block gets executed now? It didn't when I tried.

Yes - but not when running via the WPT test, but as regular JS execution:

image

@panva
Copy link
Member

panva commented May 5, 2023

Works fine as in the onabort block gets executed now? It didn't when I tried.

Yes - but not when running via the WPT test, but as regular JS execution:

const assert = require('node:assert');

const controller = new AbortController();
const timeoutSignal = AbortSignal.timeout(5);

const combinedSignal = AbortSignal.any([controller.signal, timeoutSignal]);

combinedSignal.onabort = () => {
  // This never runs
    console.log('foo')
    assert.equal(combinedSignal.aborted, true);
    assert.equal(combinedSignal.reason instanceof DOMException, true);
    assert.equal(combinedSignal.reason.name, "TimeoutError");
}

This still doesn't log for me, onabort is not run. Only when I add settimeout to the script. But the WPT doesn't, maybe it should, I don't know the spec enough to say.

cc @shaseley

panva added a commit to panva/wpt that referenced this pull request May 7, 2023
Refs:  nodejs/node#47821 (comment)

Because of the (i assume) weak references this test doesn't cause the Node.js worker that executes the tests to emit result and therefore completion of the suite.

This change makes it so that a timeout is registered that should never be reached whilst still testing the combinedSignal behaviours.
@panva panva added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label May 7, 2023
fasenderos pushed a commit to fasenderos/node that referenced this pull request May 22, 2023
PR-URL: nodejs#47821
Fixes: nodejs#47811
Refs: whatwg/dom#1152
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request May 30, 2023
PR-URL: #47821
Fixes: #47811
Refs: whatwg/dom#1152
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos added a commit that referenced this pull request Jun 4, 2023
Notable changes:

deps:
  * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
lib:
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) #47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) #47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) #48151
test:
  * unflake test-vm-timeout-escape-nexttick (Santiago Gimeno) #48078
tools:
  * update LICENSE and license-builder.sh (Santiago Gimeno) #48078

PR-URL: TODO
targos added a commit that referenced this pull request Jun 4, 2023
Notable changes:

deps:
  * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
lib:
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) #47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) #47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) #48151
stream:
  * deprecate asIndexedPairs (Chemi Atlow) #48102

PR-URL: #48332
@targos targos mentioned this pull request Jun 4, 2023
targos added a commit that referenced this pull request Jun 5, 2023
Notable changes:

deps:
  * upgrade to libuv 1.45.0, including significant performance
    improvements to file system operations on Linux (Santiago Gimeno) #48078
doc:
  * add Ruy Adorno to list of TSC members (Michael Dawson) #48172
  * mark Node.js 14 as End-of-Life (Richard Lau) #48023
lib:
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) #47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) #47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) #48151
stream:
  * deprecate asIndexedPairs (Chemi Atlow) #48102

PR-URL: #48332
RafaelGSS pushed a commit that referenced this pull request Jun 7, 2023
Notable changes:

deps:
  * upgrade to libuv 1.45.0, including significant performance
    improvements to file system operations on Linux (Santiago Gimeno) #48078
doc:
  * add Ruy Adorno to list of TSC members (Michael Dawson) #48172
  * mark Node.js 14 as End-of-Life (Richard Lau) #48023
lib:
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) #47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) #47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) #48151
stream:
  * deprecate asIndexedPairs (Chemi Atlow) #48102

PR-URL: #48332
RafaelGSS pushed a commit that referenced this pull request Jun 8, 2023
Notable changes:

deps:
  * upgrade to libuv 1.45.0, including significant performance
    improvements to file system operations on Linux (Santiago Gimeno) #48078
doc:
  * add Ruy Adorno to list of TSC members (Michael Dawson) #48172
  * mark Node.js 14 as End-of-Life (Richard Lau) #48023
lib:
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) #47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) #47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) #48151
stream:
  * deprecate asIndexedPairs (Chemi Atlow) #48102

PR-URL: #48332
@danielleadams danielleadams added the backport-blocked-v18.x PRs that should land on the v18.x-staging branch but are blocked by another PR's pending backport. label Jul 4, 2023
@danielleadams
Copy link
Member

Blocked by #47635

atlowChemi added a commit to atlowChemi/node that referenced this pull request Jul 17, 2023
PR-URL: nodejs#47821
Fixes: nodejs#47811
Refs: whatwg/dom#1152
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
danielleadams pushed a commit that referenced this pull request Jul 17, 2023
PR-URL: #47821
Backport-PR-URL: #48800
Fixes: #47811
Refs: whatwg/dom#1152
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
@danielleadams danielleadams added backported-to-v18.x PRs backported to the v18.x-staging branch. and removed backport-blocked-v18.x PRs that should land on the v18.x-staging branch but are blocked by another PR's pending backport. labels Jul 17, 2023
danielleadams added a commit that referenced this pull request Jul 17, 2023
Notable changes:

Ada 2.0
Node.js v18.17.0 comes with the latest version of the URL parser, Ada. This
update brings significant performance improvements to URL parsing, including
enhancements to the url.domainToASCII and url.domainToUnicode functions
in node:url.

Ada 2.0 has been integrated into the Node.js codebase, ensuring that all
parts of the application can benefit from the improved performance. Additionally,
Ada 2.0 features a significant performance boost over its predecessor, Ada 1.0.4,
while also eliminating the need for the ICU requirement for URL hostname parsing.

Contributed by Yagiz Nizipli and Daniel Lemire in #47339

Web Crypto API
Web Crypto API functions' arguments are now coerced and validated as per
their WebIDL definitions like in other Web Crypto API implementations. This
further improves interoperability with other implementations of Web Crypto API.

Contributed by Filip Skokan in #46067

crypto:
  * update root certificates to NSS 3.89 (Node.js GitHub Bot) #47659
dns:
  * (SEMVER-MINOR) expose getDefaultResultOrder (btea) #46973
doc:
  * add ovflowd to collaborators (Claudio Wunder) #47844
  * add KhafraDev to collaborators (Matthew Aitken) #47510
* events:
  * (SEMVER-MINOR) add getMaxListeners method (Matthew Aitken) #47039
fs:
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) #47084
  * (SEMVER-MINOR) add recursive option to readdir and opendir (Ethan Arrowood) #41439
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) #47084
  * (SEMVER-MINOR) implement byob mode for readableWebStream() (Debadree Chatterjee) #46933
http:
  * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) #47732
  * (SEMVER-MINOR) remove internal error in assignSocket (Matteo Collina) #47723
  * (SEMVER-MINOR) add highWaterMark opt in http.createServer (HinataKah0) #47405
lib:
  * (SEMVER-MINOR) add webstreams to Duplex.from() (Debadree Chatterjee) #46190
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) #47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) #47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) #48151
  * (SEMVER-MINOR) deprecate napi_module_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) preserve object mode in compose (Raz Luvaton) #47413
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (#46929) (Robert Nagy) #46929
test:
  * unflake test-vm-timeout-escape-nexttick (Santiago Gimeno) #48078
test_runner:
  * (SEMVER-MINOR) add shorthands to `test` (Chemi Atlow) #47909
  * (SEMVER-MINOR) support combining coverage reports (Colin Ihrig) #47686
  * (SEMVER-MINOR) execute before hook on test (Chemi Atlow) #47586
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238
tools:
  * update LICENSE and license-builder.sh (Santiago Gimeno) #48078
url:
  * (SEMVER-MINOR) implement URL.canParse (Matthew Aitken) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: #48694
danielleadams added a commit that referenced this pull request Jul 18, 2023
Notable changes:

Ada 2.0
Node.js v18.17.0 comes with the latest version of the URL parser, Ada. This
update brings significant performance improvements to URL parsing, including
enhancements to the url.domainToASCII and url.domainToUnicode functions
in node:url.

Ada 2.0 has been integrated into the Node.js codebase, ensuring that all
parts of the application can benefit from the improved performance. Additionally,
Ada 2.0 features a significant performance boost over its predecessor, Ada 1.0.4,
while also eliminating the need for the ICU requirement for URL hostname parsing.

Contributed by Yagiz Nizipli and Daniel Lemire in #47339

Web Crypto API
Web Crypto API functions' arguments are now coerced and validated as per
their WebIDL definitions like in other Web Crypto API implementations. This
further improves interoperability with other implementations of Web Crypto API.

Contributed by Filip Skokan in #46067

crypto:
  * update root certificates to NSS 3.89 (Node.js GitHub Bot) #47659
dns:
  * (SEMVER-MINOR) expose getDefaultResultOrder (btea) #46973
doc:
  * add ovflowd to collaborators (Claudio Wunder) #47844
  * add KhafraDev to collaborators (Matthew Aitken) #47510
* events:
  * (SEMVER-MINOR) add getMaxListeners method (Matthew Aitken) #47039
fs:
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) #47084
  * (SEMVER-MINOR) add recursive option to readdir and opendir (Ethan Arrowood) #41439
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) #47084
  * (SEMVER-MINOR) implement byob mode for readableWebStream() (Debadree Chatterjee) #46933
http:
  * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) #47732
  * (SEMVER-MINOR) remove internal error in assignSocket (Matteo Collina) #47723
  * (SEMVER-MINOR) add highWaterMark opt in http.createServer (HinataKah0) #47405
lib:
  * (SEMVER-MINOR) add webstreams to Duplex.from() (Debadree Chatterjee) #46190
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) #47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) #47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) #48151
  * (SEMVER-MINOR) deprecate napi_module_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) preserve object mode in compose (Raz Luvaton) #47413
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (#46929) (Robert Nagy) #46929
test:
  * unflake test-vm-timeout-escape-nexttick (Santiago Gimeno) #48078
test_runner:
  * (SEMVER-MINOR) add shorthands to `test` (Chemi Atlow) #47909
  * (SEMVER-MINOR) support combining coverage reports (Colin Ihrig) #47686
  * (SEMVER-MINOR) execute before hook on test (Chemi Atlow) #47586
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238
tools:
  * update LICENSE and license-builder.sh (Santiago Gimeno) #48078
url:
  * (SEMVER-MINOR) implement URL.canParse (Matthew Aitken) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: #48694
danielleadams added a commit that referenced this pull request Jul 18, 2023
Notable changes:

Ada 2.0
Node.js v18.17.0 comes with the latest version of the URL parser, Ada. This
update brings significant performance improvements to URL parsing, including
enhancements to the url.domainToASCII and url.domainToUnicode functions
in node:url.

Ada 2.0 has been integrated into the Node.js codebase, ensuring that all
parts of the application can benefit from the improved performance. Additionally,
Ada 2.0 features a significant performance boost over its predecessor, Ada 1.0.4,
while also eliminating the need for the ICU requirement for URL hostname parsing.

Contributed by Yagiz Nizipli and Daniel Lemire in #47339

Web Crypto API
Web Crypto API functions' arguments are now coerced and validated as per
their WebIDL definitions like in other Web Crypto API implementations. This
further improves interoperability with other implementations of Web Crypto API.

Contributed by Filip Skokan in #46067

crypto:
  * update root certificates to NSS 3.89 (Node.js GitHub Bot) #47659
dns:
  * (SEMVER-MINOR) expose getDefaultResultOrder (btea) #46973
doc:
  * add ovflowd to collaborators (Claudio Wunder) #47844
  * add KhafraDev to collaborators (Matthew Aitken) #47510
* events:
  * (SEMVER-MINOR) add getMaxListeners method (Matthew Aitken) #47039
fs:
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) #47084
  * (SEMVER-MINOR) add recursive option to readdir and opendir (Ethan Arrowood) #41439
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) #47084
  * (SEMVER-MINOR) implement byob mode for readableWebStream() (Debadree Chatterjee) #46933
http:
  * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) #47732
  * (SEMVER-MINOR) remove internal error in assignSocket (Matteo Collina) #47723
  * (SEMVER-MINOR) add highWaterMark opt in http.createServer (HinataKah0) #47405
lib:
  * (SEMVER-MINOR) add webstreams to Duplex.from() (Debadree Chatterjee) #46190
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) #47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) #47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) #48151
  * (SEMVER-MINOR) deprecate napi_module_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) preserve object mode in compose (Raz Luvaton) #47413
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (#46929) (Robert Nagy) #46929
test:
  * unflake test-vm-timeout-escape-nexttick (Santiago Gimeno) #48078
test_runner:
  * (SEMVER-MINOR) add shorthands to `test` (Chemi Atlow) #47909
  * (SEMVER-MINOR) support combining coverage reports (Colin Ihrig) #47686
  * (SEMVER-MINOR) execute before hook on test (Chemi Atlow) #47586
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238
tools:
  * update LICENSE and license-builder.sh (Santiago Gimeno) #48078
url:
  * (SEMVER-MINOR) implement URL.canParse (Matthew Aitken) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: #48694
pluris pushed a commit to pluris/node that referenced this pull request Aug 6, 2023
Notable changes:

Ada 2.0
Node.js v18.17.0 comes with the latest version of the URL parser, Ada. This
update brings significant performance improvements to URL parsing, including
enhancements to the url.domainToASCII and url.domainToUnicode functions
in node:url.

Ada 2.0 has been integrated into the Node.js codebase, ensuring that all
parts of the application can benefit from the improved performance. Additionally,
Ada 2.0 features a significant performance boost over its predecessor, Ada 1.0.4,
while also eliminating the need for the ICU requirement for URL hostname parsing.

Contributed by Yagiz Nizipli and Daniel Lemire in nodejs#47339

Web Crypto API
Web Crypto API functions' arguments are now coerced and validated as per
their WebIDL definitions like in other Web Crypto API implementations. This
further improves interoperability with other implementations of Web Crypto API.

Contributed by Filip Skokan in nodejs#46067

crypto:
  * update root certificates to NSS 3.89 (Node.js GitHub Bot) nodejs#47659
dns:
  * (SEMVER-MINOR) expose getDefaultResultOrder (btea) nodejs#46973
doc:
  * add ovflowd to collaborators (Claudio Wunder) nodejs#47844
  * add KhafraDev to collaborators (Matthew Aitken) nodejs#47510
* events:
  * (SEMVER-MINOR) add getMaxListeners method (Matthew Aitken) nodejs#47039
fs:
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) nodejs#47084
  * (SEMVER-MINOR) add recursive option to readdir and opendir (Ethan Arrowood) nodejs#41439
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) nodejs#47084
  * (SEMVER-MINOR) implement byob mode for readableWebStream() (Debadree Chatterjee) nodejs#46933
http:
  * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) nodejs#47732
  * (SEMVER-MINOR) remove internal error in assignSocket (Matteo Collina) nodejs#47723
  * (SEMVER-MINOR) add highWaterMark opt in http.createServer (HinataKah0) nodejs#47405
lib:
  * (SEMVER-MINOR) add webstreams to Duplex.from() (Debadree Chatterjee) nodejs#46190
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) nodejs#47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) nodejs#47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) nodejs#48151
  * (SEMVER-MINOR) deprecate napi_module_register (Vladimir Morozov) nodejs#46319
stream:
  * (SEMVER-MINOR) preserve object mode in compose (Raz Luvaton) nodejs#47413
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (nodejs#46929) (Robert Nagy) nodejs#46929
test:
  * unflake test-vm-timeout-escape-nexttick (Santiago Gimeno) nodejs#48078
test_runner:
  * (SEMVER-MINOR) add shorthands to `test` (Chemi Atlow) nodejs#47909
  * (SEMVER-MINOR) support combining coverage reports (Colin Ihrig) nodejs#47686
  * (SEMVER-MINOR) execute before hook on test (Chemi Atlow) nodejs#47586
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) nodejs#47238
tools:
  * update LICENSE and license-builder.sh (Santiago Gimeno) nodejs#48078
url:
  * (SEMVER-MINOR) implement URL.canParse (Matthew Aitken) nodejs#47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) nodejs#47286

PR-URL: nodejs#48694
pluris pushed a commit to pluris/node that referenced this pull request Aug 7, 2023
Notable changes:

Ada 2.0
Node.js v18.17.0 comes with the latest version of the URL parser, Ada. This
update brings significant performance improvements to URL parsing, including
enhancements to the url.domainToASCII and url.domainToUnicode functions
in node:url.

Ada 2.0 has been integrated into the Node.js codebase, ensuring that all
parts of the application can benefit from the improved performance. Additionally,
Ada 2.0 features a significant performance boost over its predecessor, Ada 1.0.4,
while also eliminating the need for the ICU requirement for URL hostname parsing.

Contributed by Yagiz Nizipli and Daniel Lemire in nodejs#47339

Web Crypto API
Web Crypto API functions' arguments are now coerced and validated as per
their WebIDL definitions like in other Web Crypto API implementations. This
further improves interoperability with other implementations of Web Crypto API.

Contributed by Filip Skokan in nodejs#46067

crypto:
  * update root certificates to NSS 3.89 (Node.js GitHub Bot) nodejs#47659
dns:
  * (SEMVER-MINOR) expose getDefaultResultOrder (btea) nodejs#46973
doc:
  * add ovflowd to collaborators (Claudio Wunder) nodejs#47844
  * add KhafraDev to collaborators (Matthew Aitken) nodejs#47510
* events:
  * (SEMVER-MINOR) add getMaxListeners method (Matthew Aitken) nodejs#47039
fs:
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) nodejs#47084
  * (SEMVER-MINOR) add recursive option to readdir and opendir (Ethan Arrowood) nodejs#41439
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) nodejs#47084
  * (SEMVER-MINOR) implement byob mode for readableWebStream() (Debadree Chatterjee) nodejs#46933
http:
  * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) nodejs#47732
  * (SEMVER-MINOR) remove internal error in assignSocket (Matteo Collina) nodejs#47723
  * (SEMVER-MINOR) add highWaterMark opt in http.createServer (HinataKah0) nodejs#47405
lib:
  * (SEMVER-MINOR) add webstreams to Duplex.from() (Debadree Chatterjee) nodejs#46190
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) nodejs#47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) nodejs#47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) nodejs#48151
  * (SEMVER-MINOR) deprecate napi_module_register (Vladimir Morozov) nodejs#46319
stream:
  * (SEMVER-MINOR) preserve object mode in compose (Raz Luvaton) nodejs#47413
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (nodejs#46929) (Robert Nagy) nodejs#46929
test:
  * unflake test-vm-timeout-escape-nexttick (Santiago Gimeno) nodejs#48078
test_runner:
  * (SEMVER-MINOR) add shorthands to `test` (Chemi Atlow) nodejs#47909
  * (SEMVER-MINOR) support combining coverage reports (Colin Ihrig) nodejs#47686
  * (SEMVER-MINOR) execute before hook on test (Chemi Atlow) nodejs#47586
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) nodejs#47238
tools:
  * update LICENSE and license-builder.sh (Santiago Gimeno) nodejs#48078
url:
  * (SEMVER-MINOR) implement URL.canParse (Matthew Aitken) nodejs#47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) nodejs#47286

PR-URL: nodejs#48694
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Notable changes:

deps:
  * upgrade to libuv 1.45.0, including significant performance
    improvements to file system operations on Linux (Santiago Gimeno) nodejs#48078
doc:
  * add Ruy Adorno to list of TSC members (Michael Dawson) nodejs#48172
  * mark Node.js 14 as End-of-Life (Richard Lau) nodejs#48023
lib:
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) nodejs#47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) nodejs#47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) nodejs#48151
stream:
  * deprecate asIndexedPairs (Chemi Atlow) nodejs#48102

PR-URL: nodejs#48332
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Notable changes:

Ada 2.0
Node.js v18.17.0 comes with the latest version of the URL parser, Ada. This
update brings significant performance improvements to URL parsing, including
enhancements to the url.domainToASCII and url.domainToUnicode functions
in node:url.

Ada 2.0 has been integrated into the Node.js codebase, ensuring that all
parts of the application can benefit from the improved performance. Additionally,
Ada 2.0 features a significant performance boost over its predecessor, Ada 1.0.4,
while also eliminating the need for the ICU requirement for URL hostname parsing.

Contributed by Yagiz Nizipli and Daniel Lemire in nodejs#47339

Web Crypto API
Web Crypto API functions' arguments are now coerced and validated as per
their WebIDL definitions like in other Web Crypto API implementations. This
further improves interoperability with other implementations of Web Crypto API.

Contributed by Filip Skokan in nodejs#46067

crypto:
  * update root certificates to NSS 3.89 (Node.js GitHub Bot) nodejs#47659
dns:
  * (SEMVER-MINOR) expose getDefaultResultOrder (btea) nodejs#46973
doc:
  * add ovflowd to collaborators (Claudio Wunder) nodejs#47844
  * add KhafraDev to collaborators (Matthew Aitken) nodejs#47510
* events:
  * (SEMVER-MINOR) add getMaxListeners method (Matthew Aitken) nodejs#47039
fs:
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) nodejs#47084
  * (SEMVER-MINOR) add recursive option to readdir and opendir (Ethan Arrowood) nodejs#41439
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) nodejs#47084
  * (SEMVER-MINOR) implement byob mode for readableWebStream() (Debadree Chatterjee) nodejs#46933
http:
  * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) nodejs#47732
  * (SEMVER-MINOR) remove internal error in assignSocket (Matteo Collina) nodejs#47723
  * (SEMVER-MINOR) add highWaterMark opt in http.createServer (HinataKah0) nodejs#47405
lib:
  * (SEMVER-MINOR) add webstreams to Duplex.from() (Debadree Chatterjee) nodejs#46190
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) nodejs#47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) nodejs#47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) nodejs#48151
  * (SEMVER-MINOR) deprecate napi_module_register (Vladimir Morozov) nodejs#46319
stream:
  * (SEMVER-MINOR) preserve object mode in compose (Raz Luvaton) nodejs#47413
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (nodejs#46929) (Robert Nagy) nodejs#46929
test:
  * unflake test-vm-timeout-escape-nexttick (Santiago Gimeno) nodejs#48078
test_runner:
  * (SEMVER-MINOR) add shorthands to `test` (Chemi Atlow) nodejs#47909
  * (SEMVER-MINOR) support combining coverage reports (Colin Ihrig) nodejs#47686
  * (SEMVER-MINOR) execute before hook on test (Chemi Atlow) nodejs#47586
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) nodejs#47238
tools:
  * update LICENSE and license-builder.sh (Santiago Gimeno) nodejs#48078
url:
  * (SEMVER-MINOR) implement URL.canParse (Matthew Aitken) nodejs#47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) nodejs#47286

PR-URL: nodejs#48694
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Notable changes:

deps:
  * upgrade to libuv 1.45.0, including significant performance
    improvements to file system operations on Linux (Santiago Gimeno) nodejs#48078
doc:
  * add Ruy Adorno to list of TSC members (Michael Dawson) nodejs#48172
  * mark Node.js 14 as End-of-Life (Richard Lau) nodejs#48023
lib:
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) nodejs#47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) nodejs#47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) nodejs#48151
stream:
  * deprecate asIndexedPairs (Chemi Atlow) nodejs#48102

PR-URL: nodejs#48332
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Notable changes:

Ada 2.0
Node.js v18.17.0 comes with the latest version of the URL parser, Ada. This
update brings significant performance improvements to URL parsing, including
enhancements to the url.domainToASCII and url.domainToUnicode functions
in node:url.

Ada 2.0 has been integrated into the Node.js codebase, ensuring that all
parts of the application can benefit from the improved performance. Additionally,
Ada 2.0 features a significant performance boost over its predecessor, Ada 1.0.4,
while also eliminating the need for the ICU requirement for URL hostname parsing.

Contributed by Yagiz Nizipli and Daniel Lemire in nodejs#47339

Web Crypto API
Web Crypto API functions' arguments are now coerced and validated as per
their WebIDL definitions like in other Web Crypto API implementations. This
further improves interoperability with other implementations of Web Crypto API.

Contributed by Filip Skokan in nodejs#46067

crypto:
  * update root certificates to NSS 3.89 (Node.js GitHub Bot) nodejs#47659
dns:
  * (SEMVER-MINOR) expose getDefaultResultOrder (btea) nodejs#46973
doc:
  * add ovflowd to collaborators (Claudio Wunder) nodejs#47844
  * add KhafraDev to collaborators (Matthew Aitken) nodejs#47510
* events:
  * (SEMVER-MINOR) add getMaxListeners method (Matthew Aitken) nodejs#47039
fs:
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) nodejs#47084
  * (SEMVER-MINOR) add recursive option to readdir and opendir (Ethan Arrowood) nodejs#41439
  * (SEMVER-MINOR) add support for mode flag to specify the copy behavior (Tetsuharu Ohzeki) nodejs#47084
  * (SEMVER-MINOR) implement byob mode for readableWebStream() (Debadree Chatterjee) nodejs#46933
http:
  * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) nodejs#47732
  * (SEMVER-MINOR) remove internal error in assignSocket (Matteo Collina) nodejs#47723
  * (SEMVER-MINOR) add highWaterMark opt in http.createServer (HinataKah0) nodejs#47405
lib:
  * (SEMVER-MINOR) add webstreams to Duplex.from() (Debadree Chatterjee) nodejs#46190
  * (SEMVER-MINOR) implement AbortSignal.any() (Chemi Atlow) nodejs#47821
module:
  * change default resolver to not throw on unknown scheme (Gil Tayar) nodejs#47824
node-api:
  * (SEMVER-MINOR) define version 9 (Chengzhong Wu) nodejs#48151
  * (SEMVER-MINOR) deprecate napi_module_register (Vladimir Morozov) nodejs#46319
stream:
  * (SEMVER-MINOR) preserve object mode in compose (Raz Luvaton) nodejs#47413
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (nodejs#46929) (Robert Nagy) nodejs#46929
test:
  * unflake test-vm-timeout-escape-nexttick (Santiago Gimeno) nodejs#48078
test_runner:
  * (SEMVER-MINOR) add shorthands to `test` (Chemi Atlow) nodejs#47909
  * (SEMVER-MINOR) support combining coverage reports (Colin Ihrig) nodejs#47686
  * (SEMVER-MINOR) execute before hook on test (Chemi Atlow) nodejs#47586
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) nodejs#47238
tools:
  * update LICENSE and license-builder.sh (Santiago Gimeno) nodejs#48078
url:
  * (SEMVER-MINOR) implement URL.canParse (Matthew Aitken) nodejs#47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) nodejs#47286

PR-URL: nodejs#48694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backported-to-v18.x PRs backported to the v18.x-staging branch. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. experimental Issues and PRs related to experimental features. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement AbortSignal.any()
9 participants