@pnpm/prune-lockfile
Advanced tools
Comparing version 1.1.1 to 1.1.2
import { Lockfile, LockfileImporter, PackageSnapshots } from '@pnpm/lockfile-types'; | ||
import { PackageJson } from '@pnpm/types'; | ||
export * from '@pnpm/lockfile-types'; | ||
export declare function pruneSharedLockfile(lockfile: Lockfile, opts: { | ||
defaultRegistry: string; | ||
export declare function pruneSharedLockfile(lockfile: Lockfile, opts?: { | ||
warn?: (msg: string) => void; | ||
@@ -14,5 +13,4 @@ }): { | ||
}; | ||
export declare function pruneLockfile(lockfile: Lockfile, pkg: PackageJson, importerId: string, opts: { | ||
defaultRegistry: string; | ||
export declare function pruneLockfile(lockfile: Lockfile, pkg: PackageJson, importerId: string, opts?: { | ||
warn?: (msg: string) => void; | ||
}): Lockfile; |
@@ -11,4 +11,3 @@ "use strict"; | ||
prodRelPaths: R.unnest(R.values(lockfile.importers).map((deps) => resolvedDepsToRelDepPaths(deps.dependencies || {}))), | ||
registry: opts.defaultRegistry, | ||
warn: opts.warn || ((msg) => undefined), | ||
warn: opts && opts.warn || ((msg) => undefined), | ||
}); | ||
@@ -89,3 +88,2 @@ const prunnedLockfile = Object.assign({}, lockfile, { packages: copiedPackages }); | ||
notProdOnly, | ||
registry: opts.registry, | ||
}); | ||
@@ -95,3 +93,2 @@ copyDependencySubGraph(copiedPackages, opts.prodRelPaths, originalPackages, new Set(), opts.warn, { | ||
notProdOnly, | ||
registry: opts.registry, | ||
}); | ||
@@ -102,3 +99,2 @@ copyDependencySubGraph(copiedPackages, opts.optionalRelPaths, originalPackages, new Set(), opts.warn, { | ||
optional: true, | ||
registry: opts.registry, | ||
}); | ||
@@ -109,3 +105,2 @@ copyDependencySubGraph(copiedPackages, opts.devRelPaths, originalPackages, new Set(), opts.warn, { | ||
notProdOnly, | ||
registry: opts.registry, | ||
walkOptionals: true, | ||
@@ -116,3 +111,2 @@ }); | ||
notProdOnly, | ||
registry: opts.registry, | ||
walkOptionals: true, | ||
@@ -119,0 +113,0 @@ }); |
{ | ||
"name": "@pnpm/prune-lockfile", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Prune a pnpm-lock.yaml", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
10726
175