FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lib: enhance use of Error from primordials by Sebastien-Ahkrin · Pull Request #31163 · nodejs/node · GitHub

/ node Public

lib: enhance use of Error from primordials - #31163

Closed
Sebastien-Ahkrin wants to merge 1 commit into
nodejs:masterfrom
Sebastien-Ahkrin:ErrorPrimordials
Closed

lib: enhance use of Error from primordials#31163
Sebastien-Ahkrin wants to merge 1 commit into
nodejs:masterfrom
Sebastien-Ahkrin:ErrorPrimordials

Conversation

Copy link
Copy Markdown
Contributor

Hello,
Now, in this PR I have added Error in the primordials eslint
so have created a line in "/lib/.eslintrc.yaml".

rules:
  no-restricted-globals:
  - name: Error
        message: "Use `const { Error } = primordials;` instead of the global."

And just import Error :).

const {
  // [...]
  Error,
} = primordials;

I hope this new PR will help you :x

nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Jan 2, 2020

Copy link
Copy Markdown
Contributor Author

Refs: #30697

BridgeAR commented Jan 2, 2020

Copy link
Copy Markdown
Member

Does this have any impact on instanceof checks?

targos commented Jan 2, 2020

Copy link
Copy Markdown
Member

Does this have any impact on instanceof checks?

No, the object is the same as the global one.

Copy link
Copy Markdown
Collaborator

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jan 2, 2020

Copy link
Copy Markdown
Contributor Author

This PR is errored with the JS test suite in the "parallel/test-tick-processor-arguments" test ...
But i don't know why ...

i can reproduce the error now in my computer .
It's a "Unexpected end of JSON input" 😢

i will investigate 😄

https://travis-ci.com/nodejs/node/jobs/271895965

Copy link
Copy Markdown
Contributor Author

This PR is errored with the JS test suite in the "parallel/test-tick-processor-arguments" test ...
But i don't know why ...

i can reproduce the error now in my computer .
It's a "Unexpected end of JSON input" 😢

i will investigate 😄

https://travis-ci.com/nodejs/node/jobs/271895965

@targos found the error 😄 so its only because the file v8-prof-polyfill can't contain any primordials.
Si i have added this line:

/* eslint-disable no-restricted-globals */

I hope this will help you :)

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Trott pushed a commit to Trott/io.js that referenced this pull request Jan 4, 2020
PR-URL: nodejs#31163
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

Trott commented Jan 4, 2020

Copy link
Copy Markdown
Member

Landed in c9b93e2

Trott closed this Jan 4, 2020
targos pushed a commit that referenced this pull request Jan 6, 2020
PR-URL: #31163
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BridgeAR mentioned this pull request Jan 7, 2020
targos pushed a commit that referenced this pull request Jan 14, 2020
PR-URL: #31163
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
PR-URL: #31163
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
MylesBorins mentioned this pull request Feb 8, 2020
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

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL