@pnpm/lockfile-walker
Advanced tools
Comparing version 2.0.3-alpha.1 to 3.0.0
# @pnpm/lockfile-walker | ||
## 3.0.0 | ||
### Major Changes | ||
- 142f8caf7: Rename `relDepPath` to `depPath`. | ||
### Patch Changes | ||
- Updated dependencies [da091c711] | ||
- Updated dependencies [6a8a97eee] | ||
- @pnpm/types@6.0.0 | ||
- @pnpm/lockfile-types@2.0.1 | ||
- dependency-path@4.0.7 | ||
## 2.0.3-alpha.1 | ||
@@ -4,0 +18,0 @@ |
import { Lockfile, PackageSnapshot } from '@pnpm/lockfile-types'; | ||
import { DependenciesField } from '@pnpm/types'; | ||
export declare type LockedDependency = { | ||
relDepPath: string; | ||
depPath: string; | ||
pkgSnapshot: PackageSnapshot; | ||
@@ -30,5 +30,5 @@ next: () => LockfileWalkerStep; | ||
alias: string; | ||
relDepPath: string; | ||
depPath: string; | ||
}[]; | ||
step: LockfileWalkerStep; | ||
}; |
@@ -43,7 +43,7 @@ "use strict"; | ||
.forEach(([pkgName, reference]) => { | ||
const relDepPath = dp.refToRelative(reference, pkgName); | ||
if (relDepPath === null) | ||
const depPath = dp.refToRelative(reference, pkgName); | ||
if (depPath === null) | ||
return; | ||
entryNodes.push(relDepPath); | ||
directDeps.push({ alias: pkgName, relDepPath }); | ||
entryNodes.push(depPath); | ||
directDeps.push({ alias: pkgName, depPath }); | ||
}); | ||
@@ -61,3 +61,3 @@ }); | ||
exports.default = lockfileWalker; | ||
function step(ctx, nextRelDepPaths) { | ||
function step(ctx, nextDepPaths) { | ||
var _a; | ||
@@ -69,19 +69,19 @@ const result = { | ||
}; | ||
for (let relDepPath of nextRelDepPaths) { | ||
if (ctx.walked.has(relDepPath)) | ||
for (let depPath of nextDepPaths) { | ||
if (ctx.walked.has(depPath)) | ||
continue; | ||
ctx.walked.add(relDepPath); | ||
const pkgSnapshot = (_a = ctx.lockfile.packages) === null || _a === void 0 ? void 0 : _a[relDepPath]; | ||
ctx.walked.add(depPath); | ||
const pkgSnapshot = (_a = ctx.lockfile.packages) === null || _a === void 0 ? void 0 : _a[depPath]; | ||
if (!pkgSnapshot) { | ||
if (relDepPath.startsWith('link:')) { | ||
result.links.push(relDepPath); | ||
if (depPath.startsWith('link:')) { | ||
result.links.push(depPath); | ||
continue; | ||
} | ||
result.missing.push(relDepPath); | ||
result.missing.push(depPath); | ||
continue; | ||
} | ||
result.dependencies.push({ | ||
depPath, | ||
next: () => step(ctx, next({ includeOptionalDependencies: ctx.includeOptionalDependencies }, pkgSnapshot)), | ||
pkgSnapshot, | ||
relDepPath, | ||
}); | ||
@@ -88,0 +88,0 @@ } |
{ | ||
"name": "@pnpm/lockfile-walker", | ||
"version": "2.0.3-alpha.1", | ||
"version": "3.0.0", | ||
"description": "Walk over all the dependencies in a lockfile", | ||
@@ -38,5 +38,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@pnpm/lockfile-types": "2.0.1-alpha.0", | ||
"@pnpm/types": "6.0.0-alpha.0", | ||
"dependency-path": "4.0.7-alpha.0", | ||
"@pnpm/lockfile-types": "2.0.1", | ||
"@pnpm/types": "6.0.0", | ||
"dependency-path": "4.0.7", | ||
"ramda": "0.27.0" | ||
@@ -43,0 +43,0 @@ }, |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8536
1
+ Added@pnpm/lockfile-types@2.0.1(transitive)
+ Added@pnpm/types@6.0.0(transitive)
+ Addeddependency-path@4.0.7(transitive)
- Removed@pnpm/lockfile-types@2.0.1-alpha.0(transitive)
- Removed@pnpm/types@6.0.0-alpha.0(transitive)
- Removeddependency-path@4.0.7-alpha.0(transitive)
Updated@pnpm/lockfile-types@2.0.1
Updated@pnpm/types@6.0.0
Updateddependency-path@4.0.7