Skip to content

src: cleanup cli options on `internalBinding('config')`

src: pass cli options to bootstrap/loaders.js lexically

Instead of using internalBinding('config') which should be used to carry information about build-time options, directly pass the run-time cli options into bootstrap/loaders.js lexically via function arguments.

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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading