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: add accept header to npm registry req (remove publish date) #1030

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

styfle
Copy link
Owner

@styfle styfle commented Dec 5, 2023

Copy link

vercel bot commented Dec 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
packagephobia ✅ Ready (Inspect) Visit Preview Dec 5, 2023 9:45pm

@styfle
Copy link
Owner Author

styfle commented Dec 5, 2023

As expected, this is significantly faster when viewing packages like next that have a lot of versions.

The problem is that we'll lose publish date (but that seems to be worth it).

Before

image

After

image

@styfle
Copy link
Owner Author

styfle commented Dec 5, 2023

I also confirmed with console.time() around fetchJSON() and checked the serverless function logs:

next

  • Before - fetchJSON: 1314ms
  • After - fetchJSON: 495ms

@vercel/nft

  • Before - fetchJSON: 281ms
  • After - fetchJSON: 77ms

satori

  • Before - fetchJSON: 155ms
  • After - fetchJSON: 140ms

@styfle styfle changed the title fix: add accept header to npm registry req fix: add accept header to npm registry req (remove publish date) Dec 6, 2023
@styfle styfle merged commit e76135b into main Dec 6, 2023
4 checks passed
@styfle styfle deleted the add-accept-header branch December 6, 2023 01:39
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.

RFC: Remove Publish Date
1 participant