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

repl: Default useGlobal to false in CLI REPL. #5703

Closed
wants to merge 7 commits into from
Closed

repl: Default useGlobal to false in CLI REPL. #5703

wants to merge 7 commits into from

Commits on Jun 29, 2016

  1. repl: Default useGlobal to false in CLI REPL.

    This addresses #5659. The
    documentation for REPL states that the default value of `useGlobal` is
    `false`. It makes no distinction between a REPL that is created
    programmatically, and the one a user is dropped into on the command line
    by executing `node` with no arguments. This change ensures that the CLI
    REPL uses a default value of `false`.
    lance committed Jun 29, 2016
    Configuration menu
    Copy the full SHA
    affd22c View commit details
    Browse the repository at this point in the history
  2. repl: Incorporate useGlobal test feedback from @cjihrig

    Test three times, once for each of `true`, `false` and `undefined` for
    the `useGlobal` parameter. Inline the test itself, and lowercase the
    `repl` variable. Add `common.mustCall()` for all test callback functions.
    lance committed Jun 29, 2016
    Configuration menu
    Copy the full SHA
    d275ced View commit details
    Browse the repository at this point in the history
  3. repl: Add tests for repl eval of let process;

    These changes are meant to address concerns aired in
    #6802. A test case has been added
    which tests the behavior of `let process;` when `useGlobal` is `false`
    or `undefined`. As mentioned in the test comments, setting `useGlobal`
    to `true` generates the the expected exception, and the `catch` block
    executes in the test code as expected. But the test framework detects
    this exception being thrown and fails the build.
    
        /usr/bin/python tools/test.py --mode=release -J \
            addon doctool known_issues message parallel sequential
            === release test-repl-use-global ===
            Path: parallel/test-repl-use-global
            domain.js:99
                    process._emittingTopLevelDomainError = false;
                                                                 ^
    
        TypeError: Cannot set property '_emittingTopLevelDomainError' of
         undefined
            at Domain.errorHandler [as _errorHandler] (domain.js:99:46)
                at process._fatalException (node.js:269:33)
                Command: out/Release/node --expose-internals
                /Users/lanceball/src/node/test/parallel/test-repl-use-global.js
                [00:52|% 100|+ 1113|-   1]: Done
                make: *** [test] Error 1
    lance committed Jun 29, 2016
    Configuration menu
    Copy the full SHA
    bf02ed1 View commit details
    Browse the repository at this point in the history
  4. repl: Do not test useGlobal=true && let process;

    No need to test failure cases, as per @addaleax.
    lance committed Jun 29, 2016
    Configuration menu
    Copy the full SHA
    0f69e6c View commit details
    Browse the repository at this point in the history
  5. repl: Code style nits and repl output tested.

    Addressing comments from @addaleax.
    lance committed Jun 29, 2016
    Configuration menu
    Copy the full SHA
    02fffc3 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2016

  1. repl: change order of default opts in createRepl

    Done to make the diff cleaner, per @cjihrig.
    lance committed Jun 30, 2016
    Configuration menu
    Copy the full SHA
    2694945 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    997eb87 View commit details
    Browse the repository at this point in the history