fix: don't rely on pkg.updated for update date#561
Merged
danielroe merged 1 commit intonpmx-dev:mainfrom Jan 31, 2026
Merged
Conversation
Fixes npmx-dev#535 It appears that the dates in `updated` field are not reliable at all (see npmx-dev#535 for details). Therefore I removed it and left only `package.date`, and now I get the exact results that I expected.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Contributor
Author
danielroe
approved these changes
Jan 31, 2026
Member
|
yes, I spotted this as well - thank you ❤️ |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the "recently updated" sorting feature was not working correctly due to unreliable data in the updated field. The fix removes all dependencies on the pkg.updated field and uses only package.date for all update-related operations.
Changes:
- Removed reliance on the unreliable
result.updatedfield from npm search results - Updated all sorting and filtering logic to use
package.dateexclusively - Simplified date handling by eliminating fallback chains that included
updated
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/pages/~[username]/index.vue | Updated sorting logic to use only package.date instead of falling back to updated |
| app/composables/useStructuredFilters.ts | Removed updated field references in both filtering and sorting functions |
| app/components/PackageTableRow.vue | Simplified date display logic to use only package.date |
Member
|
Thank you for fixing this @wojtekmaj! 🤝 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #535
It appears that the dates in
updatedfield are not reliable at all (see #535 for details). Therefore I removed it and left onlypackage.date, and now I get the exact results that I expected.