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

@pnpm/lockfile-walker

Package Overview
Dependencies
Maintainers
3
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/lockfile-walker - npm Package Compare versions

Comparing version 1.0.3 to 2.0.0

8

lib/index.d.ts

@@ -27,2 +27,8 @@ import { Lockfile, PackageSnapshot } from '@pnpm/lockfile-types';

skipped?: Set<string>;
}): LockfileWalkerStep;
}): {
directDeps: {
alias: string;
relDepPath: string;
}[];
step: LockfileWalkerStep;
};

22

lib/index.js

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

const entryNodes = [];
const directDeps = [];
importerIds.forEach((importerId) => {

@@ -42,13 +43,18 @@ var _a, _b, _c, _d, _e, _f;

})
.map(([pkgName, reference]) => dp.refToRelative(reference, pkgName))
.filter((nodeId) => nodeId !== null)
.forEach((relDepPath) => {
.forEach(([pkgName, reference]) => {
const relDepPath = dp.refToRelative(reference, pkgName);
if (relDepPath === null)
return;
entryNodes.push(relDepPath);
directDeps.push({ alias: pkgName, relDepPath });
});
});
return step({
includeOptionalDependencies: ((_d = (_c = opts) === null || _c === void 0 ? void 0 : _c.include) === null || _d === void 0 ? void 0 : _d.optionalDependencies) !== false,
lockfile,
walked,
}, entryNodes);
return {
directDeps,
step: step({
includeOptionalDependencies: ((_d = (_c = opts) === null || _c === void 0 ? void 0 : _c.include) === null || _d === void 0 ? void 0 : _d.optionalDependencies) !== false,
lockfile,
walked,
}, entryNodes),
};
}

@@ -55,0 +61,0 @@ exports.default = lockfileWalker;

{
"name": "@pnpm/lockfile-walker",
"version": "1.0.3",
"version": "2.0.0",
"description": "Walk over all the dependencies in a lockfile",

@@ -44,4 +44,4 @@ "main": "lib/index.js",

"dependency-path": "4.0.4",
"ramda": "0.26.1"
"ramda": "0.27.0"
}
}
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