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: use normalized version constraints #38

Merged

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Aug 27, 2024

@dsherret dsherret marked this pull request as ready for review August 28, 2024 01:06
Comment on lines +850 to +861
let err = Lockfile::new(NewLockfileOptions {
file_path,
content: "{ \"version\": \"2000\" }",
overwrite: false,
})
.unwrap_err();
match err.source {
LockfileErrorReason::UnsupportedVersion { version } => {
assert_eq!(version, "2000")
}
_ => unreachable!(),
}
Copy link
Member

Choose a reason for hiding this comment

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

Nice, see you in 4000 years 🖐️

Comment on lines +32 to +36
// WARNING: It's important to implement Ord/PartialOrd on the final
// normalized string so that sorting works according to the final
// output and so that's why this is used rather than JsrDepPackageReq
// directly.
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Serialize)]
Copy link
Member

Choose a reason for hiding this comment

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

Great, there's a warning, is there a test that asserts that as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try to come up with one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can't think of one atm 😅

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

@dsherret dsherret merged commit 80e2dfe into denoland:main Aug 28, 2024
1 check passed
@dsherret dsherret deleted the fix_use_normalized_version_constraints branch August 28, 2024 01:20
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