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

Going to /<package-name> should show an actual diff #701

Open
oBusk opened this issue Nov 2, 2022 · 2 comments
Open

Going to /<package-name> should show an actual diff #701

oBusk opened this issue Nov 2, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@oBusk
Copy link
Owner

oBusk commented Nov 2, 2022

Currently it goes to /<package-name>@1.2.3...<package-name>@1.2.3 which has no diff since they are the same.

We should redirect to a comparison between latest-1 and latest

Related: #702

@oBusk oBusk added the bug Something isn't working label Nov 2, 2022
@oBusk
Copy link
Owner Author

oBusk commented Nov 9, 2022

This means we need special case going from versionsToSpecs into canonicalSpec. Essentially we don't want to do something "clever" if intended diff is between 1.2.3...1.2.3, only when there's only one diff to start with.

@oBusk
Copy link
Owner Author

oBusk commented Nov 13, 2022

The annoyng thing is that versionsToSpecs is the part that gets "both" specs, so when it gets a package name (without version) as A, and nothing as B, it should return something like package@latest~1...package@latest or something similiar. Where ~1, is a syntax where I mean "the version before latest". But since there is no such syntax in npm specs, I'm not sure how to do it.

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