Skip to content

node: Make builtin libs available for `--eval`

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

cli

Description of change

Make the builtin libraries available for the --eval and --print CLI options, using the same mechanism that the REPL uses.

This renders workarounds like node -e 'require("fs").doStuff()' unnecessary which I find myself often using.

Merge request reports

Loading