UNPKG

syncpack

Version:

Consistent dependency versions in large JavaScript Monorepos

31 lines (30 loc) 1.01 kB
import chalk from 'chalk-template'; import { DEFAULT_CONFIG } from './constants.js'; export const option = { config: ['-c, --config <path>', 'path to a syncpack config file'], filter: [ '-f, --filter [pattern]', chalk `only include dependencies whose {yellow name} matches this regex`, ], indent: [ '-i, --indent [value]', `override indentation. defaults to "${DEFAULT_CONFIG.indent}"`, ], source: [ '-s, --source [pattern]', 'glob pattern for package.json files to read from', collect, [], ], specs: [ '-S, --specs <names>', chalk `only include dependencies whose version specifier match these types (eg. {yellow specs=latest,range,workspace-protocol})`, ], types: [ '-t, --types <names>', chalk `only include dependencies matching these types (eg. {yellow types=dev,prod,myCustomType})`, ], }; function collect(value, previous) { return previous.concat([value]); }