diff --git a/CHANGELOG.md b/CHANGELOG.md index 24b37f6f8..9224605a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. +## [9.4.1] (2022-09-30) + +### Fixed + +- `.setOptionValue()` now also clears option source ([#1795]) +- TypeScript: add `implied` to `OptionValueSource` for option values set by using `.implies()` ([#1794]) +- TypeScript : add `undefined` to return type of `.getOptionValueSource()` ([#1794]) + +### Changed + +- additions to README + ## [9.4.0] (2022-07-15) ### Added @@ -1095,6 +1107,8 @@ program [#1756]: https://github.com/tj/commander.js/pull/1756 [#1763]: https://github.com/tj/commander.js/pull/1763 [#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 [#1]: https://github.com/tj/commander.js/issues/1 @@ -1173,6 +1187,7 @@ program [#1028]: https://github.com/tj/commander.js/pull/1028 [Unreleased]: https://github.com/tj/commander.js/compare/master...develop +[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 [9.3.0]: https://github.com/tj/commander.js/compare/v9.2.0...v9.3.0 [9.2.0]: https://github.com/tj/commander.js/compare/v9.1.0...v9.2.0 diff --git a/Readme.md b/Readme.md index 55543ed76..bacfc6379 100644 --- a/Readme.md +++ b/Readme.md @@ -1011,7 +1011,15 @@ program ### TypeScript -If you use `ts-node` and stand-alone executable subcommands written as `.ts` files, you need to call your program through node to get the subcommands called correctly. e.g. +extra-typings: There is an optional project to infer extra type information from the option and argument definitions. +This adds strong typing to the options returned by `.opts()` and the parameters to `.action()`. +See [commander-js/extra-typings](https://github.com/commander-js/extra-typings) for more. + +``` +import { Command } from '@commander-js/extra-typings'; +``` + +ts-node: If you use `ts-node` and stand-alone executable subcommands written as `.ts` files, you need to call your program through node to get the subcommands called correctly. e.g. ```sh node -r ts-node/register pm.ts diff --git a/lib/help.js b/lib/help.js index bc4826daa..a60dbab61 100644 --- a/lib/help.js +++ b/lib/help.js @@ -216,7 +216,7 @@ class Help { /** * Get the subcommand summary to show in the list of subcommands. - * (Fallback to description for backwards compatiblity.) + * (Fallback to description for backwards compatibility.) * * @param {Command} cmd * @returns {string} diff --git a/package-lock.json b/package-lock.json index 3c497093f..825be8835 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "commander", - "version": "9.4.0", + "version": "9.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "commander", - "version": "9.4.0", + "version": "9.4.1", "license": "MIT", "devDependencies": { "@types/jest": "^29.2.3", diff --git a/package.json b/package.json index 6193e9711..e01143f9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "9.4.0", + "version": "9.4.1", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", diff --git a/tests/deprecated.test.js b/tests/deprecated.test.js index c23f48ce5..9ead410cd 100644 --- a/tests/deprecated.test.js +++ b/tests/deprecated.test.js @@ -21,7 +21,7 @@ describe('option with regular expression instead of custom processing function', expect(program.opts().cheese).toEqual('tasty'); }); - test('when argument does mot matches regexp then value is default', () => { + test('when argument does not match regexp then value is default', () => { const program = new commander.Command(); program .option('--cheese ', 'cheese type', /mild|tasty/, 'mild');