-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: ?metadata=true
for more information
#4
Conversation
…s to only get all versions
✅ Deploy Preview for npm-meta-info ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Looking forward to it! Let me know when it's ready to be reviewed! |
README.md
Outdated
"versions": { | ||
"0.6.1": { | ||
"node": ">=10.0.0" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder when the concat
mode is useful?
I am not even sure if this format makes sense, as it seems a bit confusing to have the node range directly in versions
. And also a bit worried that this would make future extension of adding new fields harder. I think the versionsEngines
mode should be good enough, where we could also simplify the engines
query to a boolean.
README.md
Outdated
@@ -176,6 +294,72 @@ Use `+` to separate the package names. | |||
curl https://npm.antfu.dev/versions/vite+vue+nuxt | |||
``` | |||
|
|||
### `GET /engines/:pkg` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this API in taze? If not I prefer to not having it for now to limit the surface of maintenance.
I am working on it |
@antfu past weeks was quite busy on my part, sorry for the wait and thanks for finishing it, I will continue working on Taze then, thanks again :) |
?metadata=true
for more information
Edit by Anthony Fu:
This PR introduces a new
?metadata=true
field to both/:pkg
and/versions/:pkg
route, to return extra metadata likeengines
anddeprecated
(more in the future).ResolvedPackageVersion
#5Previous post
Description
Adding support to the engines part to be able to add node compatibility in @antfu/taze (See this issue).
?engines
or?engines=append
-> addversionsEngines
property?engines=concat
-> Onversions
property, each version will have its engines ('3.0.0': { node: '>=14.18.0' }
)engines
property for '/' pathLinked Issues
resolves: #3
antfu-collective/taze#146
Additional context