repl: don't override all internal repl defaults#7826
Merged
cjihrig merged 2 commits intonodejs:masterfrom Aug 8, 2016
Merged
Conversation
Contributor
|
Sounds good to me. We could probably get rid of turning off global checking in favor of always using the new API? Edit, CI: https://ci.nodejs.org/job/node-test-pull-request/3374/ |
Contributor
Author
Yep, that's the plan assuming this lands, and nothing too crazy is in the other tests. |
Contributor
Author
|
CI was all 💚 |
Contributor
Author
|
@Fishrock123 can your "Sounds good to me." be taken as an official LGTM? |
Contributor
Author
|
@jasnell could I trouble you for a review? |
Member
|
LGTM! |
Contributor
Author
|
Thanks, James! CI, since it's been a while: https://ci.nodejs.org/job/node-test-pull-request/3541/ |
This commit adds a function to test/common.js that allows additional global variables to be whitelisted in a test. PR-URL: nodejs#7826 Reviewed-By: James M Snell <jasnell@gmail.com>
The createInternalRepl() module accepts an options object as an argument. However, if one is provided, it overrides all of the default options. This commit applies the options object to the defaults, only changing the values that are explicitly set. PR-URL: nodejs#7826 Reviewed-By: James M Snell <jasnell@gmail.com>
cjihrig
added a commit
that referenced
this pull request
Aug 10, 2016
This commit adds a function to test/common.js that allows additional global variables to be whitelisted in a test. PR-URL: #7826 Reviewed-By: James M Snell <jasnell@gmail.com>
cjihrig
added a commit
that referenced
this pull request
Aug 10, 2016
The createInternalRepl() module accepts an options object as an argument. However, if one is provided, it overrides all of the default options. This commit applies the options object to the defaults, only changing the values that are explicitly set. PR-URL: #7826 Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
Contributor
|
ping @cjihrig |
cjihrig
added a commit
to cjihrig/node
that referenced
this pull request
Nov 23, 2016
This commit adds a function to test/common.js that allows additional global variables to be whitelisted in a test. PR-URL: nodejs#7826 Reviewed-By: James M Snell <jasnell@gmail.com>
cjihrig
added a commit
to cjihrig/node
that referenced
this pull request
Nov 23, 2016
The createInternalRepl() module accepts an options object as an argument. However, if one is provided, it overrides all of the default options. This commit applies the options object to the defaults, only changing the values that are explicitly set. PR-URL: nodejs#7826 Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 13, 2016
This commit adds a function to test/common.js that allows additional global variables to be whitelisted in a test. PR-URL: #7826 Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 13, 2016
The createInternalRepl() module accepts an options object as an argument. However, if one is provided, it overrides all of the default options. This commit applies the options object to the defaults, only changing the values that are explicitly set. PR-URL: #7826 Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
This commit adds a function to test/common.js that allows additional global variables to be whitelisted in a test. PR-URL: #7826 Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 21, 2016
The createInternalRepl() module accepts an options object as an argument. However, if one is provided, it overrides all of the default options. This commit applies the options object to the defaults, only changing the values that are explicitly set. PR-URL: #7826 Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
MylesBorins
added a commit
that referenced
this pull request
Jan 3, 2017
This LTS release comes with 180 commits. This includes 117 which are
test related, 34 which are doc related, 15 which are build / tool
related, and 1 commit which is an update to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) #9675
* repl:
- Passing options to the repl will no longer overwrite defaults
(cjihrig) #7826
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) #9685
PR-URL: #10395
MylesBorins
added a commit
that referenced
this pull request
Jan 4, 2017
This LTS release comes with 180 commits. This includes 117 which are
test related, 34 which are doc related, 15 which are build / tool
related, and 1 commit which is an update to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) #9675
* repl:
- Passing options to the repl will no longer overwrite defaults
(cjihrig) #7826
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) #9685
PR-URL: #10395
imyller
added a commit
to imyller/meta-nodejs
that referenced
this pull request
Mar 2, 2017
This LTS release comes with 180 commits. This includes 117 which are
test related, 34 which are doc related, 15 which are build / tool
related, and 1 commit which is an update to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) nodejs/node#9675
* repl:
- Passing options to the repl will no longer overwrite defaults
(cjihrig) nodejs/node#7826
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) nodejs/node#9685
PR-URL: nodejs/node#10395
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
imyller
added a commit
to imyller/meta-nodejs
that referenced
this pull request
Mar 2, 2017
This LTS release comes with 180 commits. This includes 117 which are
test related, 34 which are doc related, 15 which are build / tool
related, and 1 commit which is an update to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) nodejs/node#9675
* repl:
- Passing options to the repl will no longer overwrite defaults
(cjihrig) nodejs/node#7826
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) nodejs/node#9685
PR-URL: nodejs/node#10395
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
repl
Description of change
The
createInternalRepl()method accepts an options object as an argument. However, if one is provided, it overrides all of the default options. This PR applies the options object to the defaults, only changing the values that are explicitly set.The approach in this PR also adds a method to
test/common.js, allowing specific global variables to be whitelisted. This is because the CLI REPL setsuseGlobaltotrue, and then definesmoduleandrequire()as globals. Alternative approaches could be to setuseGlobaltofalse(which was what was silently happening before) or setcommon.globalChecktofalse. I prefer the current approach because it is more representative of what happens in the real world, and still performs the global checks.