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

util: expose toUSVString #39814

Closed
wants to merge 4 commits into from
Closed

util: expose toUSVString #39814

wants to merge 4 commits into from

Conversation

@ronag
Copy link
Member

@ronag ronag commented Aug 19, 2021

Expose toUSVString to it can be used by user libraries.

Refs: nodejs/undici#986

Expose toUSVString to it can be used by user libraries.

Refs: nodejs/undici#986
@ronag ronag force-pushed the expose-usvstring branch from f70adc5 to e04a10b Aug 19, 2021
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Aug 19, 2021

lib/util.js Outdated Show resolved Hide resolved
lib/internal/url.js Outdated Show resolved Hide resolved
Copy link
Member

@mcollina mcollina left a comment

+1 this needs docs

ronag and others added 2 commits Aug 20, 2021
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@ronag ronag requested a review from mcollina Aug 20, 2021
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Aug 20, 2021

lpinca
lpinca approved these changes Aug 20, 2021
test/parallel/test-util.js Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Aug 21, 2021

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Aug 21, 2021

lpinca added a commit that referenced this issue Aug 22, 2021
Expose toUSVString to it can be used by user libraries.

PR-URL: #39814
Refs: nodejs/undici#986
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@lpinca
Copy link
Member

@lpinca lpinca commented Aug 22, 2021

Landed in 82ae00c.

@lpinca lpinca closed this Aug 22, 2021
lpinca added a commit that referenced this issue Aug 22, 2021
Expose toUSVString so it can be used by user libraries.

PR-URL: #39814
Refs: nodejs/undici#986
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
doc/api/util.md Show resolved Hide resolved
targos added a commit that referenced this issue Aug 22, 2021
Expose toUSVString so it can be used by user libraries.

PR-URL: #39814
Refs: nodejs/undici#986
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos added a commit that referenced this issue Aug 25, 2021
Notable changes:

doc:
  * deprecate type coercion for `dns.lookup` options (Antoine du Hamel) #38906
stream:
  * (SEMVER-MINOR) add `stream.Duplex.from` utility (Robert Nagy) #39519
  * (SEMVER-MINOR) add `isDisturbed` helper (Robert Nagy) #39628
util:
  * (SEMVER-MINOR) expose `toUSVString` (Robert Nagy) #39814

PR-URL: #39875
targos added a commit that referenced this issue Aug 25, 2021
Notable changes:

doc:
  * deprecate type coercion for `dns.lookup` options (Antoine du Hamel) #38906
stream:
  * (SEMVER-MINOR) add `stream.Duplex.from` utility (Robert Nagy) #39519
  * (SEMVER-MINOR) add `isDisturbed` helper (Robert Nagy) #39628
util:
  * (SEMVER-MINOR) expose `toUSVString` (Robert Nagy) #39814

PR-URL: #39875
@@ -53,6 +58,18 @@ const experimentalWarnings = new SafeSet();

const colorRegExp = /\u001b\[\d\d?m/g; // eslint-disable-line no-control-regex

const unpairedSurrogateRe =
/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;
Copy link
Contributor

@mathiasbynens mathiasbynens Aug 25, 2021

Suggested change
/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;
/\p{Surrogate}/u;

Copy link
Contributor

@mathiasbynens mathiasbynens Aug 26, 2021

Patch: #39891

Copy link
Member

@lpinca lpinca Aug 26, 2021

I tried both this and negative lookbehind but they are slower.

import Benchmark from 'benchmark';

const re1 =
  /(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;
const re2 =
  /(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;
const re3 = /\p{Surrogate}/u;

const str = 'foo bar baz qux\uD800';

const suite = new Benchmark.Suite();

suite.add('re1', function () {
  re1.exec(str);
});

suite.add('re2', function () {
  re2.exec(str);
});

suite.add('re3', function () {
  re3.exec(str);
});

suite.on('cycle', function (event) {
  console.log(String(event.target));
});

suite.on('complete', function () {
  console.log('Fastest is ' + this.filter('fastest').map('name'));
});

suite.run({ async: true });
re1 x 11,864,933 ops/sec ±1.84% (87 runs sampled)
re2 x 8,003,257 ops/sec ±1.38% (90 runs sampled)
re3 x 7,856,998 ops/sec ±1.54% (88 runs sampled)
Fastest is re1

Copy link
Contributor

@mathiasbynens mathiasbynens Aug 26, 2021

It’s currently slower for the one specific scenario you’re testing, yes. Change the test string to something like:

const str = 'foo bar baz qux\uD800 foo \uDBFF foo \uDC00 foo \uDFFF';

…and now re3 is the second fastest:

re1 x 12,680,512 ops/sec ±0.75% (89 runs sampled)
re2 x 8,116,354 ops/sec ±0.68% (86 runs sampled)
re3 x 8,460,972 ops/sec ±3.11% (89 runs sampled)
Fastest is re1

Change it to

const str = '\uD800_\uDC00 foo \uD800 foo \uDBFF foo \uDC00 foo \uDFFF';

…and now re3 wins the race:

re1 x 22,303,784 ops/sec ±0.57% (89 runs sampled)
re2 x 21,924,367 ops/sec ±0.56% (86 runs sampled)
re3 x 23,288,295 ops/sec ±0.91% (87 runs sampled)
Fastest is re3

It’s possible to construct a benchmark that shows any three options as the “fastest”, but I don’t think it’s very meaningful.

Copy link
Member

@lpinca lpinca Aug 26, 2021

and now re3 wins the race

by a tiny margin and I think because the surrogate is at the beginning of the string.

Copy link
Member Author

@ronag ronag Aug 26, 2021

IMHO, we should optimize for the case where there are no surrogates. We could even have false positives if that helps with performance since this is just an optimization to avoid calling into native code.

Copy link
Member

@lpinca lpinca Aug 26, 2021

A benchmark where re3 is the fastest option by 2%? 4%? 10%

A benchmark where re3 is the fastest by 100%.

These are artificially constructed microbenchmarks, not real-world benchmarks. IMHO any of the three options seems fine from a performance perspective, and given that, we might as well go with the most readable & idiomatic option.

I agree, no one will notice this in a real world application but switching to a slower option for a minor readability improvement seems a bit silly to me. The original regex is not that complex. Also, fwiw, I think re2 is the most readable / easier to grok.

Copy link
Contributor

@mathiasbynens mathiasbynens Aug 26, 2021

IMHO, we should optimize for the case where there are no surrogates.

@ronag I tend to agree — that’s probably the common case. All three solutions perform similarly in this case:

const str = 'a'.repeat(1024 * 1024);
re1 x 48,489,097 ops/sec ±2.01% (92 runs sampled)
re2 x 47,831,569 ops/sec ±0.67% (89 runs sampled)
re3 x 48,501,127 ops/sec ±0.68% (89 runs sampled)
Fastest is re3

Do we all agree that all other things equal, \p{Surrogate} is the simplest, most readable pattern? Because in that case, this discussion becomes a matter of choosing which specific use case we optimize for: the one from @lpinca’s benchmark (lone lead surrogate at the end of a short string) or the one from mine (lone trail surrogate at the start of a short string). I think both are edge cases, and I doubt one is more common than the other.

A benchmark where re3 is the fastest option by 2%? 4%? 10%

A benchmark where re3 is the fastest by 100%.

@lpinca So you’d reject a readability improvement unless it also happens to double performance? Woah, that’s a high bar :)

Copy link
Member

@lpinca lpinca Aug 26, 2021

Yes, a 2x performance drop does not justify a minor readability improvement in my opinion. Anyway I'm not blocking #39891. Just wanted to report this because I tried with the negative lookbehind regex (re2) some time ago and decided to not open a PR because it was slower.

Copy link
Member

@lpinca lpinca Aug 26, 2021

So you’d reject a readability improvement unless it also happens to double performance? Woah, that’s a high bar :)

FWIW I would be happy with this readability improvement if performance was more or less the same for all inputs. This seems to be the case only for some inputs. Some inputs show a 100% performance drop, in those cases I would like to see a 100% improvement. I don't want it to be always 100% faster. If performance is the same ± 10% for all inputs, then that's great.

mathiasbynens added a commit to mathiasbynens/node that referenced this issue Aug 26, 2021
@@ -148,6 +148,8 @@ assert.strictEqual(util.isFunction(function() {}), true);
assert.strictEqual(util.isFunction(), false);
assert.strictEqual(util.isFunction('string'), false);

assert.strictEqual(util.toUSVString('string\ud801'), 'string\ufffd');
Copy link
Contributor

@mathiasbynens mathiasbynens Aug 26, 2021

Ideally we’d test lone lead surrogates, lone trail surrogates, and also surrogate pairs (to ensure those are unaffected). Patch: #39891

wwwzbwcom added a commit to wwwzbwcom/node that referenced this issue Aug 26, 2021
Notable changes:

doc:
  * deprecate type coercion for `dns.lookup` options (Antoine du Hamel) nodejs#38906
stream:
  * (SEMVER-MINOR) add `stream.Duplex.from` utility (Robert Nagy) nodejs#39519
  * (SEMVER-MINOR) add `isDisturbed` helper (Robert Nagy) nodejs#39628
util:
  * (SEMVER-MINOR) expose `toUSVString` (Robert Nagy) nodejs#39814

PR-URL: nodejs#39875
targos added a commit that referenced this issue Sep 4, 2021
Expose toUSVString so it can be used by user libraries.

PR-URL: #39814
Refs: nodejs/undici#986
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos added a commit that referenced this issue Sep 4, 2021
Notable changes:

assert:
  * change status of legacy asserts (James M Snell) #38113
async_hooks:
  * (SEMVER-MINOR) use new v8::Context PromiseHook API (Stephen Belanger) #36394
buffer:
  * (SEMVER-MINOR) introduce Blob (James M Snell) #36811
  * (SEMVER-MINOR) add base64url encoding option (Filip Skokan) #36952
child_process:
  * (SEMVER-MINOR) allow `options.cwd` receive a URL (Khaidi Chu) #38862
  * (SEMVER-MINOR) add timeout to spawn and fork (Nitzan Uziely) #37256
  * (SEMVER-MINOR) allow promisified exec to be cancel (Carlos Fuentes) #34249
  * (SEMVER-MINOR) add 'overlapped' stdio flag (Thiago Padilha) #29412
cli:
  * (SEMVER-MINOR) add -C alias for --conditions flag (Guy Bedford) #38755
  * (SEMVER-MINOR) add --node-memory-debug option (Anna Henningsen) #35537
deps:
  * (SEMVER-MINOR) V8: cherry-pick fa4cb172cde2 (Stephen Belanger) #38577
  * (SEMVER-MINOR) V8: cherry-pick 4c074516397b (Stephen Belanger) #36394
  * (SEMVER-MINOR) V8: cherry-pick 5f4413194480 (Stephen Belanger) #36394
  * (SEMVER-MINOR) V8: cherry-pick 272445f10927 (Stephen Belanger) #36394
  * (SEMVER-MINOR) V8: backport c0fceaa0669b (Stephen Belanger) #36394
dns:
  * (SEMVER-MINOR) add "tries" option to Resolve options (Luan Devecchi) #39610
  * (SEMVER-MINOR) allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
doc:
  * (SEMVER-MINOR) add missing change to resolver ctor (Luan Devecchi) #39610
  * refactor fs docs structure (Michaël Zasso) #37170
errors:
  * (SEMVER-MINOR) remove experimental from --enable-source-maps (Benjamin Coe) #37362
esm:
  * deprecate legacy main lookup for modules (Guy Bedford) #36918
fs:
  * (SEMVER-MINOR) allow empty string for temp directory prefix (Voltrex) #39028
  * (SEMVER-MINOR) allow no-params fsPromises fileHandle read (Nitzan Uziely) #38287
  * (SEMVER-MINOR) add support for async iterators to `fsPromises.writeFile` (HiroyukiYagihashi) #37490
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
  * (SEMVER-MINOR) add fsPromises.watch() (James M Snell) #37179
  * (SEMVER-MINOR) allow `position` parameter to be a `BigInt` in read and readSync (Darshan Sen) #36190
http2:
  * (SEMVER-MINOR) add support for sensitive headers (Anna Henningsen) #34145
  * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978
inspector:
  * mark as stable (Gireesh Punathil) #37748
module:
  * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) #38587
  * (SEMVER-MINOR) add support for `node:`‑prefixed `require(…)` calls (ExE Boss) #37246
net:
  * (SEMVER-MINOR) allow net.BlockList to use net.SocketAddress objects (James M Snell) #37917
  * (SEMVER-MINOR) add SocketAddress class (James M Snell) #37917
  * (SEMVER-MINOR) make net.BlockList cloneable (James M Snell) #37917
  * (SEMVER-MINOR) make blocklist family case insensitive (James M Snell) #34864
  * (SEMVER-MINOR) introduce net.BlockList (James M Snell) #34625
node-api:
  * (SEMVER-MINOR) allow retrieval of add-on file name (Gabriel Schulhof) #37195
os:
  * (SEMVER-MINOR) add os.devNull (Luigi Pinca) #38569
perf_hooks:
  * (SEMVER-MINOR) introduce createHistogram (James M Snell) #37155
process:
  * (SEMVER-MINOR) add api to enable source-maps programmatically (legendecas) #39085
  * (SEMVER-MINOR) add `'worker'` event (James M Snell) #38659
  * (SEMVER-MINOR) add direct access to rss without iterating pages (Adrien Maret) #34291
readline:
  * (SEMVER-MINOR) add AbortSignal support to interface (Nitzan Uziely) #37932
  * (SEMVER-MINOR) add support for the AbortController to the question method (Mattias Runge-Broberg) #33676
  * (SEMVER-MINOR) add history event and option to set initial history (Mattias Runge-Broberg) #33662
repl:
  * (SEMVER-MINOR) add auto‑completion for `node:`‑prefixed `require(…)` calls (ExE Boss) #37246
src:
  * (SEMVER-MINOR) call overload ctor from the original ctor (Darshan Sen) #39768
  * (SEMVER-MINOR) add a constructor overload for CallbackScope (Darshan Sen) #39768
  * (SEMVER-MINOR) fix align in cares_wrap.h (Luan) #39610
  * (SEMVER-MINOR) allow to negate boolean CLI flags (Michaël Zasso) #39023
  * (SEMVER-MINOR) add --heapsnapshot-near-heap-limit option (Joyee Cheung) #33010
  * (SEMVER-MINOR) move node_binding to modern THROW_ERR* (James M Snell) #35469
  * (SEMVER-MINOR) add way to get IsolateData and allocator from Environment (Anna Henningsen) #36441
  * (SEMVER-MINOR) allow preventing SetPrepareStackTraceCallback (Shelley Vohr) #36447
  * (SEMVER-MINOR) add maybe versions of EmitExit and EmitBeforeExit (Anna Henningsen) #35486
stream:
  * (SEMVER-MINOR) add readableDidRead if has been read from (Robert Nagy) #39589
  * (SEMVER-MINOR) pipeline accept Buffer as a valid first argument (Nitzan Uziely) #37739
test:
  * (SEMVER-MINOR) add wpt tests for Blob (Michaël Zasso) #36811
tls:
  * (SEMVER-MINOR) allow reading data into a static buffer (Andrey Pechkurov) #35753
tools:
  * (SEMVER-MINOR) add `Worker` to type-parser (James M Snell) #38659
url:
  * (SEMVER-MINOR) expose urlToHttpOptions utility (Yongsheng Zhang) #35960
util:
  * (SEMVER-MINOR) expose toUSVString (Robert Nagy) #39814
v8:
  * (SEMVER-MINOR) implement v8.stopCoverage() (Joyee Cheung) #33807
  * (SEMVER-MINOR) implement v8.takeCoverage() (Joyee Cheung) #33807
worker:
  * (SEMVER-MINOR) add setEnvironmentData/getEnvironmentData (James M Snell) #37486

PR-URL: TODO
targos added a commit that referenced this issue Sep 4, 2021
Notable changes:

assert:
  * change status of legacy asserts (James M Snell) #38113
buffer:
  * (SEMVER-MINOR) introduce Blob (James M Snell) #36811
  * (SEMVER-MINOR) add base64url encoding option (Filip Skokan) #36952
child_process:
  * (SEMVER-MINOR) allow `options.cwd` receive a URL (Khaidi Chu) #38862
  * (SEMVER-MINOR) add timeout to spawn and fork (Nitzan Uziely) #37256
  * (SEMVER-MINOR) allow promisified exec to be cancel (Carlos Fuentes) #34249
  * (SEMVER-MINOR) add 'overlapped' stdio flag (Thiago Padilha) #29412
cli:
  * (SEMVER-MINOR) add -C alias for --conditions flag (Guy Bedford) #38755
  * (SEMVER-MINOR) add --node-memory-debug option (Anna Henningsen) #35537
dns:
  * (SEMVER-MINOR) add "tries" option to Resolve options (Luan Devecchi) #39610
  * (SEMVER-MINOR) allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
doc:
  * (SEMVER-MINOR) add missing change to resolver ctor (Luan Devecchi) #39610
  * refactor fs docs structure (James M Snell) #37170
errors:
  * (SEMVER-MINOR) remove experimental from --enable-source-maps (Benjamin Coe) #37362
esm:
  * deprecate legacy main lookup for modules (Guy Bedford) #36918
fs:
  * (SEMVER-MINOR) allow empty string for temp directory prefix (Voltrex) #39028
  * (SEMVER-MINOR) allow no-params fsPromises fileHandle read (Nitzan Uziely) #38287
  * (SEMVER-MINOR) add support for async iterators to `fsPromises.writeFile` (HiroyukiYagihashi) #37490
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
  * (SEMVER-MINOR) add fsPromises.watch() (James M Snell) #37179
  * (SEMVER-MINOR) allow `position` parameter to be a `BigInt` in read and readSync (Darshan Sen) #36190
http2:
  * (SEMVER-MINOR) add support for sensitive headers (Anna Henningsen) #34145
  * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978
inspector:
  * mark as stable (Gireesh Punathil) #37748
module:
  * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) #38587
  * (SEMVER-MINOR) add support for `node:`‑prefixed `require(…)` calls (ExE Boss) #37246
net:
  * (SEMVER-MINOR) introduce net.BlockList (James M Snell) #34625
node-api:
  * (SEMVER-MINOR) allow retrieval of add-on file name (Gabriel Schulhof) #37195
os:
  * (SEMVER-MINOR) add os.devNull (Luigi Pinca) #38569
perf_hooks:
  * (SEMVER-MINOR) introduce createHistogram (James M Snell) #37155
process:
  * (SEMVER-MINOR) add api to enable source-maps programmatically (legendecas) #39085
  * (SEMVER-MINOR) add `'worker'` event (James M Snell) #38659
  * (SEMVER-MINOR) add direct access to rss without iterating pages (Adrien Maret) #34291
readline:
  * (SEMVER-MINOR) add AbortSignal support to interface (Nitzan Uziely) #37932
  * (SEMVER-MINOR) add support for the AbortController to the question method (Mattias Runge-Broberg) #33676
  * (SEMVER-MINOR) add history event and option to set initial history (Mattias Runge-Broberg) #33662
repl:
  * (SEMVER-MINOR) add auto‑completion for `node:`‑prefixed `require(…)` calls (ExE Boss) #37246
src:
  * (SEMVER-MINOR) call overload ctor from the original ctor (Darshan Sen) #39768
  * (SEMVER-MINOR) add a constructor overload for CallbackScope (Darshan Sen) #39768
  * (SEMVER-MINOR) allow to negate boolean CLI flags (Michaël Zasso) #39023
  * (SEMVER-MINOR) add --heapsnapshot-near-heap-limit option (Joyee Cheung) #33010
  * (SEMVER-MINOR) add way to get IsolateData and allocator from Environment (Anna Henningsen) #36441
  * (SEMVER-MINOR) allow preventing SetPrepareStackTraceCallback (Shelley Vohr) #36447
  * (SEMVER-MINOR) add maybe versions of EmitExit and EmitBeforeExit (Anna Henningsen) #35486
stream:
  * (SEMVER-MINOR) add readableDidRead if has been read from (Robert Nagy) #39589
  * (SEMVER-MINOR) pipeline accept Buffer as a valid first argument (Nitzan Uziely) #37739
tls:
  * (SEMVER-MINOR) allow reading data into a static buffer (Andrey Pechkurov) #35753
tools:
  * (SEMVER-MINOR) add `Worker` to type-parser (James M Snell) #38659
url:
  * (SEMVER-MINOR) expose urlToHttpOptions utility (Yongsheng Zhang) #35960
util:
  * (SEMVER-MINOR) expose toUSVString (Robert Nagy) #39814
v8:
  * (SEMVER-MINOR) implement v8.stopCoverage() (Joyee Cheung) #33807
  * (SEMVER-MINOR) implement v8.takeCoverage() (Joyee Cheung) #33807
worker:
  * (SEMVER-MINOR) add setEnvironmentData/getEnvironmentData (James M Snell) #37486

PR-URL: #39990
targos added a commit that referenced this issue Sep 7, 2021
Notable changes:

assert:
  * change status of legacy asserts (James M Snell) #38113
buffer:
  * (SEMVER-MINOR) introduce Blob (James M Snell) #36811
  * (SEMVER-MINOR) add base64url encoding option (Filip Skokan) #36952
child_process:
  * (SEMVER-MINOR) allow `options.cwd` receive a URL (Khaidi Chu) #38862
  * (SEMVER-MINOR) add timeout to spawn and fork (Nitzan Uziely) #37256
  * (SEMVER-MINOR) allow promisified exec to be cancel (Carlos Fuentes) #34249
  * (SEMVER-MINOR) add 'overlapped' stdio flag (Thiago Padilha) #29412
cli:
  * (SEMVER-MINOR) add -C alias for --conditions flag (Guy Bedford) #38755
  * (SEMVER-MINOR) add --node-memory-debug option (Anna Henningsen) #35537
dns:
  * (SEMVER-MINOR) add "tries" option to Resolve options (Luan Devecchi) #39610
  * (SEMVER-MINOR) allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
doc:
  * (SEMVER-MINOR) add missing change to resolver ctor (Luan Devecchi) #39610
  * refactor fs docs structure (James M Snell) #37170
errors:
  * (SEMVER-MINOR) remove experimental from --enable-source-maps (Benjamin Coe) #37362
esm:
  * deprecate legacy main lookup for modules (Guy Bedford) #36918
fs:
  * (SEMVER-MINOR) allow empty string for temp directory prefix (Voltrex) #39028
  * (SEMVER-MINOR) allow no-params fsPromises fileHandle read (Nitzan Uziely) #38287
  * (SEMVER-MINOR) add support for async iterators to `fsPromises.writeFile` (HiroyukiYagihashi) #37490
  * improve fsPromises readFile performance (Nitzan Uziely) #37608
  * (SEMVER-MINOR) add fsPromises.watch() (James M Snell) #37179
  * (SEMVER-MINOR) allow `position` parameter to be a `BigInt` in read and readSync (Darshan Sen) #36190
http2:
  * (SEMVER-MINOR) add support for sensitive headers (Anna Henningsen) #34145
  * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978
inspector:
  * mark as stable (Gireesh Punathil) #37748
module:
  * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) #38587
  * (SEMVER-MINOR) add support for `node:`‑prefixed `require(…)` calls (ExE Boss) #37246
net:
  * (SEMVER-MINOR) introduce net.BlockList (James M Snell) #34625
node-api:
  * (SEMVER-MINOR) allow retrieval of add-on file name (Gabriel Schulhof) #37195
os:
  * (SEMVER-MINOR) add os.devNull (Luigi Pinca) #38569
perf_hooks:
  * (SEMVER-MINOR) introduce createHistogram (James M Snell) #37155
process:
  * (SEMVER-MINOR) add api to enable source-maps programmatically (legendecas) #39085
  * (SEMVER-MINOR) add `'worker'` event (James M Snell) #38659
  * (SEMVER-MINOR) add direct access to rss without iterating pages (Adrien Maret) #34291
readline:
  * (SEMVER-MINOR) add AbortSignal support to interface (Nitzan Uziely) #37932
  * (SEMVER-MINOR) add support for the AbortController to the question method (Mattias Runge-Broberg) #33676
  * (SEMVER-MINOR) add history event and option to set initial history (Mattias Runge-Broberg) #33662
repl:
  * (SEMVER-MINOR) add auto‑completion for `node:`‑prefixed `require(…)` calls (ExE Boss) #37246
src:
  * (SEMVER-MINOR) call overload ctor from the original ctor (Darshan Sen) #39768
  * (SEMVER-MINOR) add a constructor overload for CallbackScope (Darshan Sen) #39768
  * (SEMVER-MINOR) allow to negate boolean CLI flags (Michaël Zasso) #39023
  * (SEMVER-MINOR) add --heapsnapshot-near-heap-limit option (Joyee Cheung) #33010
  * (SEMVER-MINOR) add way to get IsolateData and allocator from Environment (Anna Henningsen) #36441
  * (SEMVER-MINOR) allow preventing SetPrepareStackTraceCallback (Shelley Vohr) #36447
  * (SEMVER-MINOR) add maybe versions of EmitExit and EmitBeforeExit (Anna Henningsen) #35486
stream:
  * (SEMVER-MINOR) add readableDidRead if has been read from (Robert Nagy) #39589
  * (SEMVER-MINOR) pipeline accept Buffer as a valid first argument (Nitzan Uziely) #37739
tls:
  * (SEMVER-MINOR) allow reading data into a static buffer (Andrey Pechkurov) #35753
tools:
  * (SEMVER-MINOR) add `Worker` to type-parser (James M Snell) #38659
url:
  * (SEMVER-MINOR) expose urlToHttpOptions utility (Yongsheng Zhang) #35960
util:
  * (SEMVER-MINOR) expose toUSVString (Robert Nagy) #39814
v8:
  * (SEMVER-MINOR) implement v8.stopCoverage() (Joyee Cheung) #33807
  * (SEMVER-MINOR) implement v8.takeCoverage() (Joyee Cheung) #33807
worker:
  * (SEMVER-MINOR) add setEnvironmentData/getEnvironmentData (James M Snell) #37486

PR-URL: #39990
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

9 participants