node/doc/api
Joyee Cheung 472edc775d
src: disambiguate terms used to refer to builtins and addons
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 -> node_builtins.h,
- node_native_module.cc -> node_builtins.cc

C++ binding names:
- `native_module` -> `builtins`

`node::Environment`:
- `native_modules_without_cache` -> `builtins_without_cache`
- `native_modules_with_cache` -> `builtins_with_cache`
- `native_modules_in_snapshot` -> `builtins_in_cache`
- `native_module_require` -> `builtin_module_require`

`node::EnvSerializeInfo`:
- `native_modules` -> `builtins

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

`loader.js`:
- `NativeModule` -> `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 <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2022-08-09 01:36:49 +08:00
..
addons.md doc: fix Embedder's Guide link to V8 official docs 2022-03-17 09:25:43 +00:00
assert.md doc: remove unused code in call tracker example 2022-08-04 22:32:48 +00:00
async_context.md doc: make minor adjustments 2022-05-24 10:27:17 +01:00
async_hooks.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
buffer.md doc: make minor adjustments 2022-05-24 10:27:17 +01:00
child_process.md doc: clarify subprocess.stdout/in/err property 2022-07-24 17:43:05 +01:00
cli.md doc: add performance note to --enable-source-maps docs 2022-08-07 00:15:13 +08:00
cluster.md doc: use serial comma in cluster docs 2022-05-06 15:56:56 +01:00
console.md doc: use serial comma in console docs 2022-05-31 14:57:50 +01:00
corepack.md doc: make minor adjustments 2022-05-24 10:27:17 +01:00
crypto.md doc: fix code examples in crypto.md 2022-07-30 16:11:50 +01:00
debugger.md debugger: add debugger alias for exec(expr) 2022-02-17 19:23:20 +00:00
deprecations.md src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
dgram.md 2022-06-16, Version 18.4.0 (Current) 2022-06-16 09:45:05 -04:00
diagnostics_channel.md lib: add diagnostics channel and perf hooks detail 2022-07-29 14:27:16 +01:00
dns.md doc: revert anachronistic 'node:' module require()s in API history notes 2022-07-14 16:24:08 +01:00
documentation.md doc: add stability class to legacy status description 2022-03-30 17:49:29 +02:00
domain.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
embedding.md src: add detailed embedder process initialization API 2022-08-05 19:46:08 +00:00
errors.md doc: document ES2022's Error "cause" property 2022-07-16 07:07:46 +01:00
esm.md 2022-07-13, Version 18.6.0 (Current) 2022-07-13 22:52:14 +02:00
events.md 2022-07-26, Version 18.7.0 (Current) 2022-07-26 18:15:12 -04:00
fs.md doc: revert anachronistic 'node:' module require()s in API history notes 2022-07-14 16:24:08 +01:00
globals.md 2022-07-26, Version 18.7.0 (Current) 2022-07-26 18:15:12 -04:00
http2.md doc: update links to MDN page about dynamic imports 2022-07-15 15:44:58 +01:00
http.md http: make idle http parser count configurable 2022-07-29 10:00:38 +01:00
https.md doc: update links to MDN page about dynamic imports 2022-07-15 15:44:58 +01:00
index.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
inspector.md doc: inspector.close undefined in worker threads 2022-07-25 22:31:56 +08:00
intl.md doc: fix icu-small example 2022-06-30 09:34:10 -04:00
module.md 2022-07-13, Version 18.6.0 (Current) 2022-07-13 22:52:14 +02:00
modules.md src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
n-api.md src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
net.md net: add local family 2022-07-26 23:37:49 +01:00
os.md 2022-06-16, Version 18.4.0 (Current) 2022-06-16 09:45:05 -04:00
packages.md doc: fix typo in packages.md 2022-07-27 07:55:06 +01:00
path.md doc: revert anachronistic 'node:' module require()s in API history notes 2022-07-14 16:24:08 +01:00
perf_hooks.md lib: add diagnostics channel and perf hooks detail 2022-07-29 14:27:16 +01:00
policy.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
process.md build: remove dtrace & etw support 2022-07-17 17:33:52 +01:00
punycode.md
querystring.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
readline.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
repl.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
report.md doc: use serial comma in report docs 2022-06-13 11:00:49 +01:00
stream.md stream: initial approach to include strategy options on Readable.toWeb() 2022-07-13 11:14:38 +01:00
string_decoder.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
synopsis.md doc: use ASCII apostrophes consistently 2022-05-17 20:04:51 +01:00
test.md doc: copyedit test.md 2022-07-31 13:58:18 +01:00
timers.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
tls.md doc: clarify tls.tlsSocket.getCipher().version 2022-08-03 23:46:23 +00:00
tracing.md http: trace http request / response 2022-08-05 14:25:06 +00:00
tty.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
url.md doc: use ASCII apostrophes consistently 2022-05-17 20:04:51 +01:00
util.md lib: refactor transferable AbortSignal 2022-08-04 08:40:50 -07:00
v8.md 2022-07-13, Version 18.6.0 (Current) 2022-07-13 22:52:14 +02:00
vm.md doc: order vm.Module linker arguments correctly 2022-04-22 12:44:35 +02:00
wasi.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
webcrypto.md crypto: update Wrapping and unwrapping keys webcrypto example 2022-06-20 14:42:33 +01:00
webstreams.md doc: use serial comma in webstreams docs 2022-06-09 10:58:47 +01:00
worker_threads.md doc: use serial comma in worker_threads docs 2022-05-28 13:09:47 +01:00
zlib.md doc: use ASCII apostrophes consistently 2022-05-17 20:04:51 +01:00