mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-24 07:38:12 -05:00
refactor: remove useless code from pruneLockfile (#7680)
This commit is contained in:
@@ -46,7 +46,6 @@ export function pruneLockfile (
|
||||
warn?: (msg: string) => void
|
||||
}
|
||||
): Lockfile {
|
||||
const packages: PackageSnapshots = {}
|
||||
const importer = lockfile.importers[importerId]
|
||||
const lockfileSpecs: ResolvedDependencies = importer.specifiers ?? {}
|
||||
const optionalDependencies = Object.keys(pkg.optionalDependencies ?? {})
|
||||
@@ -97,9 +96,6 @@ export function pruneLockfile (
|
||||
lockfileVersion: lockfile.lockfileVersion || LOCKFILE_VERSION,
|
||||
packages: lockfile.packages,
|
||||
}
|
||||
if (!isEmpty(packages)) {
|
||||
prunedLockfile.packages = packages
|
||||
}
|
||||
if (!isEmpty(lockfileDependencies)) {
|
||||
updatedImporter.dependencies = lockfileDependencies
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user