-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix: use normalized version constraints #38
Conversation
dsherret
commented
Aug 27, 2024
•
edited
Loading
edited
- Uses feat: ability to get a normalized version constraint deno_semver#32
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!(), | ||
} |
There was a problem hiding this comment.
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 🖐️
// 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)] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM