-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
http: add http.ClientRequest.getRawHeaderNames() #37660
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add documentation please?
This looks like a good start - documentation and a test would be the next steps :) |
@aduh95, @benjamingr, I updated the deprecation message, and added docs for the @benjamingr there is a test in |
That sounds reasonable - if you'd like I think there is value in adding a few more cases there - otherwise the test you added is probably fine for now and we can add more tests in a future PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, ping @nodejs/http
@benjamingr I added one additional assertion for testing the new method on the response object. |
lib/_http_outgoing.js
Outdated
const headers = Array(ObjectKeys(headersMap).length); | ||
|
||
if (headersMap !== null) { | ||
const values = ObjectValues(headersMap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid calling %Object.keys%
here? We can get the same info from %Object.values%
, right? Also, if headersMap
is null
, wouldn't %Object.keys%
throw?
const headers = Array(ObjectKeys(headersMap).length); | |
if (headersMap !== null) { | |
const values = ObjectValues(headersMap); | |
if (headerMap == null) return []; | |
const values = ObjectValues(headersMap); | |
const headers = Array(values.length); | |
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also save the length
to a variable to reuse it in the for
loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, pushed 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed the length
comment, but I can add that if needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw values.length
is stored in l
so that's only one assignment + accessing the property added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can either:
- store the value in a variable and read the variable to avoid looking up the property value several time.
- access the property each time and rely on the compiler optimisations.
The current implementation access the property twice before putting its value in a variable, that seems unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation access the property twice before putting its value in a variable, that seems unnecessary.
Exactly. Not sure if one additional property access call on top changes anything, but I can update the code if you want. Your call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd prefer to see either of the approach described in my comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This comment has been minimized.
This comment has been minimized.
ecb76b9
to
b99d01f
Compare
Fixes: nodejs#37641 PR-URL: nodejs#37660 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Fixes: nodejs#37641 PR-URL: nodejs#37660 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
b99d01f
to
4686cb5
Compare
Landed in 4686cb5 Thanks for reporting the issue and doing the work to fix it! 🎉 |
Notable changes: * buffer: * implement btoa and atob (James M Snell) #37529 * deps: * upgrade npm to 7.7.6 (Ruy Adorno) #37968 * doc: * add legacy status to stability index (James M Snell) #37784 * add @Linkgoron to collaborators (Nitzan Uziely) #37817 * http: * add http.ClientRequest.getRawHeaderNames() (simov) #37660
PR-URL: #37977 Notable changes: * buffer: * implement btoa and atob (James M Snell) #37529 * deps: * upgrade npm to 7.7.6 (Ruy Adorno) #37968 * doc: * add legacy status to stability index (James M Snell) #37784 * add @Linkgoron to collaborators (Nitzan Uziely) #37817 * http: * add http.ClientRequest.getRawHeaderNames() (simov) #37660
PR-URL: #37977 Notable changes: * buffer: * implement btoa and atob (James M Snell) #37529 * deps: * upgrade npm to 7.7.6 (Ruy Adorno) #37968 * doc: * add legacy status to stability index (James M Snell) #37784 * add @Linkgoron to collaborators (Nitzan Uziely) #37817 * http: * add http.ClientRequest.getRawHeaderNames() (simov) #37660
PR-URL: #37977 Notable changes: * buffer: * implement btoa and atob (James M Snell) #37529 * deps: * upgrade npm to 7.7.6 (Ruy Adorno) #37968 * doc: * add legacy status to stability index (James M Snell) #37784 * add @Linkgoron to collaborators (Nitzan Uziely) #37817 * http: * add http.ClientRequest.getRawHeaderNames() (simov) #37660
Notable Changes: Deprecations and Removals - **(SEMVER-MAJOR)** **fs**: remove permissive rmdir recursive (Antoine du Hamel) [#37216] - **(SEMVER-MAJOR)** **fs**: runtime deprecate rmdir recursive option (Antoine du Hamel) [#37302] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('http_parser') (James M Snell) [#37813] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('url') (James M Snell) [#37799] - **(SEMVER-MAJOR)** **lib**: make process.binding('util') return only type checkers (Anna Henningsen) [#37819] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('crypto') (James M Snell) [#37790] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('signal_wrap') (James M Snell) [#37800] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('v8') (James M Snell) [#37789] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('async_wrap') (James M Snell) [#37576] - **(SEMVER-MAJOR)** **module**: remove module.createRequireFromPath (Antoine du Hamel) [#37201] - **(SEMVER-MAJOR)** **module**: runtime deprecate subpath folder mappings (Antoine du Hamel) [#37215] - **(SEMVER-MAJOR)** **module**: runtime deprecate "main" index and extension lookups (Antoine du Hamel) [#37206] - **(SEMVER-MAJOR)** **module**: runtime deprecate invalid package.json main entries (Antoine du Hamel) [#37204] - **(SEMVER-MAJOR)** **process**: runtime deprecate changing process.config (James M Snell) [#36902] Stable Timers Promises API: The Timers Promises API provides an alternative set of timer functions that return Promise objects. Added in Node.js v15.0.0, in this release they graduate from experimental status to stable. Contributed by James Snell - [#38112] Toolchain and Compiler Upgrades: Node.js v16.0.0 will be the first release where we ship prebuilt binaries for Apple Silicon. While we’ll be providing separate tarballs for the Intel (`darwin-x64`) and ARM (`darwin-arm64`) architectures the macOS installer (`.pkg`) will be shipped as a ‘fat’ (multi-architecture) binary. - **(SEMVER-MAJOR)** **build**: remove support for Python 2 (Christian Clauss) [#36691] - **(SEMVER-MAJOR)** **build**: default PYTHON to python3 in Makefile (Michaël Zasso) [#37764] - **build**: update Makefile to support fat binary (Ash Cripps) [#37861] - **(SEMVER-MAJOR)** **build**: enable ASLR (PIE) on OS X (woodfairy) [#35704] - **build**: warn for gcc versions earlier than 8.3.0 (Richard Lau) [#37935] - **(SEMVER-MAJOR)** **doc**: update minimum supported Xcode to 11 (Michaël Zasso) [#37872] - **(SEMVER-MAJOR)** **doc**: update minimum supported GCC to 8.3 (Michaël Zasso) [#37871] - **(SEMVER-MAJOR)** **doc**: update AIX to GCC8 for v16.x (Ash Cripps) [#37677] - **tools**: set arch in Distribution.xml (Ash Cripps) [#38261] V8 9.0: The V8 JavaScript engine is updated to V8 9.0, including performance tweaks and improvements. This update also brings the ECMAScript RegExp Match Indices, which provide the start and end indices of the captured string. The indices array is available via the `.indices` property on match objects when the regular expression has the `/d` flag. Contributed by Michaël Zasso - [#37587] Other Notable Changes: - **(SEMVER-MINOR)** **assert**: graduate assert.match and assert.doesNotMatch (James M Snell) [#38111] - **(SEMVER-MAJOR)** **buffer**: expose btoa and atob as globals (James M Snell) [#37786] - **deps**: update llhttp to 6.0.0 (Fedor Indutny) [#38277] - **deps**: upgrade npm to 7.10.0 (Ruy Adorno) [#38254] - **(SEMVER-MAJOR)** **deps**: bump minimum ICU version to 68 (Michaël Zasso) [#37330] - **(SEMVER-MINOR)** **http**: add http.ClientRequest.getRawHeaderNames() (simov) [#37660] - **(SEMVER-MAJOR)** **lib,src**: update cluster to use Parent (Michael Dawson) [#36478] - **(SEMVER-MINOR)** **module**: add support for `node:`‑prefixed `require(…)` calls (ExE Boss) [#37246] - **(SEMVER-MINOR)** **perf_hooks**: add histogram option to timerify (James M Snell) [#37475] - **(SEMVER-MINOR)** **repl**: add auto‑completion for `node:`‑prefixed `require(…)` calls (ExE Boss) [#37246] - **(SEMVER-MINOR)** **util**: add getSystemErrorMap() impl (eladkeyshawn) [#38101] Semver-Major Commits: - **async_hooks**: add thisArg to AsyncResource.bind (James M Snell) [#36782] - **buffer**: expose btoa and atob as globals (James M Snell) [#37786] - **build**: remove support for Python 2 (Christian Clauss) [#36691] - **build**: default PYTHON to python3 in Makefile (Michaël Zasso) [#37764] - **build**: update Makefile to support fat binary (Ash Cripps) [#37861] - **build**: reset embedder string to "-node.0" (Michaël Zasso) [#37587] - **build**: include minimal V8 headers in distribution (Michaël Zasso) [#37570] - **build**: reset embedder string to "-node.0" (Michaël Zasso) [#37330] - **build**: reset embedder string to "-node.0" (Michaël Zasso) [#36139] - **build**: use C++11 ABI with libstdc++ (Anna Henningsen) [#36634] - **build**: enable ASLR (PIE) on OS X (woodfairy) [#35704] - **build**: reset embedder string to "-node.0" (Michaël Zasso) [#35700] - **deps**: V8: cherry-pick 1648e050cade (Michaël Zasso) [#37587] - **deps**: silence irrelevant V8 warnings (Michaël Zasso) [#37587] - **deps**: fix V8 build issue with inline methods (Jiawen Geng) [#35415] - **deps**: make v8.h compatible with VS2015 (Joao Reis) [#32116] - **deps**: V8: forward declaration of `Rtl\*FunctionTable` (Refael Ackermann) [#32116] - **deps**: V8: patch register-arm64.h (Refael Ackermann) [#32116] - **deps**: V8: un-cherry-pick bd019bd (Refael Ackermann) [#32116] - **deps**: update V8 to 9.0.257.11 (Michaël Zasso) [#37587] - **deps**: bump minimum ICU version to 68 (Michaël Zasso) [#37330] - **deps**: V8: cherry-pick 8957d4677aa7 (Michaël Zasso) [#37330] - **deps**: V8: backport a11395433dbd (Michaël Zasso) [#37330] - **deps**: V8: cherry-pick deb0813166f3 (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick 9a6a22874c81 (Michaël Zasso) [#36139] - **deps**: silence irrelevant V8 warning (Michaël Zasso) [#37330] - **deps**: workaround stod() limitations on SmartOS (Colin Ihrig) [#37330] - **deps**: fix V8 build issue with inline methods (Jiawen Geng) [#35415] - **deps**: patch V8 to run on Xcode 8 (Mary Marchini) [#32116] - **deps**: make v8.h compatible with VS2015 (Joao Reis) [#32116] - **deps**: V8: forward declaration of `Rtl\*FunctionTable` (Refael Ackermann) [#32116] - **deps**: V8: patch register-arm64.h (Refael Ackermann) [#32116] - **deps**: patch V8 to run on older XCode versions (Ujjwal Sharma) [#32116] - **deps**: V8: un-cherry-pick bd019bd (Refael Ackermann) [#32116] - **deps**: update V8 to 8.9.255.19 (Michaël Zasso) [#37330] - **deps**: V8: cherry-pick deb0813166f3 (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick 9a6a22874c81 (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick 2059ee813359 (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick bde7ee5473d6 (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick 9a712984025e (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick 0b96e5b0bfb2 (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick fbb28902e049 (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick 821fb3883a8e (Michaël Zasso) [#35700] - **deps**: workaround stod() limitations on SmartOS (Colin Ihrig) [#36139] - **deps**: fix V8 build issue with inline methods (Jiawen Geng) [#35415] - **deps**: patch V8 to run on Xcode 8 (Mary Marchini) [#32116] - **deps**: V8: silence irrelevant warnings (Michaël Zasso) [#32116] - **deps**: make v8.h compatible with VS2015 (Joao Reis) [#32116] - **deps**: V8: forward declaration of `Rtl\*FunctionTable` (Refael Ackermann) [#32116] - **deps**: V8: patch register-arm64.h (Refael Ackermann) [#32116] - **deps**: patch V8 to run on older XCode versions (Ujjwal Sharma) [#32116] - **deps**: V8: un-cherry-pick bd019bd (Refael Ackermann) [#32116] - **deps**: update V8 to 8.8.278.17 (Michaël Zasso) [#36139] - **deps**: V8: cherry-pick 821fb3883a8e (Michaël Zasso) [#35700] - **deps**: V8: cherry-pick 45e49775f5a3 (Michaël Zasso) [#35700] - **deps**: V8: cherry-pick 7b3a27b7ae65 (Michaël Zasso) [#35700] - **deps**: V8: cherry-pick d76abfed3512 (Michaël Zasso) [#35415] - **deps**: fix V8 build issue with inline methods (Jiawen Geng) [#35415] - **deps**: update V8 postmortem metadata script (Colin Ihrig) [#35415] - **deps**: update V8 postmortem metadata script (Colin Ihrig) [#33579] - **deps**: patch V8 to run on Xcode 8 (Mary Marchini) [#32116] - **deps**: V8: silence irrelevant warnings (Michaël Zasso) [#32116] - **deps**: make v8.h compatible with VS2015 (Joao Reis) [#32116] - **deps**: V8: forward declaration of `Rtl\*FunctionTable` (Refael Ackermann) [#32116] - **deps**: V8: patch register-arm64.h (Refael Ackermann) [#32116] - **deps**: patch V8 to run on older XCode versions (Ujjwal Sharma) [#32116] - **deps**: V8: un-cherry-pick bd019bd (Refael Ackermann) [#32116] - **deps**: update V8 to 8.7.220 (Michaël Zasso) [#35700] - **dns**: use url module instead of punycode for IDNA (Antoine du Hamel) [#35091] - **doc**: update minimum supported Xcode to 11 (Michaël Zasso) [#37872] - **doc**: update minimum supported GCC to 8.3 (Michaël Zasso) [#37871] - **doc**: update AIX to GCC8 for v16.x (Ash Cripps) [#37677] - **doc**: fixup http.IncomingMessage deprecation code (Guy Bedford) [#36917] - **doc**: add http.IncomingMessage#connection (Pranshu Srivastava) [#33768] - **events**: change EventTarget handler exception behavior (Nitzan Uziely) [#37237] - **fs**: remove permissive rmdir recursive (Antoine du Hamel) [#37216] - **fs**: add validation for fd and path (Dylan Elliott) [#35187] - **fs**: runtime deprecate rmdir recursive option (Antoine du Hamel) [#37302] - **fs**: fix flag and mode validation (James M Snell) [#37480] - **http**: use objects with null prototype in Agent (Michaël Zasso) [#36409] - **lib**: runtime deprecate access to process.binding('http_parser') (James M Snell) [#37813] - **lib**: runtime deprecate access to process.binding('url') (James M Snell) [#37799] - **lib**: make process.binding('util') return only type checkers (Anna Henningsen) [#37819] - **lib**: runtime deprecate access to process.binding('crypto') (James M Snell) [#37790] - **lib**: runtime deprecate access to process.binding('signal_wrap') (James M Snell) [#37800] - **lib**: runtime deprecate access to process.binding('v8') (James M Snell) [#37789] - **lib**: aggregate errors to avoid error swallowing (Antoine du Hamel) [#37460] - **lib**: load v8_prof_processor dependencies as ESM (Michaël Zasso) [#37587] - **lib**: runtime deprecate access to process.binding('async_wrap') (James M Snell) [#37576] - **lib**: remove usage of url.parse (raisinten) [#36853] - **lib**: add error handling for input stream (rexagod) [#31603] - **lib,src**: update cluster to use Parent (Michael Dawson) [#36478] - **module**: runtime deprecate subpath folder mappings (Antoine du Hamel) [#37215] - **module**: runtime deprecate "main" index and extension lookups (Antoine du Hamel) [#37206] - **module**: runtime deprecate invalid package.json main entries (Antoine du Hamel) [#37204] - **module**: remove module.createRequireFromPath (Antoine du Hamel) [#37201] - **module**: only set cache when finding module succeeds (Yongsheng Zhang) [#36642] - **perf_hooks**: make performance a global (James M Snell) [#37970] - **perf_hooks**: complete overhaul of the implementation (James M Snell) [#37136] - **process**: disallow adding options to process.allowedNodeEnvironmentFlags (Antoine du Hamel) [#36660] - **process**: runtime deprecate changing process.config (James M Snell) [#36902] - **readline**: cursorTo throw error on NaN (Zijian Liu) [#36379] - **src**: use non-deprecated GetCreationContext from V8 (Michaël Zasso) [#37587] - **src**: remove V8_FT_ADAPTOR for V8 update (Colin Ihrig) [#37587] - **src**: use non-deprecated V8 module APIs (Michaël Zasso) [#37587] - **src**: update NODE_MODULE_VERSION to 93 (Michaël Zasso) [#37587] - **src**: use non-deprecated V8 module and script APIs (Michaël Zasso) [#37330] - **src**: update NODE_MODULE_VERSION to 92 (Michaël Zasso) [#37330] - **src**: update NODE_MODULE_VERSION to 91 (Michaël Zasso) [#36139] - **src**: mark internally exported functions as explicitly internal (Tyler Ang-Wanek) [#37000] - **src**: inline AsyncCleanupHookHandle in headers (Tyler Ang-Wanek) [#37000] - **src**: fix v8 api deprecation (Jiawen Geng) [#35700] - **src**: update NODE_MODULE_VERSION to 90 (Michaël Zasso) [#35700] - **src**: clean up embedder API (Anna Henningsen) [#35897] - **test**: mark test-return-on-exit as flaky (Michaël Zasso) [#36139] - **test**: mark WASI's test-return-on-exit as flaky (Colin Ihrig) [#36139] - **tools**: update V8 gypfiles for 9.0 (Michaël Zasso) [#37587] - **tools**: update V8 gypfiles for 8.9 (Michaël Zasso) [#37330] - **tools**: update V8 gypfiles for 8.8 (Michaël Zasso) [#36139] - **tools**: update V8 gypfiles for 8.7 (Michaël Zasso) [#35700] - **worker**: send correct error status for worker init (Yash Ladha) [#36242] PR-URL: #37678
Notable changes: Deprecations and Removals: - **(SEMVER-MAJOR)** **fs**: remove permissive rmdir recursive (Antoine du Hamel) [#37216] - **(SEMVER-MAJOR)** **fs**: runtime deprecate rmdir recursive option (Antoine du Hamel) [#37302] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('http_parser') (James M Snell) [#37813] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('url') (James M Snell) [#37799] - **(SEMVER-MAJOR)** **lib**: make process.binding('util') return only type checkers (Anna Henningsen) [#37819] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('crypto') (James M Snell) [#37790] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('signal_wrap') (James M Snell) [#37800] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('v8') (James M Snell) [#37789] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('async_wrap') (James M Snell) [#37576] - **(SEMVER-MAJOR)** **module**: remove module.createRequireFromPath (Antoine du Hamel) [#37201] - **(SEMVER-MAJOR)** **module**: runtime deprecate subpath folder mappings (Antoine du Hamel) [#37215] - **(SEMVER-MAJOR)** **module**: runtime deprecate "main" index and extension lookups (Antoine du Hamel) [#37206] - **(SEMVER-MAJOR)** **module**: runtime deprecate invalid package.json main entries (Antoine du Hamel) [#37204] - **(SEMVER-MAJOR)** **process**: runtime deprecate changing process.config (James M Snell) [#36902] Stable Timers Promises API: The Timers Promises API provides an alternative set of timer functions that return Promise objects. Added in Node.js v15.0.0, in this release they graduate from experimental status to stable. Contributed by James Snell - [#38112] Toolchain and Compiler Upgrades: Node.js v16.0.0 will be the first release where we ship prebuilt binaries for Apple Silicon. While we’ll be providing separate tarballs for the Intel (`darwin-x64`) and ARM (`darwin-arm64`) architectures the macOS installer (`.pkg`) will be shipped as a ‘fat’ (multi-architecture) binary. - **(SEMVER-MAJOR)** **build**: remove support for Python 2 (Christian Clauss) [#36691] - **(SEMVER-MAJOR)** **build**: default PYTHON to python3 in Makefile (Michaël Zasso) [#37764] - **build**: update Makefile to support fat binary (Ash Cripps) [#37861] - **(SEMVER-MAJOR)** **build**: enable ASLR (PIE) on OS X (woodfairy) [#35704] - **build**: warn for gcc versions earlier than 8.3.0 (Richard Lau) [#37935] - **(SEMVER-MAJOR)** **doc**: update minimum supported Xcode to 11 (Michaël Zasso) [#37872] - **(SEMVER-MAJOR)** **doc**: update minimum supported GCC to 8.3 (Michaël Zasso) [#37871] - **(SEMVER-MAJOR)** **doc**: update AIX to GCC8 for v16.x (Ash Cripps) [#37677] - **tools**: set arch in Distribution.xml (Ash Cripps) [#38261] V8 9.0: The V8 JavaScript engine is updated to V8 9.0, including performance tweaks and improvements. This update also brings the ECMAScript RegExp Match Indices, which provide the start and end indices of the captured string. The indices array is available via the `.indices` property on match objects when the regular expression has the `/d` flag. Contributed by Michaël Zasso - [#37587] Other Notable Changes: - **(SEMVER-MINOR)** **assert**: graduate assert.match and assert.doesNotMatch (James M Snell) [#38111] - **(SEMVER-MAJOR)** **buffer**: expose btoa and atob as globals (James M Snell) [#37786] - **(SEMVER-MAJOR)** **deps**: bump minimum ICU version to 68 (Michaël Zasso) [#37330] - **deps**: update ICU to 69.1 (Michaël Zasso) [#38178] - **deps**: update llhttp to 6.0.0 (Fedor Indutny) [#38277] - **deps**: upgrade npm to 7.10.0 (Ruy Adorno) [#38254] - **(SEMVER-MINOR)** **http**: add http.ClientRequest.getRawHeaderNames() (simov) [#37660] - **(SEMVER-MAJOR)** **lib,src**: update cluster to use Parent (Michael Dawson) [#36478] - **(SEMVER-MINOR)** **module**: add support for `node:`‑prefixed `require(…)` calls (ExE Boss) [#37246] - **(SEMVER-MINOR)** **perf_hooks**: add histogram option to timerify (James M Snell) [#37475] - **(SEMVER-MINOR)** **repl**: add auto‑completion for `node:`‑prefixed `require(…)` calls (ExE Boss) [#37246] - **(SEMVER-MINOR)** **util**: add getSystemErrorMap() impl (eladkeyshawn) [#38101] Semver-Major Commits: - **(SEMVER-MAJOR)** **async_hooks**: add thisArg to AsyncResource.bind (James M Snell) [#36782] - **(SEMVER-MAJOR)** **buffer**: expose btoa and atob as globals (James M Snell) [#37786] - **(SEMVER-MAJOR)** **build**: remove support for Python 2 (Christian Clauss) [#36691] - **(SEMVER-MAJOR)** **build**: default PYTHON to python3 in Makefile (Michaël Zasso) [#37764] - **(SEMVER-MAJOR)** **build**: update Makefile to support fat binary (Ash Cripps) [#37861] - **(SEMVER-MAJOR)** **build**: include minimal V8 headers in distribution (Michaël Zasso) [#37570] - **(SEMVER-MAJOR)** **build**: use C++11 ABI with libstdc++ (Anna Henningsen) [#36634] - **(SEMVER-MAJOR)** **build**: enable ASLR (PIE) on OS X (woodfairy) [#35704] - **(SEMVER-MAJOR)** **deps**: update V8 to 9.0.257.11 (Michaël Zasso) [#37587] - **(SEMVER-MAJOR)** **deps**: bump minimum ICU version to 68 (Michaël Zasso) [#37330] - **(SEMVER-MAJOR)** **deps**: update V8 to 8.9.255.19 (Michaël Zasso) [#37330] - **(SEMVER-MAJOR)** **deps**: update V8 to 8.8.278.17 (Michaël Zasso) [#36139] - **(SEMVER-MAJOR)** **deps**: update V8 to 8.7.220 (Michaël Zasso) [#35700] - **(SEMVER-MAJOR)** **dns**: use url module instead of punycode for IDNA (Antoine du Hamel) [#35091] - **(SEMVER-MAJOR)** **doc**: update minimum supported Xcode to 11 (Michaël Zasso) [#37872] - **(SEMVER-MAJOR)** **doc**: update minimum supported GCC to 8.3 (Michaël Zasso) [#37871] - **(SEMVER-MAJOR)** **doc**: update AIX to GCC8 for v16.x (Ash Cripps) [#37677] - **(SEMVER-MAJOR)** **doc**: add http.IncomingMessage#connection (Pranshu Srivastava) [#33768] - **(SEMVER-MAJOR)** **events**: change EventTarget handler exception behavior (Nitzan Uziely) [#37237] - **(SEMVER-MAJOR)** **fs**: remove permissive rmdir recursive (Antoine du Hamel) [#37216] - **(SEMVER-MAJOR)** **fs**: add validation for fd and path (Dylan Elliott) [#35187] - **(SEMVER-MAJOR)** **fs**: runtime deprecate rmdir recursive option (Antoine du Hamel) [#37302] - **(SEMVER-MAJOR)** **fs**: fix flag and mode validation (James M Snell) [#37480] - **(SEMVER-MAJOR)** **http**: use objects with null prototype in Agent (Michaël Zasso) [#36409] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('http_parser') (James M Snell) [#37813] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('url') (James M Snell) [#37799] - **(SEMVER-MAJOR)** **lib**: make process.binding('util') return only type checkers (Anna Henningsen) [#37819] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('crypto') (James M Snell) [#37790] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('signal_wrap') (James M Snell) [#37800] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('v8') (James M Snell) [#37789] - **(SEMVER-MAJOR)** **lib**: aggregate errors to avoid error swallowing (Antoine du Hamel) [#37460] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('async_wrap') (James M Snell) [#37576] - **(SEMVER-MAJOR)** **lib**: remove usage of url.parse (raisinten) [#36853] - **(SEMVER-MAJOR)** **lib**: add error handling for input stream (rexagod) [#31603] - **(SEMVER-MAJOR)** **lib,src**: update cluster to use Parent (Michael Dawson) [#36478] - **(SEMVER-MAJOR)** **module**: runtime deprecate subpath folder mappings (Antoine du Hamel) [#37215] - **(SEMVER-MAJOR)** **module**: runtime deprecate "main" index and extension lookups (Antoine du Hamel) [#37206] - **(SEMVER-MAJOR)** **module**: runtime deprecate invalid package.json main entries (Antoine du Hamel) [#37204] - **(SEMVER-MAJOR)** **module**: remove module.createRequireFromPath (Antoine du Hamel) [#37201] - **(SEMVER-MAJOR)** **module**: only set cache when finding module succeeds (Yongsheng Zhang) [#36642] - **(SEMVER-MAJOR)** **perf_hooks**: make performance a global (James M Snell) [#37970] - **(SEMVER-MAJOR)** **perf_hooks**: complete overhaul of the implementation (James M Snell) [#37136] - **(SEMVER-MAJOR)** **process**: disallow adding options to process.allowedNodeEnvironmentFlags (Antoine du Hamel) [#36660] - **(SEMVER-MAJOR)** **process**: runtime deprecate changing process.config (James M Snell) [#36902] - **(SEMVER-MAJOR)** **readline**: cursorTo throw error on NaN (Zijian Liu) [#36379] - **(SEMVER-MAJOR)** **src**: mark internally exported functions as explicitly internal (Tyler Ang-Wanek) [#37000] - **(SEMVER-MAJOR)** **src**: inline AsyncCleanupHookHandle in headers (Tyler Ang-Wanek) [#37000] - **(SEMVER-MAJOR)** **src**: clean up embedder API (Anna Henningsen) [#35897] - **(SEMVER-MAJOR)** **worker**: send correct error status for worker init (Yash Ladha) [#36242] PR-URL: #37678
Notable changes: Deprecations and Removals: - **(SEMVER-MAJOR)** **fs**: remove permissive rmdir recursive (Antoine du Hamel) [#37216] - **(SEMVER-MAJOR)** **fs**: runtime deprecate rmdir recursive option (Antoine du Hamel) [#37302] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('http_parser') (James M Snell) [#37813] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('url') (James M Snell) [#37799] - **(SEMVER-MAJOR)** **lib**: make process.binding('util') return only type checkers (Anna Henningsen) [#37819] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('crypto') (James M Snell) [#37790] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('signal_wrap') (James M Snell) [#37800] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('v8') (James M Snell) [#37789] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('async_wrap') (James M Snell) [#37576] - **(SEMVER-MAJOR)** **module**: remove module.createRequireFromPath (Antoine du Hamel) [#37201] - **(SEMVER-MAJOR)** **module**: runtime deprecate subpath folder mappings (Antoine du Hamel) [#37215] - **(SEMVER-MAJOR)** **module**: runtime deprecate "main" index and extension lookups (Antoine du Hamel) [#37206] - **(SEMVER-MAJOR)** **module**: runtime deprecate invalid package.json main entries (Antoine du Hamel) [#37204] - **(SEMVER-MAJOR)** **process**: runtime deprecate changing process.config (James M Snell) [#36902] Stable Timers Promises API: The Timers Promises API provides an alternative set of timer functions that return Promise objects. Added in Node.js v15.0.0, in this release they graduate from experimental status to stable. Contributed by James Snell - [#38112] Toolchain and Compiler Upgrades: Node.js v16.0.0 will be the first release where we ship prebuilt binaries for Apple Silicon. While we’ll be providing separate tarballs for the Intel (`darwin-x64`) and ARM (`darwin-arm64`) architectures the macOS installer (`.pkg`) will be shipped as a ‘fat’ (multi-architecture) binary. - **(SEMVER-MAJOR)** **build**: remove support for Python 2 (Christian Clauss) [#36691] - **(SEMVER-MAJOR)** **build**: default PYTHON to python3 in Makefile (Michaël Zasso) [#37764] - **build**: update Makefile to support fat binary (Ash Cripps) [#37861] - **(SEMVER-MAJOR)** **build**: enable ASLR (PIE) on OS X (woodfairy) [#35704] - **build**: warn for gcc versions earlier than 8.3.0 (Richard Lau) [#37935] - **(SEMVER-MAJOR)** **doc**: update minimum supported Xcode to 11 (Michaël Zasso) [#37872] - **(SEMVER-MAJOR)** **doc**: update minimum supported GCC to 8.3 (Michaël Zasso) [#37871] - **(SEMVER-MAJOR)** **doc**: update AIX to GCC8 for v16.x (Ash Cripps) [#37677] - **tools**: set arch in Distribution.xml (Ash Cripps) [#38261] V8 9.0: The V8 JavaScript engine is updated to V8 9.0, including performance tweaks and improvements. This update also brings the ECMAScript RegExp Match Indices, which provide the start and end indices of the captured string. The indices array is available via the `.indices` property on match objects when the regular expression has the `/d` flag. Contributed by Michaël Zasso - [#37587] Other Notable Changes: - **(SEMVER-MINOR)** **assert**: graduate assert.match and assert.doesNotMatch (James M Snell) [#38111] - **(SEMVER-MAJOR)** **buffer**: expose btoa and atob as globals (James M Snell) [#37786] - **(SEMVER-MAJOR)** **deps**: bump minimum ICU version to 68 (Michaël Zasso) [#37330] - **deps**: update ICU to 69.1 (Michaël Zasso) [#38178] - **deps**: update llhttp to 6.0.0 (Fedor Indutny) [#38277] - **deps**: upgrade npm to 7.10.0 (Ruy Adorno) [#38254] - **(SEMVER-MINOR)** **http**: add http.ClientRequest.getRawHeaderNames() (simov) [#37660] - **(SEMVER-MAJOR)** **lib,src**: update cluster to use Parent (Michael Dawson) [#36478] - **(SEMVER-MINOR)** **module**: add support for `node:`‑prefixed `require(…)` calls (ExE Boss) [#37246] - **(SEMVER-MINOR)** **perf_hooks**: add histogram option to timerify (James M Snell) [#37475] - **(SEMVER-MINOR)** **repl**: add auto‑completion for `node:`‑prefixed `require(…)` calls (ExE Boss) [#37246] - **(SEMVER-MINOR)** **util**: add getSystemErrorMap() impl (eladkeyshawn) [#38101] Semver-Major Commits: - **(SEMVER-MAJOR)** **async_hooks**: add thisArg to AsyncResource.bind (James M Snell) [#36782] - **(SEMVER-MAJOR)** **buffer**: expose btoa and atob as globals (James M Snell) [#37786] - **(SEMVER-MAJOR)** **build**: remove support for Python 2 (Christian Clauss) [#36691] - **(SEMVER-MAJOR)** **build**: default PYTHON to python3 in Makefile (Michaël Zasso) [#37764] - **(SEMVER-MAJOR)** **build**: update Makefile to support fat binary (Ash Cripps) [#37861] - **(SEMVER-MAJOR)** **build**: include minimal V8 headers in distribution (Michaël Zasso) [#37570] - **(SEMVER-MAJOR)** **build**: use C++11 ABI with libstdc++ (Anna Henningsen) [#36634] - **(SEMVER-MAJOR)** **build**: enable ASLR (PIE) on OS X (woodfairy) [#35704] - **(SEMVER-MAJOR)** **deps**: update V8 to 9.0.257.11 (Michaël Zasso) [#37587] - **(SEMVER-MAJOR)** **deps**: bump minimum ICU version to 68 (Michaël Zasso) [#37330] - **(SEMVER-MAJOR)** **deps**: update V8 to 8.9.255.19 (Michaël Zasso) [#37330] - **(SEMVER-MAJOR)** **deps**: update V8 to 8.8.278.17 (Michaël Zasso) [#36139] - **(SEMVER-MAJOR)** **deps**: update V8 to 8.7.220 (Michaël Zasso) [#35700] - **(SEMVER-MAJOR)** **dns**: use url module instead of punycode for IDNA (Antoine du Hamel) [#35091] - **(SEMVER-MAJOR)** **doc**: update minimum supported Xcode to 11 (Michaël Zasso) [#37872] - **(SEMVER-MAJOR)** **doc**: update minimum supported GCC to 8.3 (Michaël Zasso) [#37871] - **(SEMVER-MAJOR)** **doc**: update AIX to GCC8 for v16.x (Ash Cripps) [#37677] - **(SEMVER-MAJOR)** **doc**: add http.IncomingMessage#connection (Pranshu Srivastava) [#33768] - **(SEMVER-MAJOR)** **events**: change EventTarget handler exception behavior (Nitzan Uziely) [#37237] - **(SEMVER-MAJOR)** **fs**: remove permissive rmdir recursive (Antoine du Hamel) [#37216] - **(SEMVER-MAJOR)** **fs**: add validation for fd and path (Dylan Elliott) [#35187] - **(SEMVER-MAJOR)** **fs**: runtime deprecate rmdir recursive option (Antoine du Hamel) [#37302] - **(SEMVER-MAJOR)** **fs**: fix flag and mode validation (James M Snell) [#37480] - **(SEMVER-MAJOR)** **http**: use objects with null prototype in Agent (Michaël Zasso) [#36409] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('http_parser') (James M Snell) [#37813] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('url') (James M Snell) [#37799] - **(SEMVER-MAJOR)** **lib**: make process.binding('util') return only type checkers (Anna Henningsen) [#37819] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('crypto') (James M Snell) [#37790] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('signal_wrap') (James M Snell) [#37800] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('v8') (James M Snell) [#37789] - **(SEMVER-MAJOR)** **lib**: aggregate errors to avoid error swallowing (Antoine du Hamel) [#37460] - **(SEMVER-MAJOR)** **lib**: runtime deprecate access to process.binding('async_wrap') (James M Snell) [#37576] - **(SEMVER-MAJOR)** **lib**: remove usage of url.parse (raisinten) [#36853] - **(SEMVER-MAJOR)** **lib**: add error handling for input stream (rexagod) [#31603] - **(SEMVER-MAJOR)** **lib,src**: update cluster to use Parent (Michael Dawson) [#36478] - **(SEMVER-MAJOR)** **module**: runtime deprecate subpath folder mappings (Antoine du Hamel) [#37215] - **(SEMVER-MAJOR)** **module**: runtime deprecate "main" index and extension lookups (Antoine du Hamel) [#37206] - **(SEMVER-MAJOR)** **module**: runtime deprecate invalid package.json main entries (Antoine du Hamel) [#37204] - **(SEMVER-MAJOR)** **module**: remove module.createRequireFromPath (Antoine du Hamel) [#37201] - **(SEMVER-MAJOR)** **module**: only set cache when finding module succeeds (Yongsheng Zhang) [#36642] - **(SEMVER-MAJOR)** **perf_hooks**: make performance a global (James M Snell) [#37970] - **(SEMVER-MAJOR)** **perf_hooks**: complete overhaul of the implementation (James M Snell) [#37136] - **(SEMVER-MAJOR)** **process**: disallow adding options to process.allowedNodeEnvironmentFlags (Antoine du Hamel) [#36660] - **(SEMVER-MAJOR)** **process**: runtime deprecate changing process.config (James M Snell) [#36902] - **(SEMVER-MAJOR)** **readline**: cursorTo throw error on NaN (Zijian Liu) [#36379] - **(SEMVER-MAJOR)** **src**: mark internally exported functions as explicitly internal (Tyler Ang-Wanek) [#37000] - **(SEMVER-MAJOR)** **src**: inline AsyncCleanupHookHandle in headers (Tyler Ang-Wanek) [#37000] - **(SEMVER-MAJOR)** **src**: clean up embedder API (Anna Henningsen) [#35897] - **(SEMVER-MAJOR)** **worker**: send correct error status for worker init (Yash Ladha) [#36242] PR-URL: #37678
Notable changes: * assert: * change status of legacy asserts (James M Snell) (#38113) * doc: * apply style for legacy status (James M Snell) (#37784) * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: cherry-pick cf71540c684c (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * fs: * add promisified readFile benchmark (Nitzan Uziely) (#37608) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * lib: * create diagnostics\_channel module (Stephen Belanger) (#34895) * implement AbortSignal.abort() (James M Snell) (#37693) * test: * update dom/abort tests (James M Snell) (#37693) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
PR-URL: #38507 Notable changes: * assert: * change status of legacy asserts (James M Snell) (#38113) * doc: * apply style for legacy status (James M Snell) (#37784) * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: cherry-pick cf71540c684c (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * fs: * add promisified readFile benchmark (Nitzan Uziely) (#37608) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * lib: * create diagnostics\_channel module (Stephen Belanger) (#34895) * implement AbortSignal.abort() (James M Snell) (#37693) * test: * update dom/abort tests (James M Snell) (#37693) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
PR-URL: #38507 Notable changes: * assert: * change status of legacy asserts (James M Snell) (#38113) * doc: * apply style for legacy status (James M Snell) (#37784) * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: cherry-pick cf71540c684c (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * fs: * add promisified readFile benchmark (Nitzan Uziely) (#37608) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * lib: * create diagnostics\_channel module (Stephen Belanger) (#34895) * implement AbortSignal.abort() (James M Snell) (#37693) * test: * update dom/abort tests (James M Snell) (#37693) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
PR-URL: #38507 Notable changes: * assert: * change status of legacy asserts (James M Snell) (#38113) * doc: * apply style for legacy status (James M Snell) (#37784) * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: cherry-pick cf71540c684c (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * fs: * add promisified readFile benchmark (Nitzan Uziely) (#37608) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * lib: * create diagnostics\_channel module (Stephen Belanger) (#34895) * implement AbortSignal.abort() (James M Snell) (#37693) * test: * update dom/abort tests (James M Snell) (#37693) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
PR-URL: #38507 Notable changes: * assert: * change status of legacy asserts (James M Snell) (#38113) * crypto: * implement randomuuid (James M Snell) (#36729) * doc: * apply style for legacy status (James M Snell) (#37784) * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * lib: * create diagnostics\_channel module (Stephen Belanger) (#34895) * implement AbortSignal.abort() (James M Snell) (#37693) * test: * update dom/abort tests (James M Snell) (#37693) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
PR-URL: #38507 Notable changes: * crypto: * implement randomuuid (James M Snell) (#36729) * doc: * apply style for legacy status (James M Snell) (#37784) * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * lib: * create diagnostics\_channel module (Stephen Belanger) (#34895) * implement AbortSignal.abort() (James M Snell) (#37693) * test: * update dom/abort tests (James M Snell) (#37693) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
Notable changes: Diagnostics channel (experimental module): `diagnostics_channel` is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes. The module was initially introduced in Node.js v15.1.0 and is backported to v14.17.0 to enable testing it at a larger scale. With `diagnostics_channel`, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with `dc.channel(name)` and call `channel.publish(data)` to send the data to any listeners to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); MySQL.prototype.query = function query(queryString, values, callback) { // Broadcast query information whenever a query is made channel.publish({ query: queryString, host: this.hostname, }); this.doQuery(queryString, values, callback); }; ``` Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using `channel.subscribe(listener)` to run a function whenever a message is published to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); channel.subscribe(({ query, host }) => { console.log(`mysql query to ${host}: ${query}`); }); ``` The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting. Contributed by Stephen Belanger (#34895). UUID support in the crypto module: The new `crypto.randomUUID()` method now allows to generate random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4 UUID strings: ```js const { randomUUID } = require('crypto'); console.log(randomUUID()); // 'aa7c91a1-f8fc-4339-b9db-f93fc7233429' ``` Contributed by James M Snell (#36729. Experimental support for `AbortController` and `AbortSignal`: Node.js 14.17.0 adds experimental partial support for `AbortController` and `AbortSignal`. Both constructors can be enabled globally using the `--experimental-abortcontroller` flag. Additionally, several Node.js APIs have been updated to support `AbortSignal` for cancellation. It is not mandatory to use the built-in constructors with them. Any spec-compliant third-party alternatives should be compatible. `AbortSignal` support was added to the following methods: * `child_process.exec` * `child_process.execFile` * `child_process.fork` * `child_process.spawn` * `dgram.createSocket` * `events.on` * `events.once` * `fs.readFile` * `fs.watch` * `fs.writeFile` * `http.request` * `https.request` * `http2Session.request` * The promisified variants of `setImmediate` and `setTimeout` Other notable changes: * doc: * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101) PR-URL: #38507
Notable Changes: Diagnostics channel (experimental module): `diagnostics_channel` is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes. The module was initially introduced in Node.js v15.1.0 and is backported to v14.17.0 to enable testing it at a larger scale. With `diagnostics_channel`, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with `dc.channel(name)` and call `channel.publish(data)` to send the data to any listeners to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); MySQL.prototype.query = function query(queryString, values, callback) { // Broadcast query information whenever a query is made channel.publish({ query: queryString, host: this.hostname, }); this.doQuery(queryString, values, callback); }; ``` Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using `channel.subscribe(listener)` to run a function whenever a message is published to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); channel.subscribe(({ query, host }) => { console.log(`mysql query to ${host}: ${query}`); }); ``` The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting. Contributed by Stephen Belanger (#34895). UUID support in the crypto module: The new `crypto.randomUUID()` method now allows to generate random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4 UUID strings: ```js const { randomUUID } = require('crypto'); console.log(randomUUID()); // 'aa7c91a1-f8fc-4339-b9db-f93fc7233429' ``` Contributed by James M Snell (#36729). Experimental support for `AbortController` and `AbortSignal`: Node.js 14.17.0 adds experimental partial support for `AbortController` and `AbortSignal`. Both constructors can be enabled globally using the `--experimental-abortcontroller` flag. Additionally, several Node.js APIs have been updated to support `AbortSignal` for cancellation. It is not mandatory to use the built-in constructors with them. Any spec-compliant third-party alternatives should be compatible. `AbortSignal` support was added to the following methods: * `child_process.exec` * `child_process.execFile` * `child_process.fork` * `child_process.spawn` * `dgram.createSocket` * `events.on` * `events.once` * `fs.readFile` * `fs.watch` * `fs.writeFile` * `http.request` * `https.request` * `http2Session.request` * The promisified variants of `setImmediate` and `setTimeout` Other notable changes: * doc: * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101) PR-URL: #38507
Notable Changes: Diagnostics channel (experimental module): `diagnostics_channel` is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes. The module was initially introduced in Node.js v15.1.0 and is backported to v14.17.0 to enable testing it at a larger scale. With `diagnostics_channel`, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with `dc.channel(name)` and call `channel.publish(data)` to send the data to any listeners to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); MySQL.prototype.query = function query(queryString, values, callback) { // Broadcast query information whenever a query is made channel.publish({ query: queryString, host: this.hostname, }); this.doQuery(queryString, values, callback); }; ``` Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using `channel.subscribe(listener)` to run a function whenever a message is published to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); channel.subscribe(({ query, host }) => { console.log(`mysql query to ${host}: ${query}`); }); ``` The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting. Contributed by Stephen Belanger (#34895). UUID support in the crypto module: The new `crypto.randomUUID()` method now allows to generate random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4 UUID strings: ```js const { randomUUID } = require('crypto'); console.log(randomUUID()); // 'aa7c91a1-f8fc-4339-b9db-f93fc7233429' ``` Contributed by James M Snell (#36729). Experimental support for `AbortController` and `AbortSignal`: Node.js 14.17.0 adds experimental partial support for `AbortController` and `AbortSignal`. Both constructors can be enabled globally using the `--experimental-abortcontroller` flag. Additionally, several Node.js APIs have been updated to support `AbortSignal` for cancellation. It is not mandatory to use the built-in constructors with them. Any spec-compliant third-party alternatives should be compatible. `AbortSignal` support was added to the following methods: * `child_process.exec` * `child_process.execFile` * `child_process.fork` * `child_process.spawn` * `dgram.createSocket` * `events.on` * `events.once` * `fs.readFile` * `fs.watch` * `fs.writeFile` * `http.request` * `https.request` * `http2Session.request` * The promisified variants of `setImmediate` and `setTimeout` Other notable changes: * doc: * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101) PR-URL: #38507
Notable Changes: Diagnostics channel (experimental module): `diagnostics_channel` is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes. The module was initially introduced in Node.js v15.1.0 and is backported to v14.17.0 to enable testing it at a larger scale. With `diagnostics_channel`, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with `dc.channel(name)` and call `channel.publish(data)` to send the data to any listeners to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); MySQL.prototype.query = function query(queryString, values, callback) { // Broadcast query information whenever a query is made channel.publish({ query: queryString, host: this.hostname, }); this.doQuery(queryString, values, callback); }; ``` Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using `channel.subscribe(listener)` to run a function whenever a message is published to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); channel.subscribe(({ query, host }) => { console.log(`mysql query to ${host}: ${query}`); }); ``` The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting. Contributed by Stephen Belanger (#34895). UUID support in the crypto module: The new `crypto.randomUUID()` method now allows to generate random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4 UUID strings: ```js const { randomUUID } = require('crypto'); console.log(randomUUID()); // 'aa7c91a1-f8fc-4339-b9db-f93fc7233429' ``` Contributed by James M Snell (#36729). Experimental support for `AbortController` and `AbortSignal`: Node.js 14.17.0 adds experimental partial support for `AbortController` and `AbortSignal`. Both constructors can be enabled globally using the `--experimental-abortcontroller` flag. Additionally, several Node.js APIs have been updated to support `AbortSignal` for cancellation. It is not mandatory to use the built-in constructors with them. Any spec-compliant third-party alternatives should be compatible. `AbortSignal` support was added to the following methods: * `child_process.exec` * `child_process.execFile` * `child_process.fork` * `child_process.spawn` * `dgram.createSocket` * `events.on` * `events.once` * `fs.readFile` * `fs.watch` * `fs.writeFile` * `http.request` * `https.request` * `http2Session.request` * The promisified variants of `setImmediate` and `setTimeout` Other notable changes: * doc: * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101) PR-URL: #38507
Notable Changes: Diagnostics channel (experimental module): `diagnostics_channel` is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes. The module was initially introduced in Node.js v15.1.0 and is backported to v14.17.0 to enable testing it at a larger scale. With `diagnostics_channel`, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with `dc.channel(name)` and call `channel.publish(data)` to send the data to any listeners to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); MySQL.prototype.query = function query(queryString, values, callback) { // Broadcast query information whenever a query is made channel.publish({ query: queryString, host: this.hostname, }); this.doQuery(queryString, values, callback); }; ``` Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using `channel.subscribe(listener)` to run a function whenever a message is published to that channel. ```js const dc = require('diagnostics_channel'); const channel = dc.channel('mysql.query'); channel.subscribe(({ query, host }) => { console.log(`mysql query to ${host}: ${query}`); }); ``` The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting. Contributed by Stephen Belanger (#34895). UUID support in the crypto module: The new `crypto.randomUUID()` method now allows to generate random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4 UUID strings: ```js const { randomUUID } = require('crypto'); console.log(randomUUID()); // 'aa7c91a1-f8fc-4339-b9db-f93fc7233429' ``` Contributed by James M Snell (#36729). Experimental support for `AbortController` and `AbortSignal`: Node.js 14.17.0 adds experimental partial support for `AbortController` and `AbortSignal`. Both constructors can be enabled globally using the `--experimental-abortcontroller` flag. Additionally, several Node.js APIs have been updated to support `AbortSignal` for cancellation. It is not mandatory to use the built-in constructors with them. Any spec-compliant third-party alternatives should be compatible. `AbortSignal` support was added to the following methods: * `child_process.exec` * `child_process.execFile` * `child_process.fork` * `child_process.spawn` * `dgram.createSocket` * `events.on` * `events.once` * `fs.readFile` * `fs.watch` * `fs.writeFile` * `http.request` * `https.request` * `http2Session.request` * The promisified variants of `setImmediate` and `setTimeout` Other notable changes: * doc: * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101) PR-URL: #38507
Fixes: #37641
As discussed here #37641 (comment) I'm submitting a patch to expose the raw header names being sent with the request.
I didn't updated the documentation because I'm not sure about the process for deprecating things since DEP0066 was introduced in v12 and this is v15.