@pnpm/lockfile-walker
Advanced tools
Comparing version 4.0.15 to 5.0.0
@@ -29,10 +29,9 @@ "use strict"; | ||
function lockfileWalkerGroupImporterSteps(lockfile, importerIds, opts) { | ||
const walked = new Set(((opts === null || opts === void 0 ? void 0 : opts.skipped) != null) ? Array.from(opts === null || opts === void 0 ? void 0 : opts.skipped) : []); | ||
const walked = new Set(((opts?.skipped) != null) ? Array.from(opts?.skipped) : []); | ||
return importerIds.map((importerId) => { | ||
var _a, _b, _c, _d; | ||
const projectSnapshot = lockfile.importers[importerId]; | ||
const entryNodes = Object.entries({ | ||
...(((_a = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a === void 0 ? void 0 : _a.devDependencies) === false ? {} : projectSnapshot.devDependencies), | ||
...(((_b = opts === null || opts === void 0 ? void 0 : opts.include) === null || _b === void 0 ? void 0 : _b.dependencies) === false ? {} : projectSnapshot.dependencies), | ||
...(((_c = opts === null || opts === void 0 ? void 0 : opts.include) === null || _c === void 0 ? void 0 : _c.optionalDependencies) === false ? {} : projectSnapshot.optionalDependencies), | ||
...(opts?.include?.devDependencies === false ? {} : projectSnapshot.devDependencies), | ||
...(opts?.include?.dependencies === false ? {} : projectSnapshot.dependencies), | ||
...(opts?.include?.optionalDependencies === false ? {} : projectSnapshot.optionalDependencies), | ||
}) | ||
@@ -44,3 +43,3 @@ .map(([pkgName, reference]) => dp.refToRelative(reference, pkgName)) | ||
step: step({ | ||
includeOptionalDependencies: ((_d = opts === null || opts === void 0 ? void 0 : opts.include) === null || _d === void 0 ? void 0 : _d.optionalDependencies) !== false, | ||
includeOptionalDependencies: opts?.include?.optionalDependencies !== false, | ||
lockfile, | ||
@@ -54,13 +53,11 @@ walked, | ||
function lockfileWalker(lockfile, importerIds, opts) { | ||
var _a; | ||
const walked = new Set(((opts === null || opts === void 0 ? void 0 : opts.skipped) != null) ? Array.from(opts === null || opts === void 0 ? void 0 : opts.skipped) : []); | ||
const walked = new Set(((opts?.skipped) != null) ? Array.from(opts?.skipped) : []); | ||
const entryNodes = []; | ||
const directDeps = []; | ||
importerIds.forEach((importerId) => { | ||
var _a, _b, _c; | ||
const projectSnapshot = lockfile.importers[importerId]; | ||
Object.entries({ | ||
...(((_a = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a === void 0 ? void 0 : _a.devDependencies) === false ? {} : projectSnapshot.devDependencies), | ||
...(((_b = opts === null || opts === void 0 ? void 0 : opts.include) === null || _b === void 0 ? void 0 : _b.dependencies) === false ? {} : projectSnapshot.dependencies), | ||
...(((_c = opts === null || opts === void 0 ? void 0 : opts.include) === null || _c === void 0 ? void 0 : _c.optionalDependencies) === false ? {} : projectSnapshot.optionalDependencies), | ||
...(opts?.include?.devDependencies === false ? {} : projectSnapshot.devDependencies), | ||
...(opts?.include?.dependencies === false ? {} : projectSnapshot.dependencies), | ||
...(opts?.include?.optionalDependencies === false ? {} : projectSnapshot.optionalDependencies), | ||
}) | ||
@@ -78,3 +75,3 @@ .forEach(([pkgName, reference]) => { | ||
step: step({ | ||
includeOptionalDependencies: ((_a = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a === void 0 ? void 0 : _a.optionalDependencies) !== false, | ||
includeOptionalDependencies: opts?.include?.optionalDependencies !== false, | ||
lockfile, | ||
@@ -87,3 +84,2 @@ walked, | ||
function step(ctx, nextDepPaths) { | ||
var _a; | ||
const result = { | ||
@@ -98,3 +94,3 @@ dependencies: [], | ||
ctx.walked.add(depPath); | ||
const pkgSnapshot = (_a = ctx.lockfile.packages) === null || _a === void 0 ? void 0 : _a[depPath]; | ||
const pkgSnapshot = ctx.lockfile.packages?.[depPath]; | ||
if (pkgSnapshot == null) { | ||
@@ -101,0 +97,0 @@ if (depPath.startsWith('link:')) { |
{ | ||
"name": "@pnpm/lockfile-walker", | ||
"version": "4.0.15", | ||
"version": "5.0.0", | ||
"description": "Walk over all the dependencies in a lockfile", | ||
@@ -8,3 +8,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=12.17" | ||
"node": ">=14.19" | ||
}, | ||
@@ -17,3 +17,3 @@ "files": [ | ||
"keywords": [ | ||
"pnpm6", | ||
"pnpm7", | ||
"pnpm", | ||
@@ -29,3 +29,3 @@ "shrinkwrap", | ||
"devDependencies": { | ||
"@pnpm/lockfile-walker": "4.0.15", | ||
"@pnpm/lockfile-walker": "5.0.0", | ||
"@types/ramda": "0.27.39", | ||
@@ -35,8 +35,11 @@ "tempy": "^1.0.0" | ||
"dependencies": { | ||
"@pnpm/lockfile-types": "3.2.0", | ||
"@pnpm/types": "7.10.0", | ||
"dependency-path": "8.0.11", | ||
"@pnpm/lockfile-types": "4.0.0", | ||
"@pnpm/types": "8.0.0", | ||
"dependency-path": "9.0.0", | ||
"ramda": "^0.27.1" | ||
}, | ||
"funding": "https://opencollective.com/pnpm", | ||
"exports": { | ||
".": "./lib/index.js" | ||
}, | ||
"scripts": { | ||
@@ -43,0 +46,0 @@ "lint": "eslint src/**/*.ts", |
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
11591
146
+ Added@pnpm/lockfile-types@4.0.0(transitive)
+ Added@pnpm/types@8.0.0(transitive)
+ Addeddependency-path@9.0.0(transitive)
- Removed@pnpm/lockfile-types@3.2.0(transitive)
- Removed@pnpm/types@7.10.0(transitive)
- Removeddependency-path@8.0.11(transitive)
- Removednormalize-path@3.0.0(transitive)
Updated@pnpm/lockfile-types@4.0.0
Updated@pnpm/types@8.0.0
Updateddependency-path@9.0.0