Skip to content

Commit d342707

Browse files
joyeecheungtargos
authored andcommitted
src: remove unused internalBinding('config') properties
Remove the following properties: - `preserveSymlinks` - `preserveSymlinksMain` - `experimentalModules` - `userLoader` - `experimentalVMModules` - `experimentalREPLAwait` - `exposeInternals` We used to use them to pass cli option values from C++ into JS, but now the values are obtained in JS land using `require('internal/options').getOptionValue` instead so they are unused. Also removes `test/parallel/test-internal-modules-expose.js` which tests `--expose-internals`. We already have hundreds of tests depending on `--expose-internals`, they are more than enough to test the functionality of the flag. PR-URL: #25463 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Backport-PR-URL: #26027
1 parent 7565586 commit d342707

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

src/node_config.cc

-22
Original file line numberDiff line numberDiff line change
@@ -73,28 +73,6 @@ static void Initialize(Local<Object> target,
7373

7474
#endif // NODE_HAVE_I18N_SUPPORT
7575

76-
if (env->options()->preserve_symlinks)
77-
READONLY_TRUE_PROPERTY(target, "preserveSymlinks");
78-
if (env->options()->preserve_symlinks_main)
79-
READONLY_TRUE_PROPERTY(target, "preserveSymlinksMain");
80-
81-
if (env->options()->experimental_modules) {
82-
READONLY_TRUE_PROPERTY(target, "experimentalModules");
83-
const std::string& userland_loader = env->options()->userland_loader;
84-
if (!userland_loader.empty()) {
85-
READONLY_STRING_PROPERTY(target, "userLoader", userland_loader);
86-
}
87-
}
88-
89-
if (env->options()->experimental_vm_modules)
90-
READONLY_TRUE_PROPERTY(target, "experimentalVMModules");
91-
92-
if (env->options()->experimental_repl_await)
93-
READONLY_TRUE_PROPERTY(target, "experimentalREPLAwait");
94-
95-
if (env->options()->expose_internals)
96-
READONLY_TRUE_PROPERTY(target, "exposeInternals");
97-
9876
READONLY_PROPERTY(target,
9977
"bits",
10078
Number::New(env->isolate(), 8 * sizeof(intptr_t)));

test/parallel/test-internal-modules-expose.js

-12
This file was deleted.

0 commit comments

Comments
 (0)