@pnpm/prune-lockfile
Advanced tools
Comparing version 1.1.2 to 2.0.0
import { Lockfile, LockfileImporter, PackageSnapshots } from '@pnpm/lockfile-types'; | ||
import { PackageJson } from '@pnpm/types'; | ||
import { PackageManifest } from '@pnpm/types'; | ||
export * from '@pnpm/lockfile-types'; | ||
@@ -13,4 +13,4 @@ export declare function pruneSharedLockfile(lockfile: Lockfile, opts?: { | ||
}; | ||
export declare function pruneLockfile(lockfile: Lockfile, pkg: PackageJson, importerId: string, opts?: { | ||
export declare function pruneLockfile(lockfile: Lockfile, pkg: PackageManifest, importerId: string, opts?: { | ||
warn?: (msg: string) => void; | ||
}): Lockfile; |
@@ -13,3 +13,6 @@ "use strict"; | ||
}); | ||
const prunnedLockfile = Object.assign({}, lockfile, { packages: copiedPackages }); | ||
const prunnedLockfile = { | ||
...lockfile, | ||
packages: copiedPackages, | ||
}; | ||
if (R.isEmpty(prunnedLockfile.packages)) { | ||
@@ -28,3 +31,7 @@ delete prunnedLockfile.packages; | ||
const devDependencies = R.difference(R.difference(R.keys(pkg.devDependencies), optionalDependencies), dependencies); | ||
const allDeps = R.reduce(R.union, [], [optionalDependencies, devDependencies, dependencies]); | ||
const allDeps = [ | ||
...optionalDependencies, | ||
...devDependencies, | ||
...dependencies, | ||
]; | ||
const specifiers = {}; | ||
@@ -62,3 +69,6 @@ const lockfileDependencies = {}; | ||
const prunnedLockfile = { | ||
importers: Object.assign({}, lockfile.importers, { [importerId]: updatedImporter }), | ||
importers: { | ||
...lockfile.importers, | ||
[importerId]: updatedImporter, | ||
}, | ||
lockfileVersion: lockfile.lockfileVersion || constants_1.LOCKFILE_VERSION, | ||
@@ -114,3 +124,3 @@ packages: lockfile.packages, | ||
function resolvedDepsToRelDepPaths(deps) { | ||
return R.keys(deps) | ||
return Object.keys(deps) | ||
.map((pkgName) => dependency_path_1.refToRelative(deps[pkgName], pkgName)) | ||
@@ -162,4 +172,4 @@ .filter((relPath) => relPath !== null); | ||
.filter((relPath) => relPath !== null); | ||
copyDependencySubGraph(copiedSnapshots, newOptionalDependencies, originalPackages, walked, warn, Object.assign({}, opts, { optional: true })); | ||
copyDependencySubGraph(copiedSnapshots, newOptionalDependencies, originalPackages, walked, warn, { ...opts, optional: true }); | ||
} | ||
} |
{ | ||
"name": "@pnpm/prune-lockfile", | ||
"version": "1.1.2", | ||
"description": "Prune a pnpm-lock.yaml", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"engines": { | ||
"node": ">=8.15" | ||
}, | ||
"files": [ | ||
"lib/" | ||
], | ||
"scripts": { | ||
"lint": "tslint -c tslint.json src/**/*.ts test/**/*.ts", | ||
"test": "pnpm run tsc && pnpm run lint && ts-node test --type-check", | ||
"tsc": "rimraf lib && tsc", | ||
"prepublishOnly": "pnpm run tsc" | ||
}, | ||
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/prune-lockfile", | ||
"keywords": [ | ||
"pnpm", | ||
"shrinkwrap", | ||
"lockfile" | ||
], | ||
"author": { | ||
"name": "Zoltan Kochan", | ||
"email": "z@kochan.io", | ||
"url": "https://www.kochan.io" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/pnpm/pnpm/issues" | ||
}, | ||
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/prune-lockfile#readme", | ||
"devDependencies": { | ||
"@pnpm/prune-lockfile": "link:", | ||
"@types/ramda": "0.25.39", | ||
"rimraf": "2.6.3", | ||
"tape": "4.11.0", | ||
"yaml-tag": "1.1.0" | ||
}, | ||
"dependencies": { | ||
"@pnpm/constants": "1.1.0", | ||
"@pnpm/lockfile-types": "1.1.0", | ||
"@pnpm/types": "3.2.0", | ||
"dependency-path": "3.0.8", | ||
"ramda": "0.26.1" | ||
} | ||
"name": "@pnpm/prune-lockfile", | ||
"version": "2.0.0", | ||
"description": "Prune a pnpm-lock.yaml", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"engines": { | ||
"node": ">=10" | ||
}, | ||
"files": [ | ||
"lib/" | ||
], | ||
"scripts": { | ||
"lint": "tslint -c tslint.json src/**/*.ts test/**/*.ts", | ||
"test": "pnpm run tsc && pnpm run lint && ts-node test --type-check", | ||
"tsc": "rimraf lib && tsc", | ||
"prepublishOnly": "pnpm run tsc" | ||
}, | ||
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/prune-lockfile", | ||
"keywords": [ | ||
"pnpm", | ||
"shrinkwrap", | ||
"lockfile" | ||
], | ||
"author": { | ||
"name": "Zoltan Kochan", | ||
"email": "z@kochan.io", | ||
"url": "https://www.kochan.io" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/pnpm/pnpm/issues" | ||
}, | ||
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/prune-lockfile#readme", | ||
"devDependencies": { | ||
"@pnpm/prune-lockfile": "link:", | ||
"@types/ramda": "0.26.21", | ||
"rimraf": "3.0.0", | ||
"tape": "4.11.0", | ||
"yaml-tag": "1.1.0" | ||
}, | ||
"dependencies": { | ||
"@pnpm/constants": "2.0.0", | ||
"@pnpm/lockfile-types": "1.1.0", | ||
"@pnpm/types": "4.0.0", | ||
"dependency-path": "4.0.0", | ||
"ramda": "0.26.1" | ||
} | ||
} |
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
185
10690
+ Added@pnpm/constants@2.0.0(transitive)
+ Added@pnpm/types@4.0.0(transitive)
+ Addeddependency-path@4.0.0(transitive)
+ Addedsemver@6.3.0(transitive)
- Removed@pnpm/constants@1.1.0(transitive)
- Removed@pnpm/types@3.2.0(transitive)
- Removeddependency-path@3.0.8(transitive)
- Removedsemver@6.2.0(transitive)
Updated@pnpm/constants@2.0.0
Updated@pnpm/types@4.0.0
Updateddependency-path@4.0.0