Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into release/10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspawn committed Nov 29, 2022
2 parents f3880f7 + 198c6e4 commit e0f6173
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
<!-- markdownlint-disable MD024 -->
<!-- markdownlint-disable MD004 -->

## [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
Expand Down Expand Up @@ -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

<!-- Referenced in 5.x -->
[#1]: https://github.com/tj/commander.js/issues/1
Expand Down Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion Readme.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/help.js
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 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",
Expand Down
2 changes: 1 addition & 1 deletion tests/deprecated.test.js
Expand Up @@ -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 <type>', 'cheese type', /mild|tasty/, 'mild');
Expand Down

0 comments on commit e0f6173

Please sign in to comment.