UNPKG

npm-ws-tools

Version:

Command line tools for working with npm workspaces. Includes version bumping and dependencies version update

24 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const commander_1 = require("commander"); const Package_js_1 = require("./Package.js"); const bump_js_1 = require("./bump.js"); const utils_js_1 = require("./utils.js"); const program = new commander_1.Command(); program.version((0, utils_js_1.getVersion)()); program.option('-x, --exclude [projectsPattern}]', 'A glob or project path to exclude'); program.command("bump [version]") .description("Bump the version of all selected projects") .action((version, options) => { const root = Package_js_1.Package.findClosest().loadRoot().excludeProjects(options.exclude); (0, bump_js_1.bumpVersions)(root, version); }); program.command("dep <name> <version>") .description("Update the named dependency version. Example `dep @my/package ^123`") .action((name, version, options) => { const root = Package_js_1.Package.findClosest().loadRoot().excludeProjects(options.exclude); console.log(`Updating dependency ${name} to version ${version}`); (0, bump_js_1.updateDependencies)(root, { [name]: version }); }); program.parse(); //# sourceMappingURL=index.js.map