node/test/addons
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
..
async-cleanup-hook doc,src,test: revise C++ code for linter update 2020-10-23 03:47:50 -07:00
async-hello-world src,test: use v8::Global instead of v8::Persistent 2019-12-24 14:31:28 +01:00
async-hooks-id test: replaced anonymous fn with arrow syntax 2019-02-14 00:06:05 +01:00
async-resource src,doc,test: remove String::New default parameter 2020-07-14 15:13:34 +02:00
buffer-free-callback test: change buffer offset to accommodate V8 BackingStore 2020-01-05 18:21:15 -08:00
callback-scope src,test: use v8::Global instead of v8::Persistent 2019-12-24 14:31:28 +01:00
dlopen-ping-pong test: fix addons/dlopen-ping-pong for npm 7.0.1 2020-10-18 17:17:42 +00:00
errno-exception test: use assert.match instead of regexp.test 2021-08-31 18:50:16 +02:00
force-context-aware src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
heap-profiler src,doc,test: remove String::New default parameter 2020-07-14 15:13:34 +02:00
hello-world src,doc,test: remove String::New default parameter 2020-07-14 15:13:34 +02:00
hello-world-function-export src,doc,test: remove String::New default parameter 2020-07-14 15:13:34 +02:00
load-long-path src,doc,test: remove String::New default parameter 2020-07-14 15:13:34 +02:00
make-callback test, tools: suppress addon function cast warnings 2019-02-01 14:08:20 +01:00
make-callback-domain-warning domain: improve deprecation warning text for DEP0097 2020-11-18 18:58:49 +00:00
make-callback-recurse test: use arrow functions in addons tests 2019-11-30 18:08:59 +01:00
new-target src,doc,test: remove String::New default parameter 2020-07-14 15:13:34 +02:00
no-addons src: add option to disable loading native addons 2021-09-10 10:54:39 -05:00
node-module-version test, tools: suppress addon function cast warnings 2019-02-01 14:08:20 +01:00
non-node-context src: fix linter failures 2020-08-07 08:43:17 -07:00
not-a-binding src: add file name to 'Module did not self-register' error 2019-11-19 16:03:55 +01:00
null-buffer-neuter buffer,n-api: release external buffers from BackingStore callback 2020-05-16 12:15:07 +02:00
openssl-binding doc,src,test: revise C++ code for linter update 2020-10-23 03:47:50 -07:00
openssl-client-cert-engine doc,src,test: revise C++ code for linter update 2020-10-23 03:47:50 -07:00
openssl-key-engine doc,src,test: revise C++ code for linter update 2020-10-23 03:47:50 -07:00
openssl-test-engine test: move test-crypto-engine to addon 2022-02-07 17:29:54 -05:00
parse-encoding buffer: add base64url encoding option 2021-01-18 12:08:20 +01:00
register-signal-handler test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
repl-domain-abort src: fix linter failures 2020-08-07 08:43:17 -07:00
stringbytes-external-exceed-max doc,src,test: revise C++ code for linter update 2020-10-23 03:47:50 -07:00
symlinked-module src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
uv-handle-leak test: enable no-empty ESLint rule 2022-02-05 12:58:32 +00:00
worker-addon tools,benchmark,lib,test: enable no-case-declarations lint rule 2022-01-05 07:42:19 -08:00
worker-buffer-callback test: fix comment misspellings of transferred 2020-12-07 07:31:58 -08:00
zlib-binding doc,src,test: revise C++ code for linter update 2020-10-23 03:47:50 -07:00
.gitignore Revert "build,test: make building addon tests less fragile" 2018-01-25 08:18:24 +11:00
addons.status test: make status file names consistent 2021-03-01 12:18:18 -08:00
common.gypi test, tools: suppress addon function cast warnings 2019-02-01 14:08:20 +01:00
testcfg.py test: make status file names consistent 2021-03-01 12:18:18 -08:00