Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export InvalidOptionArgumentError in esm #1756

Merged
merged 3 commits into from Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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