repl: don't override all internal repl defaults #7826

Merged
merged 2 commits into from Aug 8, 2016

Projects

None yet

5 participants

@cjihrig
Member
cjihrig commented Jul 21, 2016
Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected 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 sets useGlobal to true, and then defines module and require() as globals. Alternative approaches could be to set useGlobal to false (which was what was silently happening before) or set common.globalCheck to false. I prefer the current approach because it is more representative of what happens in the real world, and still performs the global checks.

@Fishrock123
Member
Fishrock123 commented Jul 21, 2016 edited

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/

@cjihrig
Member
cjihrig commented Jul 22, 2016

We could probably get rid of turning off global checking in favor of always using the new API?

Yep, that's the plan assuming this lands, and nothing too crazy is in the other tests.

@cjihrig
Member
cjihrig commented Jul 22, 2016

CI was all 💚

@cjihrig
Member
cjihrig commented Aug 1, 2016 edited

@Fishrock123 can your "Sounds good to me." be taken as an official LGTM?

@cjihrig
Member
cjihrig commented Aug 5, 2016

@jasnell could I trouble you for a review?

@jasnell
Member
jasnell commented Aug 5, 2016

LGTM!

@cjihrig
Member
cjihrig commented Aug 5, 2016

Thanks, James! CI, since it's been a while: https://ci.nodejs.org/job/node-test-pull-request/3541/

@cjihrig cjihrig added a commit to cjihrig/node-1 that referenced this pull request Aug 8, 2016
@cjihrig cjihrig test: allow globals to be whitelisted
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>
670d1bc
@cjihrig cjihrig added a commit to cjihrig/node-1 that referenced this pull request Aug 8, 2016
@cjihrig cjihrig repl: don't override all internal repl defaults
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>
bbe5e17
cjihrig added some commits Jul 21, 2016
@cjihrig cjihrig test: allow globals to be whitelisted
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>
f18b1c9
@cjihrig cjihrig repl: don't override all internal repl defaults
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>
2d4a521
@cjihrig cjihrig merged commit 2d4a521 into nodejs:master Aug 8, 2016
@cjihrig cjihrig deleted the cjihrig:globals branch Aug 8, 2016
@cjihrig cjihrig referenced this pull request Aug 8, 2016
Closed

v6.4.0 Release Proposal #8020

@cjihrig cjihrig added a commit that referenced this pull request Aug 10, 2016
@cjihrig cjihrig test: allow globals to be whitelisted
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>
9735acc
@cjihrig cjihrig added a commit that referenced this pull request Aug 10, 2016
@cjihrig cjihrig repl: don't override all internal repl defaults
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>
61e57e0
@cjihrig cjihrig referenced this pull request Aug 11, 2016
Merged

v6.4.0 Proposal #8070

@gautam714 gautam714 pushed a commit to gautam714/node-chakracore that referenced this pull request Aug 25, 2016
@cjihrig cjihrig + Kumar Gautam test: allow globals to be whitelisted
This commit adds a function to test/common.js that allows
additional global variables to be whitelisted in a test.

PR-URL: nodejs/node#7826
Reviewed-By: James M Snell <jasnell@gmail.com>
f0f4569
@gautam714 gautam714 pushed a commit to gautam714/node-chakracore that referenced this pull request Aug 25, 2016
@cjihrig cjihrig + Kumar Gautam repl: don't override all internal repl defaults
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/node#7826
Reviewed-By: James M Snell <jasnell@gmail.com>
19c5925
@MylesBorins MylesBorins modified the milestone: v4.6.2, v4.7.0 Oct 24, 2016
@MylesBorins
Member

ping @cjihrig

@cjihrig cjihrig added a commit to cjihrig/node-1 that referenced this pull request Nov 23, 2016
@cjihrig cjihrig test: allow globals to be whitelisted
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>
7e93305
@cjihrig cjihrig added a commit to cjihrig/node-1 that referenced this pull request Nov 23, 2016
@cjihrig cjihrig repl: don't override all internal repl defaults
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>
1f7c48d
@cjihrig cjihrig added a commit to cjihrig/node-1 that referenced this pull request Nov 23, 2016
@cjihrig cjihrig test: allow globals to be whitelisted
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>
fd97cf0
@cjihrig cjihrig added a commit to cjihrig/node-1 that referenced this pull request Nov 23, 2016
@cjihrig cjihrig repl: don't override all internal repl defaults
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>
9a0d9fc
@MylesBorins MylesBorins added a commit to MylesBorins/node that referenced this pull request Dec 13, 2016
@cjihrig @MylesBorins cjihrig + MylesBorins test: allow globals to be whitelisted
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>
27d7088
@MylesBorins MylesBorins added a commit to MylesBorins/node that referenced this pull request Dec 13, 2016
@cjihrig @MylesBorins cjihrig + MylesBorins repl: don't override all internal repl defaults
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>
e6bbd9d
@MylesBorins MylesBorins added a commit to MylesBorins/node that referenced this pull request Dec 13, 2016
@cjihrig @MylesBorins cjihrig + MylesBorins test: allow globals to be whitelisted
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>
e6f79c2
@MylesBorins MylesBorins added a commit to MylesBorins/node that referenced this pull request Dec 13, 2016
@cjihrig @MylesBorins cjihrig + MylesBorins repl: don't override all internal repl defaults
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>
860336b
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 13, 2016
@cjihrig @MylesBorins cjihrig + MylesBorins test: allow globals to be whitelisted
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>
02e8187
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 13, 2016
@cjihrig @MylesBorins cjihrig + MylesBorins repl: don't override all internal repl defaults
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>
698bf2e
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@cjihrig @MylesBorins cjihrig + MylesBorins test: allow globals to be whitelisted
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>
2fd27a4
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@cjihrig @MylesBorins cjihrig + MylesBorins repl: don't override all internal repl defaults
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>
13c4a6b
@MylesBorins MylesBorins referenced this pull request Dec 21, 2016
Merged

V4.7.1 proposal #10395

@MylesBorins MylesBorins added a commit that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2016-01-03, Version 4.7.1 'Argon' (LTS)
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
b460d9f
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2017-01-03, Version 4.7.1 'Argon' (LTS)
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
1035318
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 4, 2017
@MylesBorins MylesBorins 2017-01-03, Version 4.7.1 'Argon' (LTS)
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
b26a469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment