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

babel-core@^7.0.0-0 should be babel-core@^7.0.0-bridge.0 #5

Closed
quisido opened this issue Jul 19, 2018 · 10 comments · Fixed by #6
Closed

babel-core@^7.0.0-0 should be babel-core@^7.0.0-bridge.0 #5

quisido opened this issue Jul 19, 2018 · 10 comments · Fixed by #6

Comments

@quisido
Copy link
Contributor

quisido commented Jul 19, 2018

The package name is incorrect in this documentation, as well as in the jest documentation.

There is no package tagged 7.0.0-0, and the 7.0.0-beta packages are incompatible. Installing 7.0.0-0 will simply prompt the user for which package they want (at least in yarn), and bridge.0 is the only valid package for this use case.

@loganfsmyth
Copy link
Member

loganfsmyth commented Jul 19, 2018

The package name is incorrect

What name, and which documentation?

There is no package tagged 7.0.0-0.

^7.0.0-0 is a semver version range that includes babel-core@7.0.0-bridge.0 as the most recent version.

quisido pushed a commit to CharlesStover/babel--babel-bridge that referenced this issue Jul 19, 2018
@quisido
Copy link
Contributor Author

quisido commented Jul 19, 2018

My PR updates the documentation in question.
The semvar does not accurately find the bridge package.
I ran into this while trying to install jest with Babel 7.
image

I incorrectly chose a beta version thinking that any 7.0.0 would work. They do not work. When I chose bridge.0, however, the problem was resolved. More accurately, yarn add --dev babel-core@^7.0.0-bridge.0 finds the package and installs it correctly.

@loganfsmyth
Copy link
Member

Hmm, that seems like a Yarn bug. That's frustrating.

@loganfsmyth
Copy link
Member

Actually I guess bug isn't the right descriptor. Just an unfortunate side-effect of their behavior of displaying options.

@quisido
Copy link
Contributor Author

quisido commented Jul 19, 2018

Is this PR not an accurate fix?

As mentioned, the 7.0.0-beta# builds do not fix this issues that -bridge.0 does, so it seems like the semvar should include bridge.

@stern-shawn
Copy link

+1 for accepting the update.

The team I'm working on is a stickler for having exact versions in package.json instead of semver ranges, and the only non-breaking way of listing the package version (at least with Yarn, untested with npm) is "babel-core": "7.0.0-bridge.0".

@quisido
Copy link
Contributor Author

quisido commented Aug 7, 2018

This has been open for a while, with a PR as well. Any news on it being merged? @loganfsmyth @hulkish

@tricoder42
Copy link

This seems to be yarn issue. I'm using 1.9.2 and it works fine:

$ yarn add --dev babel-core@^7.0.0-0   
                                                                                                                                   
yarn add v1.9.2
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > babel-core@7.0.0-bridge.0" has unmet peer dependency "@babel/core@^7.0.0-0".
[4/4] 📃  Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ babel-core@7.0.0-bridge.0
info All dependencies
└─ babel-core@7.0.0-bridge.0
   Done in 0.58s.

This warning is weird, though:

warning " > babel-core@7.0.0-bridge.0" has unmet peer dependency "@babel/core@^7.0.0-0".

@quisido
Copy link
Contributor Author

quisido commented Aug 25, 2018

The Jest devs believe it to be a Windows issue. Not sure the cause, but it's an issue nonetheless. I don't see a benefit of leaving it as-is.

@tricoder42
Copy link

I'm on Mac. I have no problem installing package, but I can't get rid of warning. I'm just reporting how it works for me. I never use prereleases with semver so I don't know how the version range works in this case.

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 a pull request may close this issue.

4 participants