Skip to content

fix(deps): update dependency commander to v15#410

Merged
JoshMock merged 1 commit into
mainfrom
renovate/commander-15.x
Jun 15, 2026
Merged

fix(deps): update dependency commander to v15#410
JoshMock merged 1 commit into
mainfrom
renovate/commander-15.x

Conversation

@elastic-renovate-prod

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
commander dependencies major ^14.0.3 -> ^15.0.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

tj/commander.js (commander)

v15.0.0

Compare Source

Commander 15 is ESM only. This is expected to be seamless for ESM consumers, but some CommonJS consumers may hit issues with tooling requiring configuration for ESM-only dependencies. See Migration Tips below.

The release of Commander 15 moves Commander 14 into maintenance. Commander 14 will get security updates for
12 months (to May 2027). For more info see Release Policy.

Added
  • show excess command-arguments in error message ([#​2384])
Fixed
  • Breaking: only lone --no-* option sets default option value to true, default not implicitly set when define both positive and negative option in either order ([#​2405])
  • update example to use compatible character for MINGW64 ([#​2475])
Changed
  • Breaking: migrated Commander implementation from CommonJS to ESM ([#​2464])
  • Breaking: Commander 15 requires Node.js v22.12.0 or higher (for require(esm)).
  • dev: switch tests from Jest to node:test test runner ([#​2463])
Deleted
  • Breaking: removed deprecated export of commander/esm.mjs ([#​2464])
Migration Tips

Commander 15 is ESM only, but this does not mean you need to migrate to ESM to use it. Importing ESM from CommonJS is
supported by Node.js, and Bun, and Deno. Hopefully it Just Works for you! However, you may be using a different runtime or
some other part of your setup that may not yet natively support importing ESM from CommonJS, such as your testing framework
or bundler.

If you have problems using Commander 15 in your environment, one option is stay on Commander 14 for now. Commander 14 will
get security updates until May 2027 and things will hopefully improve for your setup in the meantime.


Configuration

📅 Schedule: Branch creation - "on monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@github-actions

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 7.96s
✅ REPOSITORY gitleaks yes no no 57.71s
✅ REPOSITORY git_diff yes no no 0.54s
✅ REPOSITORY secretlint yes no no 30.97s
✅ REPOSITORY trivy yes no no 19.43s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@JoshMock JoshMock merged commit 7a8056f into main Jun 15, 2026
23 of 25 checks passed
@JoshMock JoshMock deleted the renovate/commander-15.x branch June 15, 2026 17:12
MattDevy added a commit that referenced this pull request Jun 16, 2026
Supersedes the previous regeneration commit, which ran against a
locally-symlinked node_modules with a stale yaml version. The actual
drift on main was commander 14 -> 15 from #410, which had updated
the lockfile but not NOTICE.txt.
levontumanyan added a commit to levontumanyan/cli that referenced this pull request Jun 22, 2026
The test for JSON-format input validation errors was failing on Node.js 22
(Linux) after the commander v14 → v15 upgrade (elastic#410). Commander 15 is ESM-only,
and on Linux Node 22.22.x the combination of global process.stderr.write
patching in the test helper with tsx/esm caused the captured output to be
unreliable — specifically the second test in the suite got an empty or
non-JSON buffer, making parsed come back null.

Two-part fix:
1. factory.ts: route the JSON error through cmd.configureOutput().writeErr()
   instead of process.stderr.write() directly, respecting commander's own
   output configuration layer.
2. test: remove global process.stdout/stderr.write patching from
   invokeWithJsonFormat and rely solely on configureOutput — which is already
   set up to capture output. This eliminates the global-state mutation that
   was the root cause of the Linux-specific failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant