@@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8
8
<!-- markdownlint-disable MD024 -->
9
9
<!-- markdownlint-disable MD004 -->
10
10
11
+ ## [ 13.1.0] (2025-01-21)
12
+
13
+ ### Added
14
+
15
+ - support a pair of long option flags to allow a memorable shortened flag, like ` .option('--ws, --workspace') ` ([ #2312 ] )
16
+
11
17
## [ 13.0.0] (2024-12-30)
12
18
13
19
### Added
@@ -74,6 +80,27 @@ program.action((options) => {
74
80
});
75
81
```
76
82
83
+ ** Stricter option flag parsing**
84
+
85
+ Commander now throws an error for option flag combinations that are not supported.
86
+ In particular, a short flag with multiple characters is now an error.
87
+
88
+ ``` js
89
+ program .option (' -ws, --workspace' ); // throws error
90
+ ```
91
+
92
+ A short option has a single character:
93
+
94
+ ``` js
95
+ program .option (' -w, --workspace' );
96
+ ```
97
+
98
+ Or from Commander 13.1 you can have an extra long flag instead of a short flag to allow a more memorable shortcut for the full name:
99
+
100
+ ``` js
101
+ program .option (' --ws, --workspace' );
102
+ ```
103
+
77
104
## [ 13.0.0-0] (2024-12-07)
78
105
79
106
(Released in 13.0.0)
@@ -1360,6 +1387,7 @@ program
1360
1387
[ #2251 ] : https://github.com/tj/commander.js/pull/2251
1361
1388
[ #2270 ] : https://github.com/tj/commander.js/pull/2270
1362
1389
[ #2299 ] : https://github.com/tj/commander.js/pull/2299
1390
+ [ #2312 ] : https://github.com/tj/commander.js/pull/2312
1363
1391
1364
1392
1365
1393
<!-- Referenced in 5.x -->
@@ -1440,6 +1468,7 @@ program
1440
1468
[ #1028 ] : https://github.com/tj/commander.js/pull/1028
1441
1469
1442
1470
[ Unreleased ] : https://github.com/tj/commander.js/compare/master...develop
1471
+ [ 13.1.0 ] : https://github.com/tj/commander.js/compare/v13.0.0...v13.1.0
1443
1472
[ 13.0.0 ] : https://github.com/tj/commander.js/compare/v12.1.0...v13.0.0
1444
1473
[ 13.0.0-0 ] : https://github.com/tj/commander.js/compare/v12.1.0...v13.0.0-0
1445
1474
[ 12.1.0 ] : https://github.com/tj/commander.js/compare/v12.0.0...v12.1.0
0 commit comments