Skip to content
Myr

Deprecate import from commander/esm.mjs (#1887)

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 2f07c2a · Browse files · 1 file+19 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+19 added−2 removed

  • other:+19 added−2 removed

1 file+19 added−2 removed

modified:docs/deprecated.md+19 added-2 removed
7 unmodified lines
8 - [noHelp](#nohelp)9 - [Default import of global Command object](#default-import-of-global-command-object)10 - [Callback to .help() and .outputHelp()](#callback-to-help-and-outputhelp)11 - [.on('--help')](#on--help)12 - [.on('command:*')](#oncommand)13 - [.command('*')](#command)12 - [.on('command:\*')](#oncommand)13 - [.command('\*')](#command)14 - [cmd.description(cmdDescription, argDescriptions)](#cmddescriptioncmddescription-argdescriptions)15 - [InvalidOptionArgumentError](#invalidoptionargumenterror)16 - [Short option flag longer than a single character](#short-option-flag-longer-than-a-single-character)17 - [Import from `commander/esm.mjs`](#import-from-commanderesmmjs)1819## RegExp .option() parameter2021The `.option()` method allowed a RegExp as the third parameter to restrict what values were accepted.
168 unmodified lines
190191Short option flags like `-ws` were never supported, but the old README did not make this clear. The README now states that short options are a single character.192193README updated in Commander v3. Deprecated from Commander v9.194195## Import from `commander/esm.mjs`196197The first support for named imports required an explicit entry file.198199```js200import { Command } from 'commander/esm.mjs';201```202203This is no longer required, just import directly from the module.204205```js206import { Command } from 'commander';207```208209README updated in Commander v9. Deprecated from Commander v9.