Prepare for 13.0.0-0 (#2292)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by John Gee · committed by GitHub · parent d355b52 · Browse files · 4 files·+25 added−9 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+25 added−9 removed
- other:+25 added−9 removed
Provenance
- Commit
53fc8a4- Tree
e859b3d- Author
John Gee <john@ruru.gen.nz>- Committer
GitHub <noreply@github.com>- Parent
d355b52
4 files changed+25 added−9 removed
modified:lib/command.js+1 added-1 removed
227 unmodified lines228 * getErrHelpWidth()229 * // color support, currently only used with Help230 * getOutHasColors()231 * getErrHasColors()232- * stripColor() // used to remove ANSI escape codes if output does not have colours232+ * stripColor() // used to remove ANSI escape codes if output does not have colors233 *234 * @param {object} [configuration] - configuration options235 * @return {(Command | object)} `this` command for chaining, or stored configuration236 */2349 unmodified linesmodified:CHANGELOG.md+21 added-5 removed
1 # Changelog2 3 All notable changes to this project will be documented in this file.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 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).7 8 <!-- markdownlint-disable MD024 -->9 <!-- markdownlint-disable MD004 -->10 11-## [13.x] (date goes here)11+## [13.0.0-1] (2024-12-08)12 13+### Added14+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])19+20 ### Changed21 15-- *Breaking*: excess command-arguments cause an error by default22+- *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+### Deleted27+28+- *Breaking*: `Help.wrap()` refactored into `formatItem()` and `boxWrap()` ([#2251])29+30+31 ### Migration Tips32 33 **Excess command-arguments**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.)36 37 Old code:38 39 ```js2 unmodified lines42 console.log(program.args);43 });44 ```45 46+Now shows an error:47+48 ```console49 $ node example.js a b c50 error: too many arguments. Expected 0 arguments but got 3.51 ```8 unmodified lines60 console.log(args);61 });62 ```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.65 66 ```js67 program.option('-p, --port', 'port number');68 program.allowExcessArguments();1414 unmodified linesmodified:package-lock.json+2 added-2 removed
1 {2 "name": "commander",3- "version": "12.1.0",3+ "version": "13.0.0-0",4 "lockfileVersion": 3,5 "requires": true,6 "packages": {7 "": {8 "name": "commander",9- "version": "12.1.0",9+ "version": "13.0.0-0",10 "license": "MIT",11 "devDependencies": {12 "@eslint/js": "^9.4.0",13 "@types/jest": "^29.2.4",5866 unmodified linesmodified:package.json+1 added-1 removed
1233456775 unmodified lines{ "name": "commander", "version": "12.1.0", "version": "13.0.0-0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", "command",75 unmodified lines