@pnpm/lockfile-walker
Advanced tools
Comparing version 1.0.3 to 2.0.0
@@ -27,2 +27,8 @@ import { Lockfile, PackageSnapshot } from '@pnpm/lockfile-types'; | ||
skipped?: Set<string>; | ||
}): LockfileWalkerStep; | ||
}): { | ||
directDeps: { | ||
alias: string; | ||
relDepPath: string; | ||
}[]; | ||
step: LockfileWalkerStep; | ||
}; |
@@ -33,2 +33,3 @@ "use strict"; | ||
const entryNodes = []; | ||
const directDeps = []; | ||
importerIds.forEach((importerId) => { | ||
@@ -42,13 +43,18 @@ var _a, _b, _c, _d, _e, _f; | ||
}) | ||
.map(([pkgName, reference]) => dp.refToRelative(reference, pkgName)) | ||
.filter((nodeId) => nodeId !== null) | ||
.forEach((relDepPath) => { | ||
.forEach(([pkgName, reference]) => { | ||
const relDepPath = dp.refToRelative(reference, pkgName); | ||
if (relDepPath === null) | ||
return; | ||
entryNodes.push(relDepPath); | ||
directDeps.push({ alias: pkgName, relDepPath }); | ||
}); | ||
}); | ||
return step({ | ||
includeOptionalDependencies: ((_d = (_c = opts) === null || _c === void 0 ? void 0 : _c.include) === null || _d === void 0 ? void 0 : _d.optionalDependencies) !== false, | ||
lockfile, | ||
walked, | ||
}, entryNodes); | ||
return { | ||
directDeps, | ||
step: step({ | ||
includeOptionalDependencies: ((_d = (_c = opts) === null || _c === void 0 ? void 0 : _c.include) === null || _d === void 0 ? void 0 : _d.optionalDependencies) !== false, | ||
lockfile, | ||
walked, | ||
}, entryNodes), | ||
}; | ||
} | ||
@@ -55,0 +61,0 @@ exports.default = lockfileWalker; |
{ | ||
"name": "@pnpm/lockfile-walker", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "Walk over all the dependencies in a lockfile", | ||
@@ -44,4 +44,4 @@ "main": "lib/index.js", | ||
"dependency-path": "4.0.4", | ||
"ramda": "0.26.1" | ||
"ramda": "0.27.0" | ||
} | ||
} |
8009
128
+ Addedramda@0.27.0(transitive)
- Removedramda@0.26.1(transitive)
Updatedramda@0.27.0