@pnpm/lockfile-utils
Advanced tools
Comparing version 5.0.4 to 5.0.5
@@ -16,3 +16,3 @@ "use strict"; | ||
.forEach(([depPath, pkg]) => { | ||
if (pkg.resolution?.['type'] !== 'directory') | ||
if (pkg.resolution?.type !== 'directory') | ||
return; | ||
@@ -19,0 +19,0 @@ const pkgId = pkg.id ?? depPath; |
@@ -35,15 +35,16 @@ "use strict"; | ||
function pkgSnapshotToResolution(depPath, pkgSnapshot, registries) { | ||
if (pkgSnapshot.resolution['type'] || pkgSnapshot.resolution['tarball']?.startsWith('file:')) { | ||
if (Boolean(pkgSnapshot.resolution.type) || | ||
pkgSnapshot.resolution.tarball?.startsWith('file:')) { | ||
return pkgSnapshot.resolution; | ||
} | ||
const { name } = (0, nameVerFromPkgSnapshot_1.nameVerFromPkgSnapshot)(depPath, pkgSnapshot); | ||
const registry = pkgSnapshot.resolution['registry'] || | ||
const registry = pkgSnapshot.resolution.registry || // eslint-disable-line @typescript-eslint/prefer-nullish-coalescing | ||
(name[0] === '@' && registries[name.split('/')[0]]) || | ||
registries.default; | ||
let tarball; | ||
if (!pkgSnapshot.resolution['tarball']) { | ||
if (!pkgSnapshot.resolution.tarball) { | ||
tarball = getTarball(registry); | ||
} | ||
else { | ||
tarball = new url_1.default.URL(pkgSnapshot.resolution['tarball'], registry.endsWith('/') ? registry : `${registry}/`).toString(); | ||
tarball = new url_1.default.URL(pkgSnapshot.resolution.tarball, registry.endsWith('/') ? registry : `${registry}/`).toString(); | ||
} | ||
@@ -50,0 +51,0 @@ return { |
{ | ||
"name": "@pnpm/lockfile-utils", | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
"description": "Utils for dealing with pnpm-lock.yaml", | ||
@@ -32,3 +32,3 @@ "main": "lib/index.js", | ||
"yaml-tag": "1.1.0", | ||
"@pnpm/lockfile-utils": "5.0.4" | ||
"@pnpm/lockfile-utils": "5.0.5" | ||
}, | ||
@@ -41,3 +41,3 @@ "dependencies": { | ||
"@pnpm/types": "8.10.0", | ||
"@pnpm/dependency-path": "1.1.1" | ||
"@pnpm/dependency-path": "1.1.2" | ||
}, | ||
@@ -44,0 +44,0 @@ "funding": "https://opencollective.com/pnpm", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25066
316
+ Added@pnpm/dependency-path@1.1.2(transitive)
- Removed@pnpm/dependency-path@1.1.1(transitive)
Updated@pnpm/dependency-path@1.1.2