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

Update babel-core dependency to v7 for jest-config #6926

Closed
wants to merge 3 commits into from
Closed

Update babel-core dependency to v7 for jest-config #6926

wants to merge 3 commits into from

Conversation

matthamil
Copy link

@matthamil matthamil commented Aug 30, 2018

Resolves #6913

Summary

I was seeing the same error as reported in #6913. I had [email protected] installed locally. I noticed that inside my node_modules/jest-config directory, it installed [email protected] inside its node_modules. I traced this back to the package.json file specifying "babel-core": "^6.0.0" which does not allow for usage of [email protected], so npm will install the latest 6.* version of babel-core. When you run your tests, you get the same error as seen in #6913.

npm ls
# truncated output to show problem
├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├── [email protected] deduped
│   │ │ ├── [email protected] deduped
│   │ │ ├─┬ [email protected]
│   │ │ │ ├── [email protected] deduped
│   │ │ │ └── [email protected] deduped
│   │ │ ├── [email protected] deduped
│   │ │ ├─┬ [email protected]
│   │ │ │ ├─┬ [email protected]

If you have [email protected] installed in your package.json, this will still be ignored by jest-config as it installs an older version.

Test plan

Using npm version 6.1.0, download jest via npm install jest --save-dev. Install [email protected] as well. Dig through node_modules/jest-config/node_modules to see if it installed v6.26.3 of babel-core.

@codecov-io
Copy link

codecov-io commented Aug 30, 2018

Codecov Report

Merging #6926 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6926   +/-   ##
=======================================
  Coverage   66.97%   66.97%           
=======================================
  Files         250      250           
  Lines       10378    10378           
  Branches        3        3           
=======================================
  Hits         6951     6951           
  Misses       3426     3426           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9350f6...6e3bb53. Read the comment docs.

@milesj
Copy link

milesj commented Aug 31, 2018

IMO, a better solution would be to upgrade the entire Babel suite in Jest to v7.

@matthamil
Copy link
Author

matthamil commented Aug 31, 2018

@milesj I agree. I made this change under the assumption that the rest of the packages were using babel 7 since I didn't see any errors in my console after making this change. After poking around, some packages are still listing a 6.* version in their package.json.

@matthamil
Copy link
Author

Closing in favor of #6949

Thanks @milesj for picking that up! :)

@matthamil matthamil closed this Sep 6, 2018
@matthamil matthamil deleted the patch-1 branch September 6, 2018 18:03
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requires Babel "^7.0.0-0", but was loaded with "6.26.3".
4 participants