Packages

commander

15.1.0 · 7 Nov 2026MIT785.6M / weekRepositoryHomepagenpmAtom feed

Upgrading commander From 4.1.1 to 5.0.0

1 release in betweenevery note read

Other targets from 4.1.1Latest15.1.0
  1. 4.1.1yours
  2. 5.0.0target

Before you upgrade

Tick each one off as you go
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0

Release by release

  1. 5.0.0

    Migration needed14 Mar 202011 new · 2 fixes
    • Breaking

      Support for nested commands with action-handlers (#1 #764 #1149)

    • Breaking

      Preserve argument order in subcommands (#508 #962 #1138)

    • Breaking

      Unknown options included in arguments passed to command action handler

    • Breaking

      Unknown options included in .args

7 other lines we could not sort, mostly version bumps
  • Tighten TypeScript definition of custom option processing function passed to .option()

    5.0.0
  • Only recognised option short flags and long flags are expanded (e.g. -ab or --foo=bar)

    5.0.0
  • Refactor Option from prototype to class

    5.0.0
  • Refactor Command from prototype to class

    5.0.0
  • Changes to error handling

    5.0.0
  • TypeScript fluent return types changed to be more subclass friendly, return this rather than Command

    5.0.0
  • .parseAsync returns Promise<this> to be consistent with .parse()

    5.0.0

1 internal line (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.