@pnpm/lockfile.utils
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -16,6 +16,5 @@ "use strict"; | ||
const projectsById = Object.fromEntries(projects.map((project) => [project.id, { ...project, targetDirs: [] }])); | ||
Object.entries(lockfile.packages ?? {}) | ||
.forEach(([depPath, pkg]) => { | ||
for (const [depPath, pkg] of Object.entries(lockfile.packages ?? {})) { | ||
if (pkg.resolution?.type !== 'directory') | ||
return; | ||
continue; | ||
const pkgId = (0, packageIdFromSnapshot_1.packageIdFromSnapshot)(depPath, pkg); | ||
@@ -25,11 +24,11 @@ const { name: pkgName } = (0, nameVerFromPkgSnapshot_1.nameVerFromPkgSnapshot)(depPath, pkg); | ||
if (projectsById[importerId] == null) | ||
return; | ||
continue; | ||
const localLocations = getLocalLocations(depPath, pkgName); | ||
if (!localLocations) | ||
return; | ||
continue; | ||
projectsById[importerId].targetDirs.push(...localLocations); | ||
projectsById[importerId].stages = ['preinstall', 'install', 'postinstall', 'prepare', 'prepublishOnly']; | ||
}); | ||
} | ||
return Object.values(projectsById); | ||
} | ||
//# sourceMappingURL=extendProjectsWithTargetDirs.js.map |
{ | ||
"name": "@pnpm/lockfile.utils", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Utils for dealing with pnpm-lock.yaml", | ||
@@ -31,3 +31,3 @@ "main": "lib/index.js", | ||
"yaml-tag": "1.1.0", | ||
"@pnpm/lockfile.utils": "1.0.3" | ||
"@pnpm/lockfile.utils": "1.0.4" | ||
}, | ||
@@ -37,3 +37,3 @@ "dependencies": { | ||
"ramda": "npm:@pnpm/ramda@0.28.1", | ||
"@pnpm/dependency-path": "5.1.6", | ||
"@pnpm/dependency-path": "5.1.7", | ||
"@pnpm/lockfile.types": "1.0.3", | ||
@@ -48,2 +48,5 @@ "@pnpm/pick-fetcher": "3.0.0", | ||
}, | ||
"jest": { | ||
"preset": "@pnpm/jest-config" | ||
}, | ||
"scripts": { | ||
@@ -50,0 +53,0 @@ "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"", |
Sorry, the diff of this file is not supported yet
21290
260
+ Added@pnpm/crypto.base32-hash@3.0.1(transitive)
+ Added@pnpm/crypto.polyfill@1.0.0(transitive)
+ Added@pnpm/dependency-path@5.1.7(transitive)
- Removed@pnpm/crypto.base32-hash@3.0.0(transitive)
- Removed@pnpm/dependency-path@5.1.6(transitive)
Updated@pnpm/dependency-path@5.1.7