node/lib
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
..
assert
dns
fs
internal src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
path
readline
stream
timers
util
_http_agent.js
_http_client.js http: trace http request / response 2022-08-05 14:25:06 +00:00
_http_common.js http: fix http server connection list when close 2022-07-24 15:06:24 +01:00
_http_incoming.js
_http_outgoing.js http: reuse socket only when it is drained 2022-07-27 10:09:06 +01:00
_http_server.js http: trace http request / response 2022-08-05 14:25:06 +00:00
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js
_stream_transform.js
_stream_wrap.js
_stream_writable.js
_tls_common.js
_tls_wrap.js net,tls: pass a valid socket on tlsClientError 2022-08-01 07:37:45 +01:00
.eslintrc.yaml events: expose CustomEvent on global with CLI flag 2022-07-23 14:39:08 +01:00
assert.js src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
async_hooks.js
buffer.js
child_process.js lib: pass env variables to child process on z/OS 2022-08-04 18:52:43 -04:00
cluster.js
console.js
constants.js
crypto.js crypto: do not allow to call setFips from the worker thread 2022-07-08 11:50:24 +01:00
dgram.js lib: add diagnostics channel and perf hooks detail 2022-07-29 14:27:16 +01:00
diagnostics_channel.js lib: improved diagnostics_channel subscribe/unsubscribe 2022-07-14 16:12:21 +00:00
dns.js lib: add diagnostics channel and perf hooks detail 2022-07-29 14:27:16 +01:00
domain.js domain: fix vm promise tracking while keeping isolation 2022-07-14 12:05:50 +01:00
events.js util: mark cwd grey while inspecting errors 2022-07-09 15:46:38 +00:00
fs.js lib: reset RegExp statics before running user code 2022-08-05 10:01:32 +02:00
http2.js
http.js http: make idle http parser count configurable 2022-07-29 10:00:38 +01:00
https.js
inspector.js
module.js
net.js net, dns: socket should handle its output as input 2022-08-03 23:46:31 +00:00
os.js
path.js
perf_hooks.js
process.js src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
punycode.js
querystring.js
readline.js
repl.js src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
stream.js
string_decoder.js
sys.js
test.js test_runner: add before/after/each hooks 2022-07-30 23:10:51 +03:00
timers.js
tls.js
trace_events.js
tty.js
url.js
util.js lib: refactor transferable AbortSignal 2022-08-04 08:40:50 -07:00
v8.js v8: serialize BigInt64Array and BigUint64Array 2022-07-15 08:56:04 +01:00
vm.js src: merge RunInThisContext() with RunInContext() 2022-07-11 09:08:41 +01:00
wasi.js
worker_threads.js
zlib.js