Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node: Make builtin libs available for --eval #6207

Closed
wants to merge 2 commits into from

Commits on Apr 18, 2016

  1. node: Make builtin libs available for --eval

    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.
    
    As part of this, the list of builtin modules and the code for
    adding the corresponding properties to the target context is moved
    to `internal/module.js`, and the previously missing `repl` entry
    is added.
    addaleax committed Apr 18, 2016
    Configuration menu
    Copy the full SHA
    d01010b View commit details
    Browse the repository at this point in the history
  2. repl: Keep the built-in modules non-enumerable

    Make sure that the built-in modules in the repl stay non-enumerable.
    Previously, they would pop up as enumerable properties of the global
    object after having been accessed for the first time.
    addaleax committed Apr 18, 2016
    Configuration menu
    Copy the full SHA
    6015b6a View commit details
    Browse the repository at this point in the history