mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue