command.js 767 B

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. /**
  3. * @see https://github.com/yargs/yargs/blob/master/docs/advanced.md#providing-a-command-module
  4. */
  5. exports.command = "diff [pkgName]";
  6. exports.describe = "Diff all packages or a single package since the last release";
  7. exports.builder = (yargs) =>
  8. yargs
  9. .positional("pkgName", {
  10. describe: "An optional package name to filter the diff output",
  11. })
  12. .options({
  13. "ignore-changes": {
  14. group: "Command Options:",
  15. describe: "Ignore changes in files matched by glob(s).",
  16. type: "array",
  17. },
  18. })
  19. .epilogue(
  20. "When ignoreChanges is configured in lerna.json, pass --no-ignore-changes to include ignored files."
  21. );
  22. exports.handler = function handler(argv) {
  23. return require(".")(argv);
  24. };