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(view): sort and truncate dist-tags #7808

Merged
merged 1 commit into from
Oct 11, 2024
Merged

fix(view): sort and truncate dist-tags #7808

merged 1 commit into from
Oct 11, 2024

Conversation

wraithgar
Copy link
Member

@wraithgar wraithgar commented Oct 2, 2024

This sorts dist-tags by publish date so that newer tags show first,
giving top priority to the latest tag.

It also truncates the list in a similar manner to how dependencies are
truncated.

Needs tests.

Before:
dist-tags list in npm view showing every tag shorted by version

After:
dist-tags list in npm view showing a truncated list sorted by publish date

@wraithgar
Copy link
Member Author

wraithgar commented Oct 2, 2024

This potentially has some overlap with #7807.

@wraithgar
Copy link
Member Author

A better example of why this helps is via the output of npm view gatsby

Before:
more dist-tags than can even fit on one screen

After:
the 24 newest dist-tags only

@ruyadorno
Copy link
Contributor

Love it! :shipit:

@wraithgar wraithgar marked this pull request as ready for review October 10, 2024 18:10
@wraithgar wraithgar requested a review from a team as a code owner October 10, 2024 18:10
@wraithgar

This comment was marked as outdated.

This sorts dist-tags by publish date so that newer tags show first,
giving top priority to the `latest` tag.

It also truncates the list in a similar manner to how dependencies are
truncated.
@wraithgar wraithgar merged commit 70cd88d into latest Oct 11, 2024
22 checks passed
@wraithgar wraithgar deleted the gar/view-dist-tag branch October 11, 2024 14:12
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.

3 participants