fix: include hasInstallScript in the abbreviated metadata

This commit is contained in:
Zoltan Kochan
2022-09-04 02:53:33 +03:00
parent 0373af22e2
commit d7fc07cc75
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/npm-resolver": patch
---
Include `hasInstallScript` in the abbreviated metadata.

View File

@@ -185,6 +185,7 @@ export default async (
function clearMeta (pkg: PackageMeta): PackageMeta {
const versions = {}
for (const [version, info] of Object.entries(pkg.versions)) {
// The list taken from https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-version-object
versions[version] = pick([
'name',
'version',
@@ -202,6 +203,7 @@ function clearMeta (pkg: PackageMeta): PackageMeta {
'deprecated',
'bundleDependencies',
'bundledDependencies',
'hasInstallScript',
], info)
}