Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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.
  • Loading branch information
joyeecheung committed Jan 12, 2019
commit fb0d83ac30ff042f2ef966d5a316c30dfb116c58
22 changes: 0 additions & 22 deletions src/node_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,6 @@ static void Initialize(Local<Object> target,

#endif // NODE_HAVE_I18N_SUPPORT

if (env->options()->preserve_symlinks)
READONLY_TRUE_PROPERTY(target, "preserveSymlinks");
if (env->options()->preserve_symlinks_main)
READONLY_TRUE_PROPERTY(target, "preserveSymlinksMain");

if (env->options()->experimental_modules) {
READONLY_TRUE_PROPERTY(target, "experimentalModules");
const std::string& userland_loader = env->options()->userland_loader;
if (!userland_loader.empty()) {
READONLY_STRING_PROPERTY(target, "userLoader", userland_loader);
}
}

if (env->options()->experimental_vm_modules)
READONLY_TRUE_PROPERTY(target, "experimentalVMModules");

if (env->options()->experimental_repl_await)
READONLY_TRUE_PROPERTY(target, "experimentalREPLAwait");

if (env->options()->expose_internals)
READONLY_TRUE_PROPERTY(target, "exposeInternals");

if (env->abort_on_uncaught_exception())
READONLY_TRUE_PROPERTY(target, "shouldAbortOnUncaughtException");

Expand Down
12 changes: 0 additions & 12 deletions test/parallel/test-internal-modules-expose.js

This file was deleted.