Skip to content

Commit 2190d47

Browse files
committed
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 <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent cd70cbc commit 2190d47

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
@@ -69,28 +69,6 @@ static void Initialize(Local<Object> target,
6969

7070
#endif // NODE_HAVE_I18N_SUPPORT
7171

72-
if (env->options()->preserve_symlinks)
73-
READONLY_TRUE_PROPERTY(target, "preserveSymlinks");
74-
if (env->options()->preserve_symlinks_main)
75-
READONLY_TRUE_PROPERTY(target, "preserveSymlinksMain");
76-
77-
if (env->options()->experimental_modules) {
78-
READONLY_TRUE_PROPERTY(target, "experimentalModules");
79-
const std::string& userland_loader = env->options()->userland_loader;
80-
if (!userland_loader.empty()) {
81-
READONLY_STRING_PROPERTY(target, "userLoader", userland_loader);
82-
}
83-
}
84-
85-
if (env->options()->experimental_vm_modules)
86-
READONLY_TRUE_PROPERTY(target, "experimentalVMModules");
87-
88-
if (env->options()->experimental_repl_await)
89-
READONLY_TRUE_PROPERTY(target, "experimentalREPLAwait");
90-
91-
if (env->options()->expose_internals)
92-
READONLY_TRUE_PROPERTY(target, "exposeInternals");
93-
9472
if (env->abort_on_uncaught_exception())
9573
READONLY_TRUE_PROPERTY(target, "shouldAbortOnUncaughtException");
9674

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

-12
This file was deleted.

0 commit comments

Comments
 (0)