Skip to content

Upgrading commander 14 to 15

Breaking14.0.3 → 15.0.0Breaking4Platform1New1Fixed1Other3

BreakingUpgrade verdict

4 breaking changes and a platform requirement change.

  • If you define both a positive and a negative form of an option, the default value is no longer set automatically. Only a standalone `--no-*` option still defaults to true.
  • The old `commander/esm.mjs` import path is gone; import the package directly instead.
  • Commander is now published as an ES module only. ESM users should see no difference, but some CommonJS setups may need tooling configuration.
  • The package now ships only as an ES module. Most people will not notice, but some setups that load it the old way may need configuration changes.
Top 4 of 5 that need code or config changes

Node.js requirement changed in 15.0.0-0: >=20 → >=22.12.0.

Breaking4
Only a lone --no-* option sets the default option value to true; the default is no longer implicitly set when both positive and negative options are defined, in either order.
--no-*
Removes the deprecated export of commander/esm.mjs.
commander/esm.mjs
Migrates the Commander implementation from CommonJS to ESM.
Commander 15 is ESM only, which may require tooling configuration for CommonJS consumers.
Platform1
Commander 15 requires Node.js v22.12.0 or higher, for require(esm).
require(esm)

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • removed: export * from './index'