mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-20 04:27:09 +00:00
npm: Request abbreviated metadata to reduce download size
Ref: https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md
This commit is contained in:
parent
c03e33db56
commit
23bcbf8906
@ -5,5 +5,5 @@ NPM_URL = 'https://registry.npmjs.org/%s'
|
||||
|
||||
async def get_version(name, conf, *, cache, **kwargs):
|
||||
key = conf.get('npm', name)
|
||||
data = await cache.get_json(NPM_URL % key)
|
||||
data = await cache.get_json(NPM_URL % key, headers={"Accept": "application/vnd.npm.install-v1+json"})
|
||||
return data['dist-tags']['latest']
|
||||
|
Loading…
Reference in New Issue
Block a user