Skip to content

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

Merged
wraithgar merged 1 commit intolatestfrom
gar/view-dist-tag
Oct 11, 2024
Merged

fix(view): sort and truncate dist-tags#7808
wraithgar merged 1 commit intolatestfrom
gar/view-dist-tag

Conversation

@wraithgar
Copy link
Copy Markdown
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
Copy Markdown
Member Author

wraithgar commented Oct 2, 2024

This potentially has some overlap with #7807.

@wraithgar
Copy link
Copy Markdown
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
Copy Markdown
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
@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