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

Difficult to select all versions in a major #488

Open
jaydenseric opened this issue May 25, 2020 · 1 comment · May be fixed by #513
Open

Difficult to select all versions in a major #488

jaydenseric opened this issue May 25, 2020 · 1 comment · May be fixed by #513
Milestone

Comments

@jaydenseric
Copy link

If you have this in your package.json:

{
  "engines": {
    "node": "^12.0.0 || >= 13.7.0"
  }
}

It is hard to replicate that in a browserslist query:

Node 12 - 13 and Node < 13, Node >= 13.7.0

One gotcha is that browserslist has a different behavior than the npm ecosystem when considering a major number on it's own: Node 12 in browserslist will select only the newest v12 version, but 12 in package.json engines or dependencies selects every version in that major.

It would be nice if browserslist used the semver semantics, allowing the same semver version and range strings that we're used to using in package.json, e.g.

Node ^12.0.0 || >= 13.7.0

Or this, which is the same:

Node 12 || >= 13.7.0
@ai
Copy link
Member

ai commented May 25, 2020

Good point. It is breaking changes and I do not have a solution right now.

Let's keep the issue for next major release.

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.

2 participants