%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
const Arborist = require('../') const printTree = require('./lib/print-tree.js') const log = require('./lib/logging.js') const printDiff = diff => { const { depth } = require('treeverse') depth({ tree: diff, visit: d => { if (d.location === '') { return } switch (d.action) { case 'REMOVE': log.info('REMOVE', d.actual.location) break case 'ADD': log.info('ADD', d.ideal.location, d.ideal.resolved) break case 'CHANGE': log.info('CHANGE', d.actual.location, { from: d.actual.resolved, to: d.ideal.resolved, }) break } }, getChildren: d => d.children, }) } module.exports = (options, time) => { const arb = new Arborist(options) return arb .prune(options) .then(time) .then(async ({ timing, result: tree }) => { printTree(tree) if (options.dryRun) { printDiff(arb.diff) } if (tree.meta && options.save) { await tree.meta.save() } return `resolved ${tree.inventory.size} deps in ${timing.seconds}` }) }