mirror of
https://github.com/semver/semver.git
synced 2026-07-11 03:53:53 -05:00
[GH-ISSUE #871] Add a way to include all prerelease versions in a range #4806
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @acarl005 on GitHub (Sep 3, 2022).
Original GitHub issue: https://github.com/semver/semver/issues/871
Currently, prerelease versions can only be opted-in to for specific patch versions, e.g. the range
^3.0.0-0will allow3.0.0-beta.1, but not3.1.0-beta.1. I think this is the optimal behavior for what most users expect. However, there are some use cases for allowing prereleases for everything in the range. For example, see this discussion. In this case, vite-node wraps vite and it lists vite in its dependencies. However, @sveltejs/kit also depended upon vite, but it needed a prerelease beta version. The result is that @sveltejs/kit and vite-node ended up with separate, incompatible versions, breaking my project. I ended up having to useoverridesin mypackage.jsonto work around it.It would be nice if there was a way for vite-node to specify a looser range that allows all prerelease versions.
Maybe it could be something like
^^3.0.0-0?@ljharb commented on GitHub (Sep 3, 2022):
Can’t it do
^3.0.0-0 || ^3.1.0-0etc, as needed?@acarl005 commented on GitHub (Sep 3, 2022):
Yes, that is possible. However, it means that the maintainers of vite-node need to add a version with every minor release of vite, which is burdensome.
@ljharb commented on GitHub (Sep 4, 2022):
True, but that’s far less burdensome than updating the entire node ecosystem to support a new range operator.
@jwdonahue commented on GitHub (Sep 16, 2022):
This seems like a discussion for the node issues site. SemVer, does not currently define range specs, though that is a WIP, but it's primarily meant to document the most common factors between a small set of existing tools that each have their own range spec semantics.
@ljharb commented on GitHub (Sep 16, 2022):
Oh, my mistake, I thought this issue was filed on npm/semver. This spec doesn't have ranges at all, so I totally agree it's entirely off topic.
@sabrican3532 commented on GitHub (Oct 15, 2022):
@segiddins
@anafebacus commented on GitHub (Oct 16, 2022):
Tank u