-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fix for Babel7 bridge package name in documentation. #6745
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cc @SimenB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also update https://jestjs.io/docs/en/getting-started#using-babel
README.md
Outdated
> | ||
> ```bash | ||
> yarn add --dev 'babel-core@^7.0.0-0' @babel/core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should keep the quotes, see #6746
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing it to match the getting started page (re: #6746) just means the getting started page is wrong too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I got from that Issue link is someone saying "There should be quotes to match the docs," as opposed to "There should be quotes in order for this to work." Let me know if the latter is the case @SimenB. I did not notice evidence that the quotes are needed for this to work; however, I do have evidence that the quotes must not exist for this to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any update on this? I do not agree with your requested changes @SimenB. I believe leaving the quotes breaks the command, as per the screenshots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SimenB installing without quotes works just fine for me on latest Yarn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both works for me, but since we got a PR I guess it doesn't work for everybody. Is it a Windows thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SimenB I am on Windows, so that may be the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Babel has accepted this change in their official documentation (see babel/babel-bridge/pull/6). Makes sense to me that Jest should as well.
Codecov Report
@@ Coverage Diff @@
## master #6745 +/- ##
=======================================
Coverage 63.68% 63.68%
=======================================
Files 235 235
Lines 9007 9007
Branches 3 4 +1
=======================================
Hits 5736 5736
Misses 3270 3270
Partials 1 1 Continue to review full report at Codecov.
|
Should update https://github.com/facebook/jest/blob/master/docs/GettingStarted.md for multiple versioned documents and https://github.com/facebook/jest/blob/master/packages/babel-jest/README.md. Also the changelog |
Update GettingStarted and CHANGELOG, as per request. README change was a part of the initial PR. |
This documentation is not accurate. The suggestion to use the bridge version of babel-core does not work with Jest because there are hard dependencies on 6.26.3 in See #6913 for reference. |
This documentation doesn't change anything from the existing documentation. It is essentially a typo fix. If there is an error in the existing documentation, it should probably be a different PR. That said, I have had no issue using babel-bridge with jest, as per the existing documentation. That is how I encountered this bug when installing the bridge. |
Removed single quotes from around the package name and improved grammar. The PR did not update from pushing the change to original branch.
Forgot about this, sorry. I updated the versioned docs and merged, thanks! |
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. |
resolves #6720
Summary
yarn cannot find a package with semvar
^7.0.0-0
. Further, the7.0.0-beta#
builds do not work. The accurate package version is^7.0.0-bridge.0
.(The quotation marks around the package in the documentation also cause an error.)
To Reproduce
yarn add --dev babel-core@^7.0.0-0
Expected behavior
The package
babel-core@^7.0.0-bridge.0
should be added.Issue in @babel/babel-bridge
Test plan
No code changes.