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

npm latest package update time #10023

Open
nicfv opened this issue Mar 10, 2024 · 6 comments
Open

npm latest package update time #10023

nicfv opened this issue Mar 10, 2024 · 6 comments
Labels
good first issue New contributors, join in! service-badge New or updated service badge

Comments

@nicfv
Copy link

nicfv commented Mar 10, 2024

📋 Description

It would be great to show the latest updated date for an npm package, sort of like the static relative date badge:

Relative date

image

A required badge query parameter would be the package name. Possibly an optional query parameter could be the package version, but should default to the latest version.

🔗 Data

npm v {package} time.modified

E.g.:

$ npm v smath time.modified
2024-03-10T22:40:54.837Z

🎤 Motivation

It would be great to show how recently my package has been updated, to show that it is still being maintained.

@nicfv nicfv added the service-badge New or updated service badge label Mar 10, 2024
@chris48s
Copy link
Member

chris48s commented Mar 11, 2024

This does appear to be exposed via the NPM API
If we call something like https://registry.npmjs.org/express/ there is a key called time which is a map of version number to timestamp. We could look up the latest version in that.

@chris48s chris48s added the good first issue New contributors, join in! label Mar 11, 2024
@nicfv
Copy link
Author

nicfv commented Mar 11, 2024

If we call something like https://registry.npmjs.org/express/ there is a key called time which is a map of version number to timestamp.

I didn't know about this api! Thanks for sharing. Looking forward to (hopefully) a new badge soon!

PierreJanineh added a commit to PierreJanineh/shields that referenced this issue Apr 9, 2024
@saloni0419
Copy link

Can you please assign this issue to me

@nicfv
Copy link
Author

nicfv commented May 2, 2024

@saloni0419 It doesn't look like I have permission to assign issues, but go for it, if you're interested working on it! Looks like PR #10083 hasn't been touched in over 3 weeks, so not sure if anything will happen there.

@aniruddhparwal
Copy link

aniruddhparwal commented Sep 16, 2024

Hi @chris48s
It seems like no one has been working on this for a long time. If fine I would like to pick this up.

@chris48s
Copy link
Member

Sure. It looks like there is a WIP PR open that was never finished at #10083 that might make a good starting point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

4 participants