GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — node-api: deprecate napi_module_register based registration by vmoroz · Pull Request #46319 · nodejs/node

Conversation

@vmoroz

@vmoroz vmoroz commented Jan 23, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

Change NAPI_MODULE and NAPI_MODULE_INIT macros to use symbol-based module registration.
Symbol-based registration was added in PR #20161 and used by Node-API modules written in non-C++ languages.
It is much simpler and requires no work on module library load.

Details

Currently ABI-safe Node-API modules have two ways to register modules:

  • Create napi_module struct and call napi_module_register on module library (.so or .dll) load.
  • Define napi_register_module_v1 function which is called on-demand to initialize module exports.

Node.JS module binding loads module library and then

  • if it finds registered napi_module struct, then it uses its nm_register_func to initialize module exports,
  • otherwise, it tries to find the napi_register_module_v1 and calls it to initialize module exports.

The first registration method is the original Node-API (NAPI) module registration. The second method (aka symbol-based registration) was added in PR #20161 on Apr 23, 2018, and available in Node.JS from version 10.

It is interesting to see that all Node-API bindings written in other languages (Rust, Go, etc.) they all use the symbol-based registration. Even the C/C++ WASM bindings use the symbol-based registration. It is easier to implement, and it does not need calling code on module library load.

In this PR we align C/C++ Node-API registration with registration in other languages to use the symbol-based registration. The NAPI_MODULE and NAPI_MODULE_INIT macros are changed to define the napi_register_module_v1 function instead of calling napi_module_register. It effectively deprecates the napi_module_register function, but since no changes are made to the Node.JS binding mechanism, all previously compiled modules must continue to work.

The test_null_init is removed because new macros fail to compile if the NULL parameter is given to the NAPI_MODULE macro.

This PR is a "spin off" from the PR #45715 to keep it focused on the new versioning approach.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Jan 23, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/node-api
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to Node-API. labels Jan 23, 2023
@addaleax addaleax assigned addaleax and unassigned addaleax Jan 23, 2023
@addaleax addaleax added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jan 23, 2023
@mhdawson

mhdawson commented Jan 23, 2023

Copy link
Copy Markdown
Member

@vmoroz I had thought when we discussed this that we'd not remove anything that could break existing code. This seems to remove NAPI_MODULE_X which might do that?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vmoroz

vmoroz commented Jan 23, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@vmoroz I had thought when we discussed this that we'd not remove anything that could break existing code. This seems to remove NAPI_MODULE_X which might do that?

@mhdawson, you are right, I initially wanted to have just a small incremental change, but then went a bit overboard with deleting the old code. I could not find any code that currently uses NAPI_MODULE_X and wanted to hear feedback from you and other developers. Let me change it back to a less aggressive change that keeps all intermediate macros unchanged.

EDIT: In this commit I minimize the changes to target only switching to the symbol-based registration and keeping all old macros.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson

mhdawson commented Jan 25, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@vmoroz I think we could do this (ie just update NAPI_MODULE and leave NAPI_MODULE_X alone), but I was thinking we might update NAPI_MODULE_X to use the symbol as well versus removing it as was in an earlier verion. That would avoid breaking existing code although it would remove some information that can be passed in. However, I think we believed that info was not used/avaiable anywhere right?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vmoroz

vmoroz commented Jan 25, 2023

Copy link
Copy Markdown
Member Author

@vmoroz I think we could do this (ie just update NAPI_MODULE and leave NAPI_MODULE_X alone), but I was thinking we might update NAPI_MODULE_X to use the symbol as well versus removing it as was in an earlier verion. That would avoid breaking existing code although it would remove some information that can be passed in. However, I think we believed that info was not used/avaiable anywhere right?

@mhdawson , we can do it too. I see that NAPI_MODULE_X was added in the very first Node-API PR, but it is not clear if it is used. Do we have contacts from Electron team who can say if this macro is important for their scenarios?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vmoroz
vmoroz force-pushed the dev/vmoroz/PR/deprecate_napi_module_register branch from 4441082 to df48609 Compare January 26, 2023 17:23
@vmoroz

vmoroz commented Jan 26, 2023

Copy link
Copy Markdown
Member Author

@mhdawson I have restored the original change in df48609 and added the NAPI_MODULE_X macro.

Looking through the code

node/src/node_api.cc

Lines 622 to 631 in 8ba54e5

static void napi_module_register_cb(v8::Local<v8::Object> exports,
v8::Local<v8::Value> module,
v8::Local<v8::Context> context,
void* priv) {
napi_module_register_by_symbol(
exports,
module,
context,
static_cast<const napi_module*>(priv)->nm_register_func);
}
I can confirm that we never used the NAPI_MODULE_X's priv parameter. This function is the registration callback used by the napi_module_register. We see that it calls the napi_module_register_by_symbol method used by the symbol-based registration.
As for the flags parameter, we only have four flags:

node/src/node_binding.h

Lines 15 to 20 in 8ba54e5

enum {
NM_F_BUILTIN = 1 << 0, // Unused.
NM_F_LINKED = 1 << 1,
NM_F_INTERNAL = 1 << 2,
NM_F_DELETEME = 1 << 3,
};
and the flag NM_F_DELETEME is always forced in

node/src/node_api.cc

Lines 682 to 694 in 8ba54e5

node_module napi_module_to_node_module(const napi_module* mod) {
return {
-1,
mod->nm_flags | NM_F_DELETEME,
nullptr,
mod->nm_filename,
nullptr,
napi_module_register_cb,
mod->nm_modname,
const_cast<napi_module*>(mod), // priv
nullptr,
};
}
It means that the NAPI_MODULE_X's flags parameter was never used too.

I added a comment for the NAPI_MODULE_X macro that it is deprecated and NAPI_MODULE must be used instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vmoroz
vmoroz force-pushed the dev/vmoroz/PR/deprecate_napi_module_register branch from df48609 to c043f2c Compare January 27, 2023 15:09
mhdawson
mhdawson previously approved these changes Jan 27, 2023
View reviewed changes

@mhdawson mhdawson left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mhdawson
mhdawson dismissed their stale review January 27, 2023 19:59

want to ask one more question

@mhdawson

mhdawson commented Jan 27, 2023

Copy link
Copy Markdown
Member

@vmoroz the changes to the main file look ok, I'm wondering why a test needs to be removed if we are not breaking anything?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson mhdawson added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 27, 2023
@vmoroz

vmoroz commented Jan 27, 2023

Copy link
Copy Markdown
Member Author

@vmoroz the changes to the main file look ok, I'm wondering why a test needs to be removed if we are not breaking anything?

@mhdawson , the test was verifying behavior for what happens when we pass NULL function pointer to the NAPI_MODULE macro. The test was expecting to have a runtime error in such case.

The new NAPI_MODULE macro uses provided function to implement the napi_register_module_v1 function. In case the provided function is NULL or any other invalid data, we get a compilation error. Thus, the test is not needed anymore and it cannot be compiled with the new macro.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 27, 2023
@nodejs-github-bot

nodejs-github-bot commented Jan 27, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/49216/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@simlay simlay mentioned this pull request Feb 1, 2023
undefined reference to napi_... issues infinyon/node-bindgen#209
Open
legendecas
legendecas reviewed Feb 2, 2023
View reviewed changes

@legendecas legendecas left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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 the test_null_init is still applicable as we didn't remove the method to register with napi_module_register, which can still be called with a null initializer, like when addons are built with old node_api.h header files.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vmoroz
vmoroz force-pushed the dev/vmoroz/PR/deprecate_napi_module_register branch from c043f2c to a742f4a Compare February 3, 2023 04:55
@vmoroz

vmoroz commented Feb 3, 2023

Copy link
Copy Markdown
Member Author

I think the test_null_init is still applicable as we didn't remove the method to register with napi_module_register, which can still be called with a null initializer, like when addons are built with old node_api.h header files.

I have restored the test. It is important to note that since the test was relying on the old NAPI_MODULE macro I had to copy most of the old registration code into this test.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas
legendecas approved these changes Feb 3, 2023
View reviewed changes
@mhdawson

mhdawson commented Feb 3, 2023

Copy link
Copy Markdown
Member

@addaleax with the more recent changes I don't think this is SemVer major any more. Is it ok with you if I remove the label?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax
addaleax reviewed Feb 3, 2023
View reviewed changes

@addaleax addaleax left a comment

Copy link
Copy Markdown
Member

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.

@mhdawson If you’re prefer to land this as semver-minor, yeah, I think so 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mhdawson reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread test/node-api/test_null_init/test_null_init.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/node_api.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/node_api.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

@RafaelGSS RafaelGSS mentioned this pull request Apr 6, 2023
v19.9.0 proposal #47441
Merged
RafaelGSS added a commit that referenced this pull request Apr 6, 2023
@RafaelGSS
2023-04-07, Version 19.9.0 (Current)
75642ba
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: TBD
@toyobayashi toyobayashi mentioned this pull request Apr 6, 2023
Sync Node-API headers from Node.js official repo toyobayashi/emnapi#49
Merged
RafaelGSS pushed a commit that referenced this pull request Apr 6, 2023
@vmoroz @RafaelGSS
node-api: deprecate napi_module_register
7effda9
PR-URL: #46319
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
RafaelGSS added a commit that referenced this pull request Apr 6, 2023
@RafaelGSS
2023-04-07, Version 19.9.0 (Current)
c68eb32
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: #47441
RafaelGSS pushed a commit that referenced this pull request Apr 7, 2023
@vmoroz @RafaelGSS
node-api: deprecate napi_module_register
ca981be
PR-URL: #46319
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
RafaelGSS added a commit that referenced this pull request Apr 7, 2023
@RafaelGSS
2023-04-07, Version 19.9.0 (Current)
5402535
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
wasi:
  * (SEMVER-MINOR) no longer require flag to enable wasi (Michael Dawson) #47286

PR-URL: #47441
RafaelGSS added a commit that referenced this pull request Apr 8, 2023
@RafaelGSS
2023-04-10, Version 19.9.0 (Current)
d2a7e91
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179

PR-URL: #47441
RafaelGSS added a commit that referenced this pull request Apr 10, 2023
@RafaelGSS
2023-04-10, Version 19.9.0 (Current)
8085bcf
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
test_runner:
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238

PR-URL: #47441
Signed-off-by: RafaelGSS <[email protected]>
RafaelGSS added a commit that referenced this pull request Apr 11, 2023
@RafaelGSS
2023-04-10, Version 19.9.0 (Current)
c8f6f85
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
test_runner:
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238

PR-URL: #47441
Signed-off-by: RafaelGSS <[email protected]>
RafaelGSS added a commit that referenced this pull request Apr 13, 2023
@RafaelGSS
2023-04-10, Version 19.9.0 (Current)
4c8a25b
Notable changes:

events:
  * (SEMVER-MINOR) add getMaxListeners method (Khafra) #47039
lib:
  * (SEMVER-MINOR) add tracing channel to diagnostics\_channel (Stephen Belanger)
msi:
  * (SEMVER-MINOR) migrate to WiX4 (Stefan Stojanovic) #45943
node-api:
  * (SEMVER-MINOR) deprecate napi\_module\_register (Vladimir Morozov) #46319
stream:
  * (SEMVER-MINOR) add setter & getter for default highWaterMark (Robert Nagy) #46929
url:
  * (SEMVER-MINOR) implement URL.canParse (Khafra) #47179
test_runner:
  * (SEMVER-MINOR) expose reporter for use in run api (Chemi Atlow) #47238

PR-URL: #47441
Signed-off-by: RafaelGSS <[email protected]>
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
@vmoroz @danielleadams
node-api: deprecate napi_module_register
7019d48
PR-URL: #46319
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
@danielleadams danielleadams mentioned this pull request Jul 10, 2023
v18.17.0 release proposal #48694
Merged
danielleadams added a commit that referenced this pull request Jul 10, 2023
@danielleadams
2023-07-11, Version 18.17.0 'Hydrogen' (LTS)
3cd3594
Notable changes:

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
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
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
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 13, 2023
@danielleadams
2023-07-13, Version 18.17.0 'Hydrogen' (LTS)
a540abd
Notable changes:

crypto:
  * update root certificates to NSS 3.89 (Node.js GitHub Bot) #47659
deps:
  * update ada to 2.0.0 (Node.js GitHub Bot) #47339
dns:
  * (SEMVER-MINOR) expose getDefaultResultOrder (btea) #46973
doc:
  * add ovflowd to collaborators (Claudio Wunder) #47844
  * add KhafraDev to collaborators (Matthew Aitken) #47510
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
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:
  * drop ICU requirement for parsing hostnames (Yagiz Nizipli) #47339
  * use ada::url_aggregator for parsing urls (Yagiz Nizipli) #47339
  * (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 17, 2023
@danielleadams
2023-07-17, Version 18.17.0 'Hydrogen' (LTS)
5c1428a
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
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 17, 2023
@danielleadams
2023-07-17, Version 18.17.0 'Hydrogen' (LTS)
ba8e95b
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
@danielleadams
2023-07-18, Version 18.17.0 'Hydrogen' (LTS)
a39b8a2
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
@danielleadams
2023-07-18, Version 18.17.0 'Hydrogen' (LTS)
51513b2
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
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@danielleadams @Ceres6
2023-07-18, Version 18.17.0 'Hydrogen' (LTS)
1934336
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
@danielleadams @Ceres6
2023-07-18, Version 18.17.0 'Hydrogen' (LTS)
9cae6c1
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

Reviewers

@addaleax addaleax addaleax left review comments
@legendecas legendecas legendecas approved these changes
+2 more reviewers
@littledivy littledivy littledivy left review comments
@mhdawson mhdawson mhdawson approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to Node-API. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@vmoroz @nodejs-github-bot @mhdawson @addaleax @legendecas @littledivy
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.