unstale

npm / command-line-args

command-line-args

What changed in command-line-args 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.

3 breaking6 new APIs and options1 behavior and defaults2 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

command-line-args 62 changes

Breaking changes 1

  • Support for Node versions less than v12.20 was dropped; users of older versions should stay on v5.2.1.

    6.0.0release notes

Behavior and default changes 1

  • The package is now a native ES6 module while continuing to support CommonJS.

    6.0.0release notes

command-line-args 510 changes

Breaking changes 2

  • Setting a singular, non-multiple option more than once now throws an ALREADY_SET exception.

    5.0.0release notes

  • Unknown values now throw UNKNOWN_VALUE by default, so all options and values must be accounted for in the option definitions. Use partial or stopAtFirstUnknown to disable strict-by-default behaviour.

    5.0.0release notes

New APIs and options 6

  • The ALREADY_SET exception now has an optionName property containing the option name that has already been set.

    5.0.0release notes

  • Adds camelCase as a parse feature.

    5.0.0release notes

  • Adds stopAtFirstUnknown as a parse option; it can also disable strict-by-default behaviour.

    5.0.0release notes

  • Adds lazyMultiple as an option definition feature.

    5.0.0release notes

  • The UNKNOWN_OPTION exception now has an optionName property containing the argument that specified the unknown option.

    5.0.0release notes

  • The UNKNOWN_VALUE exception now has a value property containing the unknown value.

    5.0.0release notes

Fixes and other changes 2

  • Fixes an unknown --option=value notation value being consumed as defaultOption.

    5.0.0release notes

  • Fixes an unknown --option=value argument being split when defaultOption is set.

    5.0.0release notes