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

@pnpm/prune-lockfile

Package Overview
Dependencies
Maintainers
2
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 6.0.2 to 6.1.0

9

lib/index.d.ts
import { type Lockfile } from '@pnpm/lockfile-types';
import { type PackageManifest } from '@pnpm/types';
import { type DepPath, type PackageManifest } from '@pnpm/types';
export * from '@pnpm/lockfile-types';
type DependenciesGraph = Record<DepPath, {
optional?: boolean;
}>;
export declare function pruneSharedLockfile(lockfile: Lockfile, opts?: {
dependenciesGraph?: DependenciesGraph;
warn?: (msg: string) => void;
}): Lockfile;
export declare function pruneLockfile(lockfile: Lockfile, pkg: PackageManifest, importerId: string, opts?: {
export declare function pruneLockfile(lockfile: Lockfile, pkg: PackageManifest, importerId: string, opts: {
warn?: (msg: string) => void;
dependenciesGraph?: DependenciesGraph;
}): Lockfile;

@@ -35,2 +35,3 @@ "use strict";

warn: opts?.warn ?? ((msg) => undefined),
dependenciesGraph: opts?.dependenciesGraph,
});

@@ -123,2 +124,3 @@ const prunedLockfile = {

warn: opts.warn,
dependenciesGraph: opts.dependenciesGraph,
};

@@ -159,2 +161,5 @@ copyDependencySubGraph(ctx, opts.devDepPaths, {

depLockfile.optional = true;
if (ctx.dependenciesGraph?.[depPath]) {
ctx.dependenciesGraph[depPath].optional = true;
}
}

@@ -164,2 +169,5 @@ else {

delete depLockfile.optional;
if (ctx.dependenciesGraph?.[depPath]) {
ctx.dependenciesGraph[depPath].optional = false;
}
}

@@ -166,0 +174,0 @@ const newDependencies = resolvedDepsToDepPaths(depLockfile.dependencies ?? {});

{
"name": "@pnpm/prune-lockfile",
"version": "6.0.2",
"version": "6.1.0",
"description": "Prune a pnpm-lock.yaml",

@@ -29,3 +29,3 @@ "main": "lib/index.js",

"yaml-tag": "1.1.0",
"@pnpm/prune-lockfile": "6.0.2"
"@pnpm/prune-lockfile": "6.1.0"
},

@@ -32,0 +32,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

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