Skip to content

repl,test: fix global check - #20717

Closed
BridgeAR wants to merge 3 commits into
nodejs:masterfrom
BridgeAR:fix-global-check
Closed

repl,test: fix global check#20717
BridgeAR wants to merge 3 commits into
nodejs:masterfrom
BridgeAR:fix-global-check

Conversation

@BridgeAR

Copy link
Copy Markdown
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

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 ownerMay 14, 2018 14:35
@nodejs-github-botnodejs-github-bot added the repl Issues and PRs related to the REPL subsystem. label May 14, 2018
@mcollina

mcollina commented May 14, 2018

Copy link
Copy Markdown
Member

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

@BridgeAR

Copy link
Copy Markdown
MemberAuthor

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

@BridgeAR
BridgeAR removed the request for review from a teamMay 14, 2018 15:50
@richardlau

Copy link
Copy Markdown
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

@BridgeARBridgeAR mentioned this pull request May 14, 2018
2 tasks
@BridgeAR

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
Member

@nodejs/repl @nodejs/testing

@TrottTrott mentioned this pull request May 14, 2018
2 tasks
@BridgeAR
BridgeAR requested a review from cjihrigMay 17, 2018 15:08
@BridgeAR

Copy link
Copy Markdown
MemberAuthor

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

@BridgeARBridgeAR 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
Copy Markdown
MemberAuthor

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

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
MemberAuthor

Landed in 8254e38...becc3ec

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>
@addaleaxaddaleax mentioned this pull request May 22, 2018
@BridgeAR
BridgeAR deleted the fix-global-check branch January 20, 2020 11:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.replIssues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@BridgeAR@mcollina@richardlau@Trott@jasnell@nodejs-github-bot