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,test: fix global check #20717

Closed
wants to merge 3 commits into from
Closed

Conversation

BridgeAR
Copy link
Member

  1. commit test: remove untested knownGlobals:
These values are all non-enumerable and will never be checked.
By removing them, we make sure they will not become enumerable
unnoticed.
  1. commit repl: make console, module and require non-enumerable:
This aligns these globals with the regular context.
  1. commit test: remove common.globalCheck:
This flag is partially used in tests where it was not necessary and it
is always possible to replace this flag with `common.allowGlobals`.
This makes sure all globals are truly tested for.

This fixes repl inconsistencies and removes code to actually make the globals check stricter.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

BridgeAR added 3 commits May 14, 2018 14:55
These values are all non-enumerable and will never be checked.
By removing them, we make sure they will not become enumerable
unnoticed.
This aligns these globals with the regular context.
This flag is partially used in tests where it was not necessary and
it is always possible to replace this flag with
`common.allowGlobals`. This makes sure all globals are truly tested
for.
@BridgeAR BridgeAR requested a review from a team as a code owner May 14, 2018 14:35
@nodejs-github-bot nodejs-github-bot added the repl Issues and PRs related to the REPL subsystem. label May 14, 2018
@mcollina
Copy link
Member

mcollina commented May 14, 2018

why is @nodejs/tsc tagged as an owner here=?

@BridgeAR
Copy link
Member Author

This is done automatically. I think this is still somewhat WIP.

@BridgeAR BridgeAR removed the request for review from a team May 14, 2018 15:50
@richardlau
Copy link
Member

why is @nodejs/tsc tagged as an owner here=?

The change to test/common/README.md is probably triggering the following line in the CODEOWNERS file:

README.md @nodejs/tsc

@BridgeAR BridgeAR mentioned this pull request May 14, 2018
2 tasks
@BridgeAR
Copy link
Member Author

@Trott
Copy link
Member

Trott commented May 14, 2018

@nodejs/repl @nodejs/testing

@BridgeAR BridgeAR requested a review from cjihrig May 17, 2018 15:08
@BridgeAR
Copy link
Member Author

It would be nice if this could get some reviews :-)

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 17, 2018
@BridgeAR
Copy link
Member Author

It would be nice to get another LG before landing this.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

BridgeAR added a commit to BridgeAR/node that referenced this pull request May 19, 2018
These values are all non-enumerable and will never be checked.
By removing them, we make sure they will not become enumerable
unnoticed.

PR-URL: nodejs#20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this pull request May 19, 2018
This aligns these globals with the regular context.

PR-URL: nodejs#20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this pull request May 19, 2018
This flag is partially used in tests where it was not necessary and
it is always possible to replace this flag with
`common.allowGlobals`. This makes sure all globals are truly tested
for.

PR-URL: nodejs#20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@BridgeAR
Copy link
Member Author

Landed in 8254e38...becc3ec

@BridgeAR BridgeAR closed this May 19, 2018
MylesBorins pushed a commit that referenced this pull request May 22, 2018
These values are all non-enumerable and will never be checked.
By removing them, we make sure they will not become enumerable
unnoticed.

PR-URL: #20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 22, 2018
This aligns these globals with the regular context.

PR-URL: #20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 22, 2018
This flag is partially used in tests where it was not necessary and
it is always possible to replace this flag with
`common.allowGlobals`. This makes sure all globals are truly tested
for.

PR-URL: #20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@addaleax addaleax mentioned this pull request May 22, 2018
@BridgeAR BridgeAR deleted the fix-global-check branch January 20, 2020 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants