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

Fix semver range operations #5

Merged
merged 2 commits into from
Feb 17, 2022
Merged

Fix semver range operations #5

merged 2 commits into from
Feb 17, 2022

Conversation

cheesehary
Copy link

Most semver APIs don't work on ranges. It slipped through our unit tests because the versions in all test cases don't have a caret.

@@ -263,32 +263,32 @@ it("should not error if the range is included in the allowedDependencyVersions o
it("should error and fix the version to the closest allowed one when adding an allowed major", () => {
const options = {
allowedDependencyVersions: {
something: ["1.0.0", "2.0.0"]
something: ["^1.0.0", "^2.0.0"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prob worth retaining a mixture of with and without carets in the tests

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, will do a mixture here as well

});

it("should error and fix the version to the highest allowed one when adding a newer major", () => {
const options = {
allowedDependencyVersions: {
something: ["1.0.0", "2.0.0"]
something: ["1.0.0", "^2.0.0"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've got a mixture here for example

@cheesehary cheesehary merged commit 50c6a8e into master Feb 17, 2022
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 this pull request may close these issues.

2 participants