From 5a1e8927967d135976425513377d36bc2f70be59 Mon Sep 17 00:00:00 2001 From: Raine Revere Date: Sun, 19 Nov 2023 21:41:35 +0000 Subject: [PATCH] Revert pacote.manifest since it is the same fetch as pacote.packument. --- src/package-managers/npm.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/package-managers/npm.ts b/src/package-managers/npm.ts index 1507e658..1fea42f0 100644 --- a/src/package-managers/npm.ts +++ b/src/package-managers/npm.ts @@ -450,19 +450,7 @@ async function viewMany( let result: any try { - // when just fetching the dist-tag, use pacote.manifest instead of pacote.packument for a much smaller payload - if (!fullMetadata && fields.length === 1 && fields[0].startsWith('dist-tags.')) { - const [, tag] = fields[0].split('dist-tags.') - const manifest = await pacote.manifest(packageName, npmConfigMerged) - result = { - [`dist-tags.${tag}`]: { - name: packageName, - version: manifest?.version, - }, - } - } else { - result = await pacote.packument(packageName, npmConfigMerged) - } + result = await pacote.packument(packageName, npmConfigMerged) } catch (err: any) { if (options.retry && ++retried <= options.retry) { return viewMany(packageName, fieldsExtended, currentVersion, options, retried, npmConfigLocal)