-
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
node-api: deprecate napi_module_register based registration #46319
node-api: deprecate napi_module_register based registration #46319
Conversation
Review requested:
|
@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 EDIT: In this commit I minimize the changes to target only switching to the symbol-based registration and keeping all old macros. |
@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 |
4441082
to
df48609
Compare
@mhdawson I have restored the original change in df48609 and added the Looking through the code Lines 622 to 631 in 8ba54e5
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: Lines 15 to 20 in 8ba54e5
NM_F_DELETEME is always forced in Lines 682 to 694 in 8ba54e5
NAPI_MODULE_X 's flags parameter was never used too.
I added a comment for the |
df48609
to
c043f2c
Compare
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
@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 The new |
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.
c043f2c
to
a742f4a
Compare
I have restored the test. It is important to note that since the test was relying on the old |
@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? |
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 👍
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
PR-URL: #46319 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
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
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
PR-URL: #46319 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
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
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
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 <rafael.nunu@hotmail.com>
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 <rafael.nunu@hotmail.com>
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 <rafael.nunu@hotmail.com>
PR-URL: #46319 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
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: TODO
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
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
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
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
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
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
Notable changes: crypto: * update root certificates to NSS 3.89 (Node.js GitHub Bot) #47659 * use WebIDL converters in WebCryptoAPI (Filip Skokan) #46067 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 * 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: * 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
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
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
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
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
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
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
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
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
Summary
Change
NAPI_MODULE
andNAPI_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:
napi_module
struct and callnapi_module_register
on module library (.so or .dll) load.napi_register_module_v1
function which is called on-demand to initialize module exports.Node.JS module binding loads module library and then
napi_module
struct, then it uses itsnm_register_func
to initialize module exports,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
andNAPI_MODULE_INIT
macros are changed to define thenapi_register_module_v1
function instead of callingnapi_module_register
. It effectively deprecates thenapi_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 theNULL
parameter is given to theNAPI_MODULE
macro.This PR is a "spin off" from the PR #45715 to keep it focused on the new versioning approach.