Skip to content

Commit 53fc8a4

Browse files
authored
Prepare for 13.0.0-0 (#2292)
1 parent d355b52 commit 53fc8a4

File tree

4 files changed

+25
-9
lines changed

4 files changed

+25
-9
lines changed

CHANGELOG.md

+21-5
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,37 @@
22

33
All notable changes to this project will be documented in this file.
44

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/),
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
<!-- markdownlint-disable MD024 -->
99
<!-- markdownlint-disable MD004 -->
1010

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])
1219

1320
### Changed
1421

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+
1630

1731
### Migration Tips
1832

1933
**Excess command-arguments**
2034

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.)
2236

2337
Old code:
2438

@@ -29,6 +43,8 @@ program.action((options) => {
2943
});
3044
```
3145

46+
Now shows an error:
47+
3248
```console
3349
$ node example.js a b c
3450
error: too many arguments. Expected 0 arguments but got 3.
@@ -45,7 +61,7 @@ program.action((args, options) => {
4561
});
4662
```
4763

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.
4965

5066
```js
5167
program.option('-p, --port', 'port number');

lib/command.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class Command extends EventEmitter {
229229
* // color support, currently only used with Help
230230
* getOutHasColors()
231231
* getErrHasColors()
232-
* stripColor() // used to remove ANSI escape codes if output does not have colours
232+
* stripColor() // used to remove ANSI escape codes if output does not have colors
233233
*
234234
* @param {object} [configuration] - configuration options
235235
* @return {(Command | object)} `this` command for chaining, or stored configuration

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "commander",
3-
"version": "12.1.0",
3+
"version": "13.0.0-0",
44
"description": "the complete solution for node.js command-line programs",
55
"keywords": [
66
"commander",

0 commit comments

Comments
 (0)