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

@pnpm/lockfile-utils

Package Overview
Dependencies
Maintainers
2
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/lockfile-utils - npm Package Compare versions

Comparing version 4.0.10 to 4.1.0

4

lib/satisfiesPackageManifest.d.ts
import { Lockfile } from '@pnpm/lockfile-types';
import { ProjectManifest } from '@pnpm/types';
declare const _default: (lockfile: Lockfile, pkg: ProjectManifest, importerId: string) => boolean;
declare const _default: (lockfile: Lockfile, pkg: ProjectManifest, importerId: string, opts?: {
autoInstallPeers?: boolean;
}) => boolean;
export default _default;

@@ -8,7 +8,21 @@ "use strict";

const equals_js_1 = __importDefault(require("ramda/src/equals.js"));
exports.default = (lockfile, pkg, importerId) => {
exports.default = (lockfile, pkg, importerId, opts) => {
const importer = lockfile.importers[importerId];
if (!importer)
return false;
if (!(0, equals_js_1.default)({ ...pkg.devDependencies, ...pkg.dependencies, ...pkg.optionalDependencies }, importer.specifiers)) {
let existingDeps = { ...pkg.devDependencies, ...pkg.dependencies, ...pkg.optionalDependencies };
if (opts?.autoInstallPeers) {
existingDeps = {
...pkg.peerDependencies,
...existingDeps,
};
pkg = {
...pkg,
dependencies: {
...pkg.peerDependencies,
...pkg.dependencies,
},
};
}
if (!(0, equals_js_1.default)(existingDeps, importer.specifiers)) {
return false;

@@ -15,0 +29,0 @@ }

{
"name": "@pnpm/lockfile-utils",
"version": "4.0.10",
"version": "4.1.0",
"description": "Utils for dealing with pnpm-lock.yaml",

@@ -27,6 +27,6 @@ "main": "lib/index.js",

"devDependencies": {
"@pnpm/lockfile-utils": "4.0.10",
"@types/js-yaml": "^4.0.0",
"@pnpm/lockfile-utils": "4.1.0",
"@types/js-yaml": "^4.0.5",
"@types/ramda": "0.28.14",
"tempy": "^1.0.0",
"tempy": "^1.0.1",
"write-yaml-file": "^4.2.0",

@@ -33,0 +33,0 @@ "yaml-tag": "1.1.0"

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