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

@pnpm/list

Package Overview
Dependencies
Maintainers
2
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/list - npm Package Compare versions

Comparing version 6.3.3 to 7.0.0

3

lib/getPkgInfo.js

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

async function getPkgInfo(pkg) {
var _a;
let manifest;

@@ -28,3 +27,3 @@ try {

homepage: manifest.homepage,
repository: (_a = (manifest.repository && (typeof manifest.repository === 'string' ? manifest.repository : manifest.repository.url))) !== null && _a !== void 0 ? _a : undefined,
repository: (manifest.repository && (typeof manifest.repository === 'string' ? manifest.repository : manifest.repository.url)) ?? undefined,
};

@@ -31,0 +30,0 @@ }

@@ -26,4 +26,4 @@ "use strict";

depth: opts.depth,
include: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.include,
lockfileDir: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.lockfileDir,
include: maybeOpts?.include,
lockfileDir: maybeOpts?.lockfileDir,
registries: opts.registries,

@@ -60,4 +60,4 @@ search,

depth: opts.depth,
include: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.include,
lockfileDir: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.lockfileDir,
include: maybeOpts?.include,
lockfileDir: maybeOpts?.lockfileDir,
registries: opts.registries,

@@ -64,0 +64,0 @@ }))

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

const jsonArr = await Promise.all(pkgs.map(async (pkg) => {
var _a;
const jsonObj = {

@@ -23,3 +22,3 @@ name: pkg.name,

for (const dependenciesField of [...types_1.DEPENDENCIES_FIELDS.sort(), 'unsavedDependencies']) {
if ((_a = pkg[dependenciesField]) === null || _a === void 0 ? void 0 : _a.length) {
if (pkg[dependenciesField]?.length) {
jsonObj[dependenciesField] = await toJsonResult(pkg[dependenciesField], { long: opts.long });

@@ -36,4 +35,3 @@ }

await Promise.all(sortPackages(entryNodes).map(async (node) => {
var _a;
const subDependencies = await toJsonResult((_a = node.dependencies) !== null && _a !== void 0 ? _a : [], opts);
const subDependencies = await toJsonResult(node.dependencies ?? [], opts);
const dep = opts.long

@@ -40,0 +38,0 @@ ? await (0, getPkgInfo_1.default)(node)

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

function renderParseableForPackage(pkg, opts) {
var _a, _b, _c, _d;
const pkgs = sortPackages(flatten([
...((_a = pkg.optionalDependencies) !== null && _a !== void 0 ? _a : []),
...((_b = pkg.dependencies) !== null && _b !== void 0 ? _b : []),
...((_c = pkg.devDependencies) !== null && _c !== void 0 ? _c : []),
...((_d = pkg.unsavedDependencies) !== null && _d !== void 0 ? _d : []),
...(pkg.optionalDependencies ?? []),
...(pkg.dependencies ?? []),
...(pkg.devDependencies ?? []),
...(pkg.unsavedDependencies ?? []),
]));

@@ -46,7 +45,6 @@ if (!opts.alwaysPrintRootPackage && (pkgs.length === 0))

function flatten(nodes) {
var _a;
let packages = [];
for (const node of nodes) {
packages.push(node);
if ((_a = node.dependencies) === null || _a === void 0 ? void 0 : _a.length) {
if (node.dependencies?.length) {
packages = packages.concat(flatten(node.dependencies));

@@ -53,0 +51,0 @@ }

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

async function renderTreeForPackage(pkg, opts) {
var _a, _b, _c, _d, _e;
if (!opts.alwaysPrintRootPackage &&
!((_a = pkg.dependencies) === null || _a === void 0 ? void 0 : _a.length) &&
!((_b = pkg.devDependencies) === null || _b === void 0 ? void 0 : _b.length) &&
!((_c = pkg.optionalDependencies) === null || _c === void 0 ? void 0 : _c.length) &&
(!opts.showExtraneous || !((_d = pkg.unsavedDependencies) === null || _d === void 0 ? void 0 : _d.length)))
!pkg.dependencies?.length &&
!pkg.devDependencies?.length &&
!pkg.optionalDependencies?.length &&
(!opts.showExtraneous || !pkg.unsavedDependencies?.length))
return '';

@@ -58,3 +57,3 @@ let label = '';

for (const dependenciesField of dependenciesFields) {
if ((_e = pkg[dependenciesField]) === null || _e === void 0 ? void 0 : _e.length) {
if (pkg[dependenciesField]?.length) {
const depsLabel = chalk_1.default.cyanBright(dependenciesField !== 'unsavedDependencies'

@@ -82,4 +81,3 @@ ? `${dependenciesField}:`

return Promise.all(sortPackages(entryNodes).map(async (node) => {
var _a;
const nodes = await toArchyTree(getPkgColor, (_a = node.dependencies) !== null && _a !== void 0 ? _a : [], opts);
const nodes = await toArchyTree(getPkgColor, node.dependencies ?? [], opts);
if (opts.long) {

@@ -86,0 +84,0 @@ const pkg = await (0, getPkgInfo_1.default)(node);

{
"name": "@pnpm/list",
"version": "6.3.3",
"version": "7.0.0",
"description": "List installed packages in a symlinked `node_modules`",

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

"keywords": [
"pnpm6",
"pnpm7",
"pnpm",

@@ -20,3 +20,3 @@ "list",

"engines": {
"node": ">=12.17"
"node": ">=14.19"
},

@@ -29,6 +29,6 @@ "license": "MIT",

"dependencies": {
"@pnpm/matcher": "2.0.0",
"@pnpm/read-package-json": "5.0.12",
"@pnpm/read-project-manifest": "2.0.13",
"@pnpm/types": "7.10.0",
"@pnpm/matcher": "3.0.0",
"@pnpm/read-package-json": "6.0.0",
"@pnpm/read-project-manifest": "3.0.0",
"@pnpm/types": "8.0.0",
"@zkochan/npm-package-arg": "^2.0.1",

@@ -38,3 +38,3 @@ "archy": "^1.0.0",

"cli-columns": "^4.0.0",
"dependencies-hierarchy": "10.0.25",
"dependencies-hierarchy": "11.0.0",
"p-limit": "^3.1.0",

@@ -45,3 +45,3 @@ "ramda": "^0.27.1",

"devDependencies": {
"@pnpm/list": "6.3.3",
"@pnpm/list": "7.0.0",
"@pnpm/logger": "^4.0.0",

@@ -53,2 +53,5 @@ "@types/archy": "0.0.31",

"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"scripts": {

@@ -55,0 +58,0 @@ "fix": "tslint -c tslint.json src/**/*.ts test/**/*.ts --fix",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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