<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/test/node-api/test_general, branch main</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>test: add trailing commas in `test/node-api`</title>
<updated>2023-01-29T19:01:09+00:00</updated>
<author>
<name>Antoine du Hamel</name>
<email>duhamelantoine1995@gmail.com</email>
</author>
<published>2023-01-25T06:05:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/commit/?id=d640feee85447b16af13dcd5ddaa26ede4eec826'/>
<id>d640feee85447b16af13dcd5ddaa26ede4eec826</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/46384
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/46384
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>node-api: handle no support for external buffers</title>
<updated>2022-11-09T18:30:43+00:00</updated>
<author>
<name>Michael Dawson</name>
<email>mdawson@devrus.com</email>
</author>
<published>2022-10-25T21:39:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/commit/?id=09ae62b9a869ff19d634b0fd1f5a17f198cd1ae7'/>
<id>09ae62b9a869ff19d634b0fd1f5a17f198cd1ae7</id>
<content type='text'>
Refs: https://github.com/electron/electron/issues/35801
Refs: https://github.com/nodejs/abi-stable-node/issues/441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson &lt;mdawson@devrus.com&gt;

PR-URL: https://github.com/nodejs/node/pull/45181
Reviewed-By: Chengzhong Wu &lt;legendecas@gmail.com&gt;
Reviewed-By: Minwoo Jung &lt;nodecorelab@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refs: https://github.com/electron/electron/issues/35801
Refs: https://github.com/nodejs/abi-stable-node/issues/441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson &lt;mdawson@devrus.com&gt;

PR-URL: https://github.com/nodejs/node/pull/45181
Reviewed-By: Chengzhong Wu &lt;legendecas@gmail.com&gt;
Reviewed-By: Minwoo Jung &lt;nodecorelab@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: disambiguate terms used to refer to builtins and addons</title>
<updated>2022-08-08T17:36:49+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2022-08-04T18:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/commit/?id=472edc775d683aed2d9ed39ca7cf381f3e7e3ce2'/>
<id>472edc775d683aed2d9ed39ca7cf381f3e7e3ce2</id>
<content type='text'>
The term "native module" dates back to some of the oldest code
in the code base. Within the context of Node.js core it usually
refers to modules that are native to Node.js (e.g. fs, http),
but it can cause confusion for people who don't work on this
part of the code base, as "native module" can also refer to
native addons - which is even the case in some of the API
docs and error messages.

This patch tries to make the usage of these terms more consistent.
Now within the context of Node.js core:

- JavaScript scripts that are built-in to Node.js are now referred
  to as "built-in(s)". If they are available as modules,
  they can also be referred to as "built-in module(s)".
- Dynamically-linked shared objects that are loaded into
  the Node.js processes are referred to as "addons".

We will try to avoid using the term "native modules" because it could
be ambiguous.

Changes in this patch:

File names:
- node_native_module.h -&gt; node_builtins.h,
- node_native_module.cc -&gt; node_builtins.cc

C++ binding names:
- `native_module` -&gt; `builtins`

`node::Environment`:
- `native_modules_without_cache` -&gt; `builtins_without_cache`
- `native_modules_with_cache` -&gt; `builtins_with_cache`
- `native_modules_in_snapshot` -&gt; `builtins_in_cache`
- `native_module_require` -&gt; `builtin_module_require`

`node::EnvSerializeInfo`:
- `native_modules` -&gt; `builtins

`node::native_module::NativeModuleLoader`:
- `native_module` namespace -&gt; `builtins` namespace
- `NativeModuleLoader` -&gt; `BuiltinLoader`
- `NativeModuleRecordMap` -&gt; `BuiltinSourceMap`
- `NativeModuleCacheMap` -&gt; `BuiltinCodeCacheMap`
- `ModuleIds` -&gt; `BuiltinIds`
- `ModuleCategories` -&gt; `BuiltinCategories`
- `LoadBuiltinModuleSource` -&gt; `LoadBuiltinSource`

`loader.js`:
- `NativeModule` -&gt; `BuiltinModule` (the `NativeModule` name used in
  `process.moduleLoadList` is kept for compatibility)

And other clarifications in the documentation and comments.

PR-URL: https://github.com/nodejs/node/pull/44135
Fixes: https://github.com/nodejs/node/issues/44036
Reviewed-By: Jacob Smith &lt;jacob@frende.me&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
Reviewed-By: Richard Lau &lt;rlau@redhat.com&gt;
Reviewed-By: Jiawen Geng &lt;technicalcute@gmail.com&gt;
Reviewed-By: Chengzhong Wu &lt;legendecas@gmail.com&gt;
Reviewed-By: Mohammed Keyvanzadeh &lt;mohammadkeyvanzade94@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Jan Krems &lt;jan.krems@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The term "native module" dates back to some of the oldest code
in the code base. Within the context of Node.js core it usually
refers to modules that are native to Node.js (e.g. fs, http),
but it can cause confusion for people who don't work on this
part of the code base, as "native module" can also refer to
native addons - which is even the case in some of the API
docs and error messages.

This patch tries to make the usage of these terms more consistent.
Now within the context of Node.js core:

- JavaScript scripts that are built-in to Node.js are now referred
  to as "built-in(s)". If they are available as modules,
  they can also be referred to as "built-in module(s)".
- Dynamically-linked shared objects that are loaded into
  the Node.js processes are referred to as "addons".

We will try to avoid using the term "native modules" because it could
be ambiguous.

Changes in this patch:

File names:
- node_native_module.h -&gt; node_builtins.h,
- node_native_module.cc -&gt; node_builtins.cc

C++ binding names:
- `native_module` -&gt; `builtins`

`node::Environment`:
- `native_modules_without_cache` -&gt; `builtins_without_cache`
- `native_modules_with_cache` -&gt; `builtins_with_cache`
- `native_modules_in_snapshot` -&gt; `builtins_in_cache`
- `native_module_require` -&gt; `builtin_module_require`

`node::EnvSerializeInfo`:
- `native_modules` -&gt; `builtins

`node::native_module::NativeModuleLoader`:
- `native_module` namespace -&gt; `builtins` namespace
- `NativeModuleLoader` -&gt; `BuiltinLoader`
- `NativeModuleRecordMap` -&gt; `BuiltinSourceMap`
- `NativeModuleCacheMap` -&gt; `BuiltinCodeCacheMap`
- `ModuleIds` -&gt; `BuiltinIds`
- `ModuleCategories` -&gt; `BuiltinCategories`
- `LoadBuiltinModuleSource` -&gt; `LoadBuiltinSource`

`loader.js`:
- `NativeModule` -&gt; `BuiltinModule` (the `NativeModule` name used in
  `process.moduleLoadList` is kept for compatibility)

And other clarifications in the documentation and comments.

PR-URL: https://github.com/nodejs/node/pull/44135
Fixes: https://github.com/nodejs/node/issues/44036
Reviewed-By: Jacob Smith &lt;jacob@frende.me&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
Reviewed-By: Richard Lau &lt;rlau@redhat.com&gt;
Reviewed-By: Jiawen Geng &lt;technicalcute@gmail.com&gt;
Reviewed-By: Chengzhong Wu &lt;legendecas@gmail.com&gt;
Reviewed-By: Mohammed Keyvanzadeh &lt;mohammadkeyvanzade94@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Jan Krems &lt;jan.krems@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: return proper URLs from node_api_get_module_file_name</title>
<updated>2022-03-07T14:57:54+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2022-01-29T21:05:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/commit/?id=64832c12b1a0f77e38ed7614aaa106b7a832fdbf'/>
<id>64832c12b1a0f77e38ed7614aaa106b7a832fdbf</id>
<content type='text'>
Using `file://${path}` does not properly escape special URL characters.

PR-URL: https://github.com/nodejs/node/pull/41758
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Juan José Arboleda &lt;soyjuanarbol@gmail.com&gt;
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using `file://${path}` does not properly escape special URL characters.

PR-URL: https://github.com/nodejs/node/pull/41758
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Juan José Arboleda &lt;soyjuanarbol@gmail.com&gt;
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>node-api: allow retrieval of add-on file name</title>
<updated>2021-02-10T07:34:30+00:00</updated>
<author>
<name>Gabriel Schulhof</name>
<email>gabriel.schulhof@intel.com</email>
</author>
<published>2021-02-03T07:07:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/commit/?id=ad3ebed046ef457530b046f2a62313a7e16b7e29'/>
<id>ad3ebed046ef457530b046f2a62313a7e16b7e29</id>
<content type='text'>
Unlike JS-only modules, native add-ons are always associated with a
dynamic shared object from which they are loaded. Being able to
retrieve its absolute path is important to native-only add-ons, i.e.
add-ons that are not themselves being loaded from a JS-only module
located in the same package as the native add-on itself.

Currently, the file name is obtained at environment construction time
from the JS `module.filename`. Nevertheless, the presence of `module`
is not required, because the file name could also be passed in via a
private property added onto `exports` from the `process.dlopen`
binding.

As an attempt at future-proofing, the file name is provided as a URL,
i.e. prefixed with the `file://` protocol.

Fixes: https://github.com/nodejs/node-addon-api/issues/449
PR-URL: https://github.com/nodejs/node/pull/37195
Co-authored-by: Michael Dawson &lt;mdawson@devrus.com&gt;
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unlike JS-only modules, native add-ons are always associated with a
dynamic shared object from which they are loaded. Being able to
retrieve its absolute path is important to native-only add-ons, i.e.
add-ons that are not themselves being loaded from a JS-only module
located in the same package as the native add-on itself.

Currently, the file name is obtained at environment construction time
from the JS `module.filename`. Nevertheless, the presence of `module`
is not required, because the file name could also be passed in via a
private property added onto `exports` from the `process.dlopen`
binding.

As an attempt at future-proofing, the file name is provided as a URL,
i.e. prefixed with the `file://` protocol.

Fixes: https://github.com/nodejs/node-addon-api/issues/449
PR-URL: https://github.com/nodejs/node/pull/37195
Co-authored-by: Michael Dawson &lt;mdawson@devrus.com&gt;
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: rename n-api to node-api</title>
<updated>2021-02-06T13:03:38+00:00</updated>
<author>
<name>Gabriel Schulhof</name>
<email>gabriel.schulhof@intel.com</email>
</author>
<published>2021-02-03T20:01:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/commit/?id=4b7f23f8689966c50c7b985537a57cf4d8a72fef'/>
<id>4b7f23f8689966c50c7b985537a57cf4d8a72fef</id>
<content type='text'>
This renames the macros used in the tests from `NAPI_*` to
`NODE_API_*`.

PR-URL: https://github.com/nodejs/node/pull/37217
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
Reviewed-By: Beth Griggs &lt;bgriggs@redhat.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This renames the macros used in the tests from `NAPI_*` to
`NODE_API_*`.

PR-URL: https://github.com/nodejs/node/pull/37217
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
Reviewed-By: Beth Griggs &lt;bgriggs@redhat.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>n-api: define release 6</title>
<updated>2020-03-09T18:58:51+00:00</updated>
<author>
<name>Gabriel Schulhof</name>
<email>gabriel.schulhof@intel.com</email>
</author>
<published>2020-03-03T00:53:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/commit/?id=c0c81ed204b08c264f235234ab35a490f6d147ea'/>
<id>c0c81ed204b08c264f235234ab35a490f6d147ea</id>
<content type='text'>
Mark all N-APIs that have been added since version 5 as stable.

PR-URL: https://github.com/nodejs/node/pull/32058
Fixes: https://github.com/nodejs/abi-stable-node/issues/393
Co-Authored-By: legendecas &lt;legendecas@gmail.com&gt;
Signed-off-by: Gabriel Schulhof &lt;gabriel.schulhof@intel.com&gt;
Reviewed-By: Chengzhong Wu &lt;legendecas@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Michael Dawson &lt;michael_dawson@ca.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mark all N-APIs that have been added since version 5 as stable.

PR-URL: https://github.com/nodejs/node/pull/32058
Fixes: https://github.com/nodejs/abi-stable-node/issues/393
Co-Authored-By: legendecas &lt;legendecas@gmail.com&gt;
Signed-off-by: Gabriel Schulhof &lt;gabriel.schulhof@intel.com&gt;
Reviewed-By: Chengzhong Wu &lt;legendecas@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Michael Dawson &lt;michael_dawson@ca.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: partition N-API tests</title>
<updated>2018-12-04T21:58:17+00:00</updated>
<author>
<name>Gabriel Schulhof</name>
<email>gabriel.schulhof@intel.com</email>
</author>
<published>2018-11-17T20:34:54+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/node-new.git/commit/?id=938e11882b96e19b443477571455088baaa054d8'/>
<id>938e11882b96e19b443477571455088baaa054d8</id>
<content type='text'>
Partition test/addons-napi into test/js-native-api and test/node-api to
isolate the Node.js-agnostic portion of the N-API tests from the
Node.js-specific portion.

PR-URL: https://github.com/nodejs/node/pull/24557
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partition test/addons-napi into test/js-native-api and test/node-api to
isolate the Node.js-agnostic portion of the N-API tests from the
Node.js-specific portion.

PR-URL: https://github.com/nodejs/node/pull/24557
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
