Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
186f0c8
Wrap command description in help (#1804)
shadowspawn Oct 1, 2022
ef88d70
Bump supported versions (#1808)
shadowspawn Oct 6, 2022
c897329
Update minimum version of node in README (#1815)
shadowspawn Nov 7, 2022
f3880f7
Update dependencies (#1826)
shadowspawn Nov 27, 2022
e0f6173
Merge remote-tracking branch 'origin/develop' into release/10.x
shadowspawn Nov 29, 2022
04fc0fd
Add Command.options to TypeScript (#1827)
shadowspawn Nov 29, 2022
5f3f004
*: update dev deps and make tweaks
VoltrexKeyva Dec 26, 2022
2bdd631
Merge branch 'master' into release/10.x
shadowspawn Jan 9, 2023
d0dac4c
Update CHANGELOG (#1840)
shadowspawn Jan 14, 2023
8b03ab7
10.0.0
shadowspawn Jan 14, 2023
869c3c0
Remove unused property (#1844)
shadowspawn Jan 22, 2023
f4c7349
Assume a string parameter to implies is name of boolean option. (#1854)
shadowspawn Mar 15, 2023
ee78d95
Link to Help class in configure-help.js and README.
raineorshine Mar 29, 2023
1aa5271
Describe help description wrapping
shadowspawn Apr 6, 2023
28928ed
Add parsing life cycle and hooks
shadowspawn Apr 6, 2023
5fbf83a
Add new documentation to README
shadowspawn Apr 7, 2023
321cd76
Could be multiple hooks, pluralise
shadowspawn Apr 7, 2023
33195f1
Update CHANGELOG and version for 10.0.1
shadowspawn Apr 15, 2023
fac9d8c
ci: add 20.x to `node-version`
abetomo Apr 19, 2023
63abdac
Have help command call help directly for subcommands, when possible (…
shadowspawn Apr 21, 2023
60958df
Add npm run-script to README (#1872)
shadowspawn Apr 30, 2023
2f07c2a
trim() input string of .arguments method
Felarn May 4, 2023
ffc7897
Deprecate import from commander/esm.mjs (#1887)
shadowspawn May 14, 2023
a4c96e6
Add separate type file for esm per TypeScript guidelines (#1886)
shadowspawn May 14, 2023
76d3d11
Update to minimum of node 16
shadowspawn May 27, 2023
752900d
Lint fixes for latest rules
shadowspawn May 27, 2023
1b8e82d
Update CHANGELOG for 11.0.0
shadowspawn May 27, 2023
1be6dfa
Adjust date
shadowspawn May 27, 2023
4ef19fa
Bump version
shadowspawn May 27, 2023
7fe7831
Add example of displaying custom usage in subcommand list (#1896)
shadowspawn Jun 26, 2023
d038570
Bump extra Commander version number in lock file (#1905)
shadowspawn Jul 11, 2023
681a7e4
Add missing checks for passThroughOptions
aweebit Aug 4, 2023
af67d11
Add tests for illegal passThroughOptions
aweebit Aug 4, 2023
1453bdf
Remove illegal passThroughOptions check deemed unnecessary
aweebit Aug 5, 2023
c60ce9d
Use weaker wording: "broken" instead of "illegal"
aweebit Aug 5, 2023
ec1942d
Unclutter error message in broken passThrough checks
aweebit Aug 5, 2023
ac8db3a
Refactor _checkForBrokenPassThrough() to make it instance-aware
aweebit Aug 5, 2023
3b31a1f
Fix grammar in docs
aweebit Aug 5, 2023
2dc7458
Fix indentation
abetomo Aug 7, 2023
dde6bb5
Watch for npm package updates with dependabot
abetomo Aug 7, 2023
2e2f139
Add note on inherited settings to docs
aweebit Jul 28, 2023
880b028
Improve docs about inherited settings
aweebit Jul 29, 2023
68a4276
Fix executableDir() return type
aweebit Aug 13, 2023
14fb529
Fix version() parameter type
aweebit Aug 3, 2023
401b0d6
Change initial variable values in test for better error messages
aweebit Aug 2, 2023
9c38a95
Do not use undefined long help option flag in legacy code
aweebit Aug 3, 2023
f3431d1
Revert "Fix version() parameter type"
aweebit Aug 12, 2023
c117172
Fix help for commands with executable handler & only a short help flag
aweebit Aug 13, 2023
ff0fd9e
Throw error on options-as-properties config after setting option values
aweebit Aug 2, 2023
6871e68
Add test for storeOptionsAsProperties() after setting option value
aweebit Aug 2, 2023
96f076d
Call storeOptionsAsProperties() with appropriate parameter value in test
aweebit Aug 11, 2023
1f90b11
Introduce _getCommandAndAncestors()
aweebit Aug 5, 2023
25ebead
Use _getCommandAndAncestors() consistently
aweebit Aug 5, 2023
f76a734
Use _getCommandAndAncestors() less aggressively
aweebit Aug 10, 2023
5740e59
Improve chain variable name (#1958)
shadowspawn Aug 22, 2023
95d54c3
Merge branch 'develop' into release/12.x
shadowspawn Aug 22, 2023
4c095d1
Refactor to wrap invalid argument (#1977)
shadowspawn Aug 24, 2023
f5413db
Types for version getter (#1982)
shadowspawn Aug 26, 2023
0d432ba
Make OptionValueSource a string with well-known values for auto-comp…
shadowspawn Aug 26, 2023
c7d39ca
Move Jest configuration to config file (#2005)
shadowspawn Sep 3, 2023
f570b08
Merge branch 'develop' into release/12.x
shadowspawn Sep 3, 2023
e85e05a
Rework option inline doc (#2009)
shadowspawn Sep 10, 2023
8edcfd9
Work-around bug in Jest (#2011)
shadowspawn Sep 10, 2023
7d23437
Add public Arguments property (#2010)
shadowspawn Sep 11, 2023
58820a4
Bump actions/checkout from 3 to 4 (#2012)
dependabot[bot] Sep 11, 2023
384f17b
Explicitly export factory functions (#2013)
shadowspawn Sep 12, 2023
14edbca
Revert factory function reexport (#2014)
shadowspawn Sep 12, 2023
26a34e6
Replace {any} with {*} as native JSDoc (#2015)
shadowspawn Sep 14, 2023
c876dee
Remove default export of global program (#2017)
shadowspawn Sep 15, 2023
37c9398
Switch @api private to official JSDoc (#2018)
shadowspawn Sep 16, 2023
744ee3f
Add more Option and Argument properties to typings (#2019)
shadowspawn Sep 21, 2023
9afbabd
Merge remote-tracking branch 'origin/develop' into release/12.x
shadowspawn Sep 23, 2023
96c6c25
Refactor type-checking setup (#1969)
shadowspawn Oct 4, 2023
a0ca1bd
Drop Node.js 16 (#2027)
shadowspawn Oct 7, 2023
5aaca0d
Exit with non-zero code when subprocess terminated by signal (#2023)
shadowspawn Oct 7, 2023
67c9180
Comment out new misuse check until a major version (#2026)
shadowspawn Oct 7, 2023
03dea00
Refactor headings (#2028)
shadowspawn Oct 7, 2023
72e6f7a
Merge branch 'develop' into release/12.x
shadowspawn Oct 7, 2023
591fc4b
Merge branch 'fix/grammar' of github.com:aweebit/commander.js into aw…
shadowspawn Oct 8, 2023
f1ae2db
Update CHANGELOG for 11.1.0 (#2025)
shadowspawn Oct 13, 2023
d90c59c
Restore extra sanity check when enabling storeOptionsAsProperties (#2…
shadowspawn Oct 13, 2023
1652a6c
Bump @types/node from 20.2.5 to 20.8.5 (#2034)
dependabot[bot] Oct 15, 2023
270bb12
Bump eslint from 8.41.0 to 8.51.0 (#2033)
dependabot[bot] Oct 15, 2023
1a328d2
Bump @typescript-eslint/parser from 5.59.7 to 5.62.0 (#2030)
dependabot[bot] Oct 15, 2023
f8bd5be
Bump eslint-config-standard from 17.0.0 to 17.1.0 (#2031)
dependabot[bot] Oct 15, 2023
7e6c663
Bump @typescript-eslint/eslint-plugin from 5.59.7 to 6.7.5 (#2032)
dependabot[bot] Oct 16, 2023
e56e9d0
Add explicit note to only call parse once (#2036)
shadowspawn Oct 16, 2023
695f419
Bump tsd from 0.28.1 to 0.29.0
dependabot[bot] Oct 16, 2023
d90e81e
Add migration tips for default import
shadowspawn Oct 15, 2023
f2e26c3
Bump @types/jest from 29.5.5 to 29.5.6 (#2047)
dependabot[bot] Oct 26, 2023
27edf5d
Bump eslint-plugin-n from 15.7.0 to 16.2.0 (#2044)
dependabot[bot] Oct 26, 2023
2bcf2ef
Bump @typescript-eslint/parser from 6.7.5 to 6.8.0 (#2043)
dependabot[bot] Oct 26, 2023
9322aa1
Bump eslint-plugin-jest from 27.4.2 to 27.4.3 (#2045)
dependabot[bot] Oct 26, 2023
fac24a9
Bump eslint from 8.51.0 to 8.52.0 (#2046)
dependabot[bot] Oct 28, 2023
84b44f4
Bump eslint-plugin-jest from 27.4.3 to 27.6.0 (#2049)
dependabot[bot] Oct 31, 2023
0e5f2e8
Bump @types/node from 20.8.6 to 20.8.9 (#2052)
dependabot[bot] Oct 31, 2023
63dd43a
Bump actions/setup-node from 3 to 4 (#2054)
dependabot[bot] Oct 31, 2023
4c842a8
Bump @typescript-eslint/eslint-plugin from 6.7.5 to 6.9.0 (#2053)
dependabot[bot] Oct 31, 2023
67c1e09
Bump eslint-plugin-import from 2.28.1 to 2.29.0 (#2051)
dependabot[bot] Oct 31, 2023
49f4766
Bump @typescript-eslint/parser from 6.8.0 to 6.9.0 (#2050)
dependabot[bot] Oct 31, 2023
7d08bc7
Change npm package checks in dependabot to monthly (#2057)
abetomo Nov 1, 2023
b96af40
Throw error when add option with clashing flags (#2055)
shadowspawn Nov 1, 2023
1d3dd47
Add check for overlapping command names or aliases (#2059)
shadowspawn Nov 4, 2023
b521b7a
Merge remote-tracking branch 'upstream/develop' into release/12.x
shadowspawn Nov 7, 2023
ce4d5f7
Merge branch 'release/12.x' of github.com:tj/commander.js into releas…
shadowspawn Nov 7, 2023
0e0fedb
Merge pull request #2065 from shadowspawn/feature/merge-develop-into-12
shadowspawn Nov 9, 2023
c6820a5
Update CHANGELOG for 12.0.0 (#2066)
shadowspawn Nov 10, 2023
4085ac7
Prepare for prerelease 12.0.0-0
shadowspawn Nov 11, 2023
db6b4d5
Bump required version in package-lock
shadowspawn Nov 11, 2023
18f921d
12.0.0-0
shadowspawn Nov 11, 2023
48f9fd9
Bump @types/jest from 29.5.6 to 29.5.7 (#2064)
dependabot[bot] Nov 11, 2023
902124d
Bump eslint from 8.52.0 to 8.53.0 (#2061)
dependabot[bot] Nov 11, 2023
c20a71d
Bump @types/node from 20.8.9 to 20.8.10 (#2063)
dependabot[bot] Nov 11, 2023
6b74d26
Bump @typescript-eslint/eslint-plugin from 6.9.0 to 6.9.1 (#2060)
dependabot[bot] Nov 11, 2023
2978456
Bump @typescript-eslint/parser from 6.9.0 to 6.9.1 (#2062)
dependabot[bot] Nov 11, 2023
883d326
Bump @types/jest from 29.5.7 to 29.5.8 (#2076)
dependabot[bot] Nov 14, 2023
f234c25
Bump @types/node from 20.8.10 to 20.9.0 (#2074)
dependabot[bot] Nov 14, 2023
c1b2526
Bump @typescript-eslint/eslint-plugin from 6.9.1 to 6.10.0 (#2072)
dependabot[bot] Nov 14, 2023
47a48c9
Bump @typescript-eslint/parser from 6.9.1 to 6.10.0 (#2073)
dependabot[bot] Nov 14, 2023
8eed8c2
Bump eslint-plugin-n from 16.2.0 to 16.3.1 (#2075)
dependabot[bot] Nov 14, 2023
9821f3a
Update url per npm advice (#2077)
shadowspawn Nov 15, 2023
066e381
Add Removed section to Deprecated (#2078)
shadowspawn Nov 15, 2023
02ba904
Bump eslint from 8.53.0 to 8.54.0 (#2082)
dependabot[bot] Nov 29, 2023
158c3c7
Bump eslint-config-standard-with-typescript from 39.1.1 to 40.0.0 (#2…
dependabot[bot] Nov 30, 2023
d8a0938
Bump @typescript-eslint/parser from 6.10.0 to 6.13.1 (#2091)
dependabot[bot] Dec 1, 2023
12a8b47
Rework exitOverride description (#2098)
shadowspawn Dec 12, 2023
32c05a8
Improve JSDoc (#2103)
shadowspawn Dec 16, 2023
47f740c
Bump github/codeql-action from 2 to 3 (#2108)
dependabot[bot] Dec 27, 2023
f686b2e
Bump @typescript-eslint/eslint-plugin from 6.10.0 to 6.18.0 (#2117)
dependabot[bot] Jan 10, 2024
1a41d3c
Bump typescript from 5.2.2 to 5.3.3 (#2100)
dependabot[bot] Jan 10, 2024
8cc042d
Bump @types/jest from 29.5.8 to 29.5.11 (#2102)
dependabot[bot] Jan 10, 2024
b0f789f
Bump eslint from 8.54.0 to 8.56.0 (#2107)
dependabot[bot] Jan 10, 2024
ff08a02
Refactor help command implementation to hold actual Command (#2087)
shadowspawn Jan 11, 2024
09244af
Refactor help option implementation to hold actual Option (#2006)
shadowspawn Jan 17, 2024
eed665d
Add 12.0.0-1 changes to CHANGELOG
shadowspawn Jan 19, 2024
90f3c8a
12.0.0-1
shadowspawn Jan 19, 2024
b53109b
Add links in CHANGELOG
shadowspawn Jan 19, 2024
4d832b2
Merge remote-tracking branch 'origin/develop' into release/12.x
shadowspawn Jan 27, 2024
3f44d29
Update dependencies preparing for release (#2132)
shadowspawn Jan 27, 2024
608eaf0
Update CHANGELOG for v12 (#2133)
shadowspawn Feb 3, 2024
e3192a1
Merge pull request #2140 from tj/release/12.x
shadowspawn Feb 3, 2024
83c3f4e
Bump version to 12.0.0
shadowspawn Feb 3, 2024
623c01b
Simplify security policy (#2150)
shadowspawn Feb 13, 2024
c8c81bf
Bump @types/node from 20.11.7 to 20.11.16 (#2141)
dependabot[bot] Feb 14, 2024
3b92536
Bump @typescript-eslint/parser from 6.19.1 to 6.20.0 (#2142)
dependabot[bot] Feb 14, 2024
1fd3b95
Bump @typescript-eslint/eslint-plugin from 6.19.1 to 6.20.0 (#2143)
dependabot[bot] Feb 14, 2024
dd2d8fb
Bump @types/jest from 29.5.11 to 29.5.12 (#2144)
dependabot[bot] Feb 14, 2024
41b12cf
Use standard import in examples (#2168)
shadowspawn Mar 12, 2024
6fc933e
ESLint changes preparing for Prettier (#2153)
shadowspawn Apr 4, 2024
1bdc749
Reformat code with Prettier (#2180)
shadowspawn Apr 5, 2024
f7b8475
Fix: Use `node`-prefixed requires for builtins (#2170)
sgammon Apr 6, 2024
b9ca390
Add auto-detection of args when node evaluating script code on comman…
shadowspawn Apr 7, 2024
a996782
Wrap all eslint configs in tseslint.config (#2182)
shadowspawn Apr 7, 2024
b95ea44
Fix some JSDoc lint issues (#2181)
shadowspawn Apr 7, 2024
27b1349
Bump typescript from 5.2.2 to 5.4.5 (#2189)
dependabot[bot] May 4, 2024
6c740e9
Bump eslint-plugin-jest from 27.9.0 to 28.3.0 (#2188)
dependabot[bot] May 4, 2024
4484e79
Bump @types/node from 20.8.9 to 20.12.7 (#2187)
dependabot[bot] May 4, 2024
f09d0b2
Bump @typescript-eslint/parser from 6.14.0 to 6.21.0 (#2179)
dependabot[bot] May 4, 2024
c749eb8
Bump tsd from 0.30.4 to 0.31.0 (#2172)
dependabot[bot] May 4, 2024
d3b48f7
Remove unimplemented fullDescription from TypeScript (#2191)
shadowspawn May 4, 2024
0e083f8
ci: add 22.x to node-version (#2192)
abetomo May 4, 2024
4a9b211
Prepare CHANGELOG for 12.1.0 (#2193)
shadowspawn May 18, 2024
970ecae
12.1.0
abetomo May 18, 2024
8deae37
disable subcommand execution
matias-la Jul 24, 2023
dcabf7f
disable storeOptionsAsProperties
matias-la Jul 24, 2023
6f8a402
fork into @exodus/ namespace
matias-la Jul 24, 2023
3380003
Merge branch 'exodus-fork' into exodus-fork-12
joshua-rogers-exodus Apr 4, 2025
2473202
chore: disable tests
joshua-rogers-exodus Apr 7, 2025
e036779
fixup: remove stray ',' character
joshua-rogers-exodus Apr 7, 2025
919b8c5
chore: update codeql-analysis.yml with exodus branch
joshua-rogers-exodus Apr 7, 2025
a207e00
chore: pin github actions to hashes, and update dependabot.yml branch
joshua-rogers-exodus Apr 7, 2025
c9a13cc
chore: cherry-pick 19fa79fa70eea8025b7ab21fa26f4a76f253eb28 from upst…
joshua-rogers-exodus Apr 7, 2025
f673293
chore: ignore unused variables
joshua-rogers-exodus Apr 7, 2025
5adfc8e
fixup: lint
joshua-rogers-exodus Apr 7, 2025
4fb751b
fixup: exodus-fork, not exodus-fork-12
joshua-rogers-exodus Apr 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 0 additions & 67 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ and can be deleted.

Please submit pull requests against the develop branch.

Follow the existing code style. Check the tests succeed, including lint.
Follow the existing code style. Check the tests succeed, including format and lint.
npm run test
npm run lint
npm run check

Don't update the CHANGELOG or command version number. That gets done by maintainers when preparing the release.

Expand Down
13 changes: 9 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
version: 2
updates:
- package-ecosystem: "github-actions"
target-branch: "develop"
directory: "/"
schedule:
- package-ecosystem: "npm"
target-branch: "exodus-fork"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
target-branch: "exodus-fork"
directory: "/"
schedule:
interval: "weekly"
12 changes: 6 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: "CodeQL"

on:
push:
branches: [ master, develop ]
branches: [ exodus-fork ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, develop ]
branches: [ exodus-fork ]
schedule:
- cron: '27 5 * * 6'

Expand All @@ -25,11 +25,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # @v4.2.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -40,7 +40,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -54,4 +54,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # @v4.2.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # @v4.3.0
with:
cache: 'npm'
node-version: ${{ matrix.node-version }}
Expand All @@ -27,5 +27,6 @@ jobs:
run: npm ci
- name: npm test
run: npm test
- name: npm run lint
run: npm run lint
- name: npm run check:lint
# switch to full check when have run prettier on all files
run: npm run check:lint
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# exclude everything, and opt-in to types we want to format
**.*
# add the filetypes we want to format
!**.js
!**.mjs
!**.cjs
!**.ts
!**.mts
!**.cts
!**.json
12 changes: 12 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const config = {
// plugins: ['prettier-plugin-jsdoc'],
singleQuote: true,
overrides: [
{
files: ['tsconfig*.json'],
options: { parser: 'jsonc' },
},
],
};

module.exports = config;
175 changes: 175 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,140 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
<!-- markdownlint-disable MD024 -->
<!-- markdownlint-disable MD004 -->

## [12.1.0] (2024-05-18)

### Added

- auto-detect special node flags `node --eval` and `node --print` when call `.parse()` with no arguments ([#2164])
-
### Changed

- prefix require of Node.js core modules with `node:` ([#2170])
- format source files with Prettier ([#2180])
- switch from StandardJS to directly calling ESLint for linting ([#2153])
- extend security support for previous major version of Commander ([#2150])

### Removed

- removed unimplemented Option.fullDescription from TypeScript definition ([#2191])

## [12.0.0] (2024-02-03)

### Added

- `.addHelpOption()` as another way of configuring built-in help option ([#2006])
- `.helpCommand()` for configuring built-in help command ([#2087])

### Fixed

- *Breaking:* use non-zero exit code when spawned executable subcommand terminates due to a signal ([#2023])
- *Breaking:* check `passThroughOptions` constraints when using `.addCommand` and throw if parent command does not have `.enablePositionalOptions()` enabled ([#1937])

### Changed

- *Breaking:* Commander 12 requires Node.js v18 or higher ([#2027])
- *Breaking:* throw an error if add an option with a flag which is already in use ([#2055])
- *Breaking:* throw an error if add a command with name or alias which is already in use ([#2059])
- *Breaking:* throw error when calling `.storeOptionsAsProperties()` after setting an option value ([#1928])
- replace non-standard JSDoc of `@api private` with documented `@private` ([#1949])
- `.addHelpCommand()` now takes a Command (passing string or boolean still works as before but deprecated) ([#2087])
- refactor internal implementation of built-in help option ([#2006])
- refactor internal implementation of built-in help command ([#2087])

### Deprecated

- `.addHelpCommand()` passing string or boolean (use `.helpCommand()` or pass a Command) ([#2087])

### Removed

- *Breaking:* removed default export of a global Command instance from CommonJS (use the named `program` export instead) ([#2017])

### Migration Tips

**global program**

If you are using the [deprecated](./docs/deprecated.md#default-import-of-global-command-object) default import of the global Command object, you need to switch to using a named import (or create a new `Command`).

```js
// const program = require('commander');
const { program } = require('commander');
```

**option and command clashes**

A couple of configuration problems now throw an error, which will pick up issues in existing programs:

- adding an option which uses the same flag as a previous option
- adding a command which uses the same name or alias as a previous command

## [12.0.0-1] (2024-01-20)

(Released in 12.0.0)

## [12.0.0-0] (2023-11-11)

(Released in 12.0.0)

## [11.1.0] (2023-10-13)

### Fixed

- TypeScript: update `OptionValueSource` to allow any string, to match supported use of custom sources ([#1983])
- TypeScript: add that `Command.version()` can also be used as getter ([#1982])
- TypeScript: add null return type to `Commands.executableDir()`, for when not configured ([#1965])
- subcommands with an executable handler and only a short help flag are now handled correctly by the parent's help command ([#1930])

### Added

- `registeredArguments` property on `Command` with the array of defined `Argument` (like `Command.options` for `Option`) ([#2010])
- TypeScript declarations for Option properties: `envVar`, `presetArg` ([#2019])
- TypeScript declarations for Argument properties: `argChoices`, `defaultValue`, `defaultValueDescription` ([#2019])
- example file which shows how to configure help to display any custom usage in the list of subcommands ([#1896])

### Changed

- (developer) refactor TypeScript configs for multiple use-cases, and enable checks in JavaScript files in supporting editors ([#1969])

### Deprecated

- `Command._args` was private anyway, but now available as `registeredArguments` ([#2010])

## [11.0.0] (2023-06-16)

### Fixed

- help command works when help option is disabled ([#1864])

### Changed

- leading and trailing spaces are now ignored by the .arguments() method ([#1874])
- refine "types" exports for ESM to follow TypeScript guidelines ([#1886])
- *Breaking:* Commander 11 requires Node.js v16 or higher

## [10.0.1] (2023-04-15)

### Added

- improvements to documentation ([#1858], [#1859], [#1860])

### Fixed

- remove unused `Option.optionFlags` property from TypeScript definition ([#1844])

### Changed

- assume boolean option intended if caller passes string instead of hash to `.implies()` ([#1854])

## [10.0.0] (2023-01-13)

### Added

- wrap command description in help ([#1804])

### Changed

- *Breaking:* Commander 10 requires Node.js v14 or higher

## [9.5.0] (2023-01-07)

### Added
Expand Down Expand Up @@ -1116,8 +1250,41 @@ program
[#1767]: https://github.com/tj/commander.js/pull/1767
[#1794]: https://github.com/tj/commander.js/pull/1794
[#1795]: https://github.com/tj/commander.js/pull/1795
[#1804]: https://github.com/tj/commander.js/pull/1804
[#1832]: https://github.com/tj/commander.js/pull/1832
[#1828]: https://github.com/tj/commander.js/pull/1828
[#1844]: https://github.com/tj/commander.js/pull/1844
[#1854]: https://github.com/tj/commander.js/pull/1854
[#1858]: https://github.com/tj/commander.js/pull/1858
[#1859]: https://github.com/tj/commander.js/pull/1859
[#1860]: https://github.com/tj/commander.js/pull/1860
[#1864]: https://github.com/tj/commander.js/pull/1864
[#1874]: https://github.com/tj/commander.js/pull/1874
[#1886]: https://github.com/tj/commander.js/pull/1886
[#1896]: https://github.com/tj/commander.js/pull/1896
[#1928]: https://github.com/tj/commander.js/pull/1928
[#1930]: https://github.com/tj/commander.js/pull/1930
[#1937]: https://github.com/tj/commander.js/pull/1937
[#1949]: https://github.com/tj/commander.js/pull/1949
[#1965]: https://github.com/tj/commander.js/pull/1965
[#1969]: https://github.com/tj/commander.js/pull/1969
[#1982]: https://github.com/tj/commander.js/pull/1982
[#1983]: https://github.com/tj/commander.js/pull/1983
[#2006]: https://github.com/tj/commander.js/pull/2006
[#2010]: https://github.com/tj/commander.js/pull/2010
[#2017]: https://github.com/tj/commander.js/pull/2017
[#2019]: https://github.com/tj/commander.js/pull/2019
[#2023]: https://github.com/tj/commander.js/pull/2023
[#2027]: https://github.com/tj/commander.js/pull/2027
[#2055]: https://github.com/tj/commander.js/pull/2055
[#2059]: https://github.com/tj/commander.js/pull/2059
[#2087]: https://github.com/tj/commander.js/pull/2087
[#2150]: https://github.com/tj/commander.js/pull/2150
[#2153]: https://github.com/tj/commander.js/pull/2153
[#2164]: https://github.com/tj/commander.js/pull/2164
[#2170]: https://github.com/tj/commander.js/pull/2170
[#2180]: https://github.com/tj/commander.js/pull/2180
[#2191]: https://github.com/tj/commander.js/pull/2191

<!-- Referenced in 5.x -->
[#1]: https://github.com/tj/commander.js/issues/1
Expand Down Expand Up @@ -1197,6 +1364,14 @@ program
[#1028]: https://github.com/tj/commander.js/pull/1028

[Unreleased]: https://github.com/tj/commander.js/compare/master...develop
[12.0.0]: https://github.com/tj/commander.js/compare/v12.0.0...v12.1.0
[12.0.0]: https://github.com/tj/commander.js/compare/v11.1.0...v12.0.0
[12.0.0-1]: https://github.com/tj/commander.js/compare/v12.0.0-0...v12.0.0-1
[12.0.0-0]: https://github.com/tj/commander.js/compare/v11.1.0...v12.0.0-0
[11.1.0]: https://github.com/tj/commander.js/compare/v11.0.0...v11.1.0
[11.0.0]: https://github.com/tj/commander.js/compare/v10.0.1...v11.0.0
[10.0.1]: https://github.com/tj/commander.js/compare/v10.0.0...v10.0.1
[10.0.0]: https://github.com/tj/commander.js/compare/v9.5.0...v10.0.0
[9.5.0]: https://github.com/tj/commander.js/compare/v9.4.1...v9.5.0
[9.4.1]: https://github.com/tj/commander.js/compare/v9.4.0...v9.4.1
[9.4.0]: https://github.com/tj/commander.js/compare/v9.3.0...v9.4.0
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ or after six months otherwise.

Pull Requests will be considered. Please submit pull requests against the develop branch.

Follow the existing code style. Check the tests succeed, including lint.
Follow the existing code style. Check the tests succeed, including format and lint.

- `npm run test`
- `npm run lint`
- `npm run check`

Don't update the CHANGELOG or command version number. That gets done by maintainers when preparing the release.

Expand Down
Loading