UNPKG

pnpm

Version:

Fast, disk space efficient package manager

26 lines 918 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const logger_1 = require("@pnpm/logger"); const list_1 = require("../list"); exports.default = async (pkgs, args, cmd, opts) => { const outputs = []; for (const pkg of pkgs) { try { const output = await list_1.render(args, Object.assign({}, opts, { prefix: pkg.path, alwaysPrintRootPackage: opts.depth === -1 }), cmd); if (!output) continue; outputs.push(output); } catch (err) { logger_1.default.info(err); err['prefix'] = pkg.path; // tslint:disable-line:no-string-literal throw err; } } if (outputs.length === 0) return; const joiner = opts.depth && opts.depth > -1 ? '\n\n' : '\n'; const allOutput = outputs.join(joiner); console.log(allOutput); }; //# sourceMappingURL=list.js.map