2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
- The format is based on [ Keep a Changelog] ( http ://keepachangelog.com/en/1.0 .0/)
5
+ The format is based on [ Keep a Changelog] ( https ://keepachangelog.com/en/1.1 .0/) ,
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
7
7
8
8
<!-- markdownlint-disable MD024 -->
9
9
<!-- markdownlint-disable MD004 -->
10
10
11
- ## [ 13.x] (date goes here)
11
+ ## [ 13.0.0-1] (2024-12-08)
12
+
13
+ ### Added
14
+
15
+ - style routines like ` styleTitle() ` to add color to help using ` .configureHelp() ` or Help subclass ([ #2251 ] )
16
+ - color related support in ` .configureOutput() ` for ` getOutHasColors() ` , ` getErrHasColors() ` , and ` stripColor() ` ([ #2251 ] )
17
+ - Help property for ` minWidthToWrap ` ([ #2251 ] )
18
+ - Help methods for ` displayWidth() ` , ` boxWrap() ` , ` preformatted() ` et al ([ #2251 ] )
12
19
13
20
### Changed
14
21
15
- - * Breaking* : excess command-arguments cause an error by default
22
+ - * Breaking* : excess command-arguments cause an error by default, see migration tips ([ #2223 ] )
23
+ - * Breaking* : throw during Option construction for unsupported option flags, like multiple characters after single ` - ` ([ #2270 ] )
24
+ - TypeScript: include implicit ` this ` in parameters for action handler callback ([ #2197 ] )
25
+
26
+ ### Deleted
27
+
28
+ - * Breaking* : ` Help.wrap() ` refactored into ` formatItem() ` and ` boxWrap() ` ([ #2251 ] )
29
+
16
30
17
31
### Migration Tips
18
32
19
33
** Excess command-arguments**
20
34
21
- It is now an error to pass more command-arguments than are expected.
35
+ It is now an error for the user to specify more command-arguments than are expected. ( ` allowExcessArguments ` is now false by default.)
22
36
23
37
Old code:
24
38
@@ -29,6 +43,8 @@ program.action((options) => {
29
43
});
30
44
```
31
45
46
+ Now shows an error:
47
+
32
48
``` console
33
49
$ node example.js a b c
34
50
error: too many arguments. Expected 0 arguments but got 3.
@@ -45,7 +61,7 @@ program.action((args, options) => {
45
61
});
46
62
```
47
63
48
- Or you could suppress the error without changing the rest of the code:
64
+ Or you could suppress the error, useful for minimising changes in legacy code.
49
65
50
66
``` js
51
67
program .option (' -p, --port' , ' port number' );
0 commit comments