Skip to content

Commit

Permalink
Export InvalidOptionArgumentError in esm (#1756)
Browse files Browse the repository at this point in the history
  • Loading branch information
everett1992 committed Jun 20, 2022
1 parent dccc906 commit 3ae30a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions esm.mjs
Expand Up @@ -8,6 +8,7 @@ export const {
createOption,
CommanderError,
InvalidArgumentError,
InvalidOptionArgumentError, // deprecated old name
Command,
Argument,
Option,
Expand Down
3 changes: 2 additions & 1 deletion tests/esm-imports-test.mjs
@@ -1,4 +1,4 @@
import { program, Command, Option, Argument, CommanderError, InvalidArgumentError, Help, createCommand, createArgument, createOption } from '../esm.mjs';
import { program, Command, Option, Argument, CommanderError, InvalidArgumentError, InvalidOptionArgumentError, Help, createCommand, createArgument, createOption } from '../esm.mjs';

// Do some simple checks that expected imports are available at runtime.
// Run using `npm run test-esm`.
Expand All @@ -25,6 +25,7 @@ checkClass(new Command(), 'Command');
checkClass(new Option('-e, --example'), 'Option');
checkClass(new CommanderError(1, 'code', 'failed'), 'CommanderError');
checkClass(new InvalidArgumentError('failed'), 'InvalidArgumentError');
checkClass(new InvalidOptionArgumentError('failed'), 'InvalidArgumentError');
checkClass(new Help(), 'Help');
checkClass(new Argument('<file>'), 'Argument');

Expand Down

0 comments on commit 3ae30a2

Please sign in to comment.