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

Repo standardization #142

Merged
merged 2 commits into from
Apr 13, 2021
Merged

Repo standardization #142

merged 2 commits into from
Apr 13, 2021

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented Apr 11, 2021

  • Enforcing minimum node version 12 via .nvmrc, and the package file
  • Adding basic .gitattributes file
  • Adding basic .editorconfig file

Related: https://github.com/MetaMask/MetaMask-planning/issues/32

* Enforcing minimum node version 12 via .nvmrc, and the package file
* Adding basic .gitattributes file
* Adding basic .editorconfig file
@ryanml ryanml self-assigned this Apr 11, 2021
@ryanml ryanml requested a review from a team as a code owner April 11, 2021 05:20
@@ -61,7 +61,7 @@ describe('MetaMaskInpageProvider: Miscellanea', () => {

expect(
() => new MetaMaskInpageProvider(stream, null),
).toThrow('Cannot destructure property `jsonRpcStreamName` of \'undefined\' or \'null\'');
).toThrow('Cannot read property \'jsonRpcStreamName\' of null');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be a harmless side effect of the node 10 -> 12 update, but I want to double confirm, so this is a tentative change for now

Copy link
Member

Choose a reason for hiding this comment

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

It looks like a difference between v10 and v12, specifically in the case when you're using a destructured function parameter with a default value, and you invoke it with null for that parameter.

const test = ({ bar = 'foo' } = {}) => console.log(bar)
test(null);

^ That example throws this on v10: TypeError: Cannot destructure property bar of 'undefined' or 'null'.
but throws this on v12: Uncaught TypeError: Cannot read property 'bar' of null

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@ryanml ryanml merged commit a9027af into main Apr 13, 2021
@ryanml ryanml deleted the repo-standard branch April 13, 2021 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants