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

[breaking][deps] Add @babel/runtime as a peer dep #229

Merged
merged 1 commit into from
Sep 4, 2019

Conversation

noratarano
Copy link
Collaborator

@noratarano noratarano commented Sep 4, 2019

Summary

Was getting the following error from another repo that didn't have it installed while I was testing version 4.0.0-alpha.1:

FAIL test/index_test.js
  ● compileCSS › returns css

    Cannot find module '@babel/runtime/helpers/interopRequireWildcard' from 'withStyles.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)
      at Object.<anonymous> (node_modules/react-with-styles/lib/withStyles.js:3:31)

We need to add it because @babel/runtime is a peer dep of babel-preset-airbnb. The reason we weren't seeing any errors for this before is because eslint-plugin-jsx-a11y (a dev dep here) had already installed it as a dependency.

Reviewers

@ljharb @lencioni @TaeKimJR @indiesquidge @ahuth @joeuy @majapw

@noratarano noratarano changed the title [deps] Add @babel/runtime as a peer dep [breaking][deps] Add @babel/runtime as a peer dep Sep 4, 2019
package.json Outdated
@@ -50,6 +50,7 @@
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/register": "^7.5.5",
"@babel/runtime": "^7.5.5",
Copy link
Collaborator

Choose a reason for hiding this comment

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

ideally the dev dep version is an exact match of the peer dep one

Copy link
Collaborator Author

@noratarano noratarano Sep 4, 2019

Choose a reason for hiding this comment

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

@ljharb The issue is that eslint-plugin-jsx-a11y@6.2.3 installs 7.5.5. 🤔 so it always resolves to 7.5.5 anyway. Should we require the peer dep to be 7.5.5 or 7.0.0?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, but ^7 will include that too. I think ^7 is the most widely compatible.

@@ -76,6 +77,7 @@
"sinon-sandbox": "^2.0.5"
},
"peerDependencies": {
"@babel/runtime": "^7.0.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ljharb Now the versions of @babel/runtime are set to ^7.0.0 and they match! PTAL 🙏

@noratarano noratarano merged commit 1558a64 into master Sep 4, 2019
@noratarano noratarano mentioned this pull request Sep 4, 2019
@ljharb ljharb deleted the nora--babel-runtime branch September 4, 2019 19:17
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.

None yet

2 participants