Upgrading commander 14 to 15
Breaking14.0.3 → 15.0.0Breaking4Platform1New1Fixed1Other3
BreakingUpgrade verdict
4 breaking changes and a platform requirement change.
In plain terms
- 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.
Must act Top 4 of 5 that need code or config changes
Node.js requirement changed in 15.0.0-0: >=20 → >=22.12.0.
What you must change
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.mjsMigrates 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)API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- removed:
export * from './index'