@pnpm/reviewing.dependencies-hierarchy
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -31,2 +31,3 @@ "use strict"; | ||
const currentLockfile = (modules?.virtualStoreDir && await (0, lockfile_file_1.readCurrentLockfile)(modules.virtualStoreDir, { ignoreIncompatible: false })) ?? null; | ||
const wantedLockfile = await (0, lockfile_file_1.readWantedLockfile)(maybeOpts.lockfileDir, { ignoreIncompatible: false }); | ||
const result = {}; | ||
@@ -57,3 +58,3 @@ if (!currentLockfile) { | ||
projectPath, | ||
await dependenciesHierarchyForPackage(projectPath, currentLockfile, opts), | ||
await dependenciesHierarchyForPackage(projectPath, currentLockfile, wantedLockfile, opts), | ||
]; | ||
@@ -66,3 +67,3 @@ }))).forEach(([projectPath, dependenciesHierarchy]) => { | ||
exports.buildDependenciesHierarchy = buildDependenciesHierarchy; | ||
async function dependenciesHierarchyForPackage(projectPath, currentLockfile, opts) { | ||
async function dependenciesHierarchyForPackage(projectPath, currentLockfile, wantedLockfile, opts) { | ||
const importerId = (0, lockfile_file_1.getLockfileImporterId)(opts.lockfileDir, projectPath); | ||
@@ -75,3 +76,2 @@ if (!currentLockfile.importers[importerId]) | ||
const unsavedDeps = allDirectDeps.filter((directDep) => !savedDeps[directDep]); | ||
const wantedLockfile = await (0, lockfile_file_1.readWantedLockfile)(opts.lockfileDir, { ignoreIncompatible: false }) ?? { packages: {} }; | ||
const getChildrenTree = getTree_1.getTree.bind(null, { | ||
@@ -89,3 +89,3 @@ currentPackages: currentLockfile.packages ?? {}, | ||
skipped: opts.skipped, | ||
wantedPackages: wantedLockfile.packages ?? {}, | ||
wantedPackages: wantedLockfile?.packages ?? {}, | ||
virtualStoreDir: opts.virtualStoreDir, | ||
@@ -107,3 +107,3 @@ }); | ||
skipped: opts.skipped, | ||
wantedPackages: wantedLockfile.packages ?? {}, | ||
wantedPackages: wantedLockfile?.packages ?? {}, | ||
virtualStoreDir: opts.virtualStoreDir, | ||
@@ -110,0 +110,0 @@ }); |
{ | ||
"name": "@pnpm/reviewing.dependencies-hierarchy", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "Creates a dependencies hierarchy for a symlinked `node_modules`", | ||
@@ -43,4 +43,4 @@ "main": "lib/index.js", | ||
"@pnpm/constants": "7.1.1", | ||
"@pnpm/reviewing.dependencies-hierarchy": "2.0.8", | ||
"@pnpm/test-fixtures": "0.0.38" | ||
"@pnpm/reviewing.dependencies-hierarchy": "2.0.9", | ||
"@pnpm/test-fixtures": "0.1.1" | ||
}, | ||
@@ -47,0 +47,0 @@ "funding": "https://opencollective.com/pnpm", |
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
52477