Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/prune-lockfile

Package Overview
Dependencies
Maintainers
3
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/prune-lockfile - npm Package Compare versions

Comparing version 1.1.2 to 2.0.0

4

lib/index.d.ts
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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc