forked from lerna/lerna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
command.js
50 lines (42 loc) · 1.57 KB
/
command.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"use strict";
const listable = require("@lerna/listable");
/**
* @see https://github.com/yargs/yargs/blob/master/docs/advanced.md#providing-a-command-module
*/
exports.command = "changed";
exports.aliases = ["updated"];
exports.describe = "List local packages that have changed since the last tagged release";
exports.builder = (yargs) => {
const opts = {
// only the relevant bits from `lerna version`
"conventional-commits": {
// fallback for overzealous --conventional-graduate
hidden: true,
type: "boolean",
},
"conventional-graduate": {
describe: "Detect currently prereleased packages that would change to a non-prerelease version.",
// type must remain ambiguous because it is overloaded (boolean _or_ string _or_ array)
},
"force-publish": {
describe: "Always include targeted packages when detecting changed packages, skipping default logic.",
// type must remain ambiguous because it is overloaded (boolean _or_ string _or_ array)
},
"ignore-changes": {
describe: [
"Ignore changes in files matched by glob(s) when detecting changed packages.",
"Pass --no-ignore-changes to completely disable.",
].join("\n"),
type: "array",
},
"include-merged-tags": {
describe: "Include tags from merged branches when detecting changed packages.",
type: "boolean",
},
};
yargs.options(opts).group(Object.keys(opts), "Command Options:");
return listable.options(yargs, "Output Options:");
};
exports.handler = function handler(argv) {
return require(".")(argv);
};