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

Exclude prereleases from SemVer range maximums #557

Closed
isc-tleavitt opened this issue Aug 27, 2024 · 2 comments
Closed

Exclude prereleases from SemVer range maximums #557

isc-tleavitt opened this issue Aug 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@isc-tleavitt
Copy link
Contributor

Per e.g. https://github.com/npm/node-semver?tab=readme-ov-file#x-ranges-12x-1x-12- / npm/node-semver@059a5ad - we need to exclude prereleases from range maximums as a rule. The simple way to do this is representing a range maximum with a prerelease of 0 (e.g., 1.x becomes >=1.0.0 <2.0.0-0).

See discussion in intersystems-community/zpm-registry#91

I'd recommend a test-driven development workflow for this, expanding on the existing SemVer unit tests. This is v0.9.0 critical.

@isc-tleavitt isc-tleavitt added the bug Something isn't working label Aug 27, 2024
@isc-tleavitt isc-tleavitt changed the title Exclude prereleases from range maximums Exclude prereleases from SemVer range maximums Aug 27, 2024
@isc-shuliu
Copy link
Collaborator

@isc-tleavitt

In node-semver, certain expansion/comparisons depends on the value of includePrerelease tag. In IPM, we have so far assumed this tag is false. Namely,

  • Version 1.5.0-beta does not satisfy expression 1.x
  • Version 2.3.4-beta does not satisfy expression >=2

Shall we keep this behavior or add an additional argument pIncludePrerelease in %IPM.General.SemanticVersionExpression.Comparator::Evaluate()?

@isc-shuliu
Copy link
Collaborator

Fixed by #559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants