-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: don't override all internal repl defaults #7826
Conversation
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/ |
Yep, that's the plan assuming this lands, and nothing too crazy is in the other tests. |
CI was all 💚 |
@Fishrock123 can your "Sounds good to me." be taken as an official LGTM? |
@jasnell could I trouble you for a review? |
LGTM! |
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>
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>
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>
ping @cjihrig |
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>
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>
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>
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>
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>
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
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
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 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>
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 setsuseGlobal
totrue
, and then definesmodule
andrequire()
as globals. Alternative approaches could be to setuseGlobal
tofalse
(which was what was silently happening before) or setcommon.globalCheck
tofalse
. I prefer the current approach because it is more representative of what happens in the real world, and still performs the global checks.