Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tj/commander.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 30535a67a7d1f3809231603bc4dc0ba873ae85ef
Choose a base ref
...
head repository: tj/commander.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6b8499b24f4f6498ad630c50c8a00c9579a8536b
Choose a head ref
Loading
Showing with 3,436 additions and 354 deletions.
  1. +8 −0 .eslintrc.json
  2. +9 −6 .travis.yml
  3. +121 −0 History.md → CHANGELOG.md
  4. +0 −7 Makefile
  5. +116 −39 Readme.md
  6. +20 −28 Readme_zh-CN.md
  7. +3 −3 examples/custom-help
  8. +229 −142 index.js
  9. +2,240 −54 package-lock.json
  10. +17 −8 package.json
  11. +3 −0 test/fixtures-ts/pm-install.ts
  12. +8 −0 test/fixtures-ts/pm.ts
  13. +1 −0 test/fixtures/another-dir/pm
  14. +1 −0 test/fixtures/other-dir/pm
  15. +0 −16 test/run
  16. +22 −0 test/run.js
  17. +20 −0 test/test.command.action.emptyOption.js
  18. +2 −2 test/test.command.allowUnknownOption.js
  19. +7 −0 test/test.command.executableSubcommand.js
  20. +10 −0 test/test.command.executableSubcommand.tsnode.js
  21. +7 −0 test/test.command.executableSubcommandAlias.js
  22. +7 −0 test/test.command.executableSubcommandDefault.js
  23. +14 −0 test/test.command.failOnSameAlias.js
  24. +5 −3 test/test.command.help.js
  25. +21 −0 test/test.command.helpInformation.js
  26. +3 −3 test/test.command.name.js
  27. +1 −1 test/test.command.name.set.js
  28. +13 −8 test/test.command.nohelp.js
  29. +15 −0 test/test.commandAsterisk.action.js
  30. +1 −1 test/test.literal.args.js
  31. +13 −0 test/test.noCommand.action.js
  32. +1 −1 test/test.options.args.optional.js
  33. +2 −2 test/test.options.args.required.js
  34. +2 −2 test/test.options.bool.js
  35. +1 −1 test/test.options.bool.no.js
  36. +2 −2 test/test.options.bool.small.combined.js
  37. +2 −2 test/test.options.bool.small.js
  38. +12 −11 test/test.options.commands.js
  39. +6 −6 test/test.options.func.js
  40. +1 −1 test/test.options.large-only.js
  41. +20 −0 test/test.options.version.custom.js
  42. +20 −0 test/test.options.version.js
  43. +1 −5 test/test.variadic.args.js
  44. +20 −0 tsconfig.json
  45. +99 −0 typings/commander-tests.ts
  46. +310 −0 typings/index.d.ts
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "standard",
"rules": {
"one-var": "off",
"semi": ["error", "always"],
"space-before-function-paren": ["error", "never"]
}
}
15 changes: 9 additions & 6 deletions .travis.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
language: node_js
sudo: false
node_js:
- "4"
- "5"
- "6"
- "7"
- "8"
- "node"
- "6"
- "8"
- "10"
cache:
directories:
- "node_modules"
script:
- npm run lint
- npm test
121 changes: 121 additions & 0 deletions History.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,124 @@
2.20.3 / 2019-10-11
==================

* Support Node.js 0.10 (Revert #1059)
* Ran "npm unpublish commander@2.20.2". There is no 2.20.2.

2.20.1 / 2019-09-29
==================

* Improve executable subcommand tracking
* Update dev dependencies

2.20.0 / 2019-04-02
==================

* fix: resolve symbolic links completely when hunting for subcommands (#935)
* Update index.d.ts (#930)
* Update Readme.md (#924)
* Remove --save option as it isn't required anymore (#918)
* Add link to the license file (#900)
* Added example of receiving args from options (#858)
* Added missing semicolon (#882)
* Add extension to .eslintrc (#876)

2.19.0 / 2018-10-02
==================

* Removed newline after Options and Commands headers (#864)
* Bugfix - Error output (#862)
* Fix to change default value to string (#856)

2.18.0 / 2018-09-07
==================

* Standardize help output (#853)
* chmod 644 travis.yml (#851)
* add support for execute typescript subcommand via ts-node (#849)

2.17.1 / 2018-08-07
==================

* Fix bug in command emit (#844)

2.17.0 / 2018-08-03
==================

* fixed newline output after help information (#833)
* Fix to emit the action even without command (#778)
* npm update (#823)

2.16.0 / 2018-06-29
==================

* Remove Makefile and `test/run` (#821)
* Make 'npm test' run on Windows (#820)
* Add badge to display install size (#807)
* chore: cache node_modules (#814)
* chore: remove Node.js 4 (EOL), add Node.js 10 (#813)
* fixed typo in readme (#812)
* Fix types (#804)
* Update eslint to resolve vulnerabilities in lodash (#799)
* updated readme with custom event listeners. (#791)
* fix tests (#794)

2.15.0 / 2018-03-07
==================

* Update downloads badge to point to graph of downloads over time instead of duplicating link to npm
* Arguments description

2.14.1 / 2018-02-07
==================

* Fix typing of help function

2.14.0 / 2018-02-05
==================

* only register the option:version event once
* Fixes issue #727: Passing empty string for option on command is set to undefined
* enable eqeqeq rule
* resolves #754 add linter configuration to project
* resolves #560 respect custom name for version option
* document how to override the version flag
* document using options per command

2.13.0 / 2018-01-09
==================

* Do not print default for --no-
* remove trailing spaces in command help
* Update CI's Node.js to LTS and latest version
* typedefs: Command and Option types added to commander namespace

2.12.2 / 2017-11-28
==================

* fix: typings are not shipped

2.12.1 / 2017-11-23
==================

* Move @types/node to dev dependency

2.12.0 / 2017-11-22
==================

* add attributeName() method to Option objects
* Documentation updated for options with --no prefix
* typings: `outputHelp` takes a string as the first parameter
* typings: use overloads
* feat(typings): update to match js api
* Print default value in option help
* Fix translation error
* Fail when using same command and alias (#491)
* feat(typings): add help callback
* fix bug when description is add after command with options (#662)
* Format js code
* Rename History.md to CHANGELOG.md (#668)
* feat(typings): add typings to support TypeScript (#646)
* use current node

2.11.0 / 2017-07-03
==================
7 changes: 0 additions & 7 deletions Makefile

This file was deleted.

Loading