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

NPM satisfies issue with optional version #36

Closed
piotrooo opened this issue Jul 22, 2022 · 0 comments
Closed

NPM satisfies issue with optional version #36

piotrooo opened this issue Jul 22, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@piotrooo
Copy link
Member

What I am doing wrong?

new Semver("2", SemverType.NPM).isGreaterThanOrEqualTo("2.x"); // true

new Semver("2", SemverType.NPM).isGreaterThanOrEqualTo("2"); // true
new Semver("2", SemverType.NPM).isGreaterThanOrEqualTo("2.0"); // true
new Semver("2", SemverType.NPM).isGreaterThanOrEqualTo("2.0.0"); // false ?

new Semver("2", SemverType.NPM).isGreaterThanOrEqualTo("2.0.0"); // false ?
new Semver("2.0", SemverType.NPM).isGreaterThanOrEqualTo("2.0.0"); // false ?
new Semver("2.0.0", SemverType.NPM).isGreaterThanOrEqualTo("2.0.0"); // true

new Semver("2", SemverType.NPM).satisfies(">=2.0.0"); // false ?
new Semver("2.0", SemverType.NPM).satisfies(">=2.0.0"); // false ?
new Semver("2.0", SemverType.NPM).satisfies("2.0.x"); // false ?
new Semver("2.0.0", SemverType.NPM).satisfies("2.0.x"); // true !

new Semver("2", SemverType.NPM).satisfies(">=2.0"); // true
new Semver("2.0", SemverType.NPM).satisfies(">=2.0"); // true
new Semver("2.0.0", SemverType.NPM).satisfies(">=2.0"); // true

new Semver("2", SemverType.NPM).satisfies(">=2"); // true
new Semver("2.0", SemverType.NPM).satisfies(">=2"); // true
new Semver("2.0.0", SemverType.NPM).satisfies(">=2"); // true

new Semver("2", SemverType.NPM).satisfies("~2"); // false ?
new Semver("2.0", SemverType.NPM).satisfies("~2"); // false ?
new Semver("2.0.0", SemverType.NPM).satisfies("~2"); // true !

Original issue: vdurmont/semver4j#48

@piotrooo piotrooo added the bug Something isn't working label Jul 22, 2022
@piotrooo piotrooo added this to the v2.0.0 milestone Jul 22, 2022
@piotrooo piotrooo self-assigned this Jul 22, 2022
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
None yet
Development

No branches or pull requests

1 participant