From 182f28daa00a96603bce378ca071feae58743e15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 12:32:32 +0000 Subject: [PATCH 1/2] Update(deps): Bump commander from 12.1.0 to 14.0.3 Bumps [commander](https://github.com/tj/commander.js) from 12.1.0 to 14.0.3. - [Release notes](https://github.com/tj/commander.js/releases) - [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/tj/commander.js/compare/v12.1.0...v14.0.3) --- updated-dependencies: - dependency-name: commander dependency-version: 14.0.3 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- packages/cli/package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 0a8b3176..886a306c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -57,6 +57,6 @@ }, "dependencies": { "@basou/core": "workspace:*", - "commander": "^12.1.0" + "commander": "^14.0.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e55fcba9..88325d89 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ importers: specifier: workspace:* version: link:../core commander: - specifier: ^12.1.0 - version: 12.1.0 + specifier: ^14.0.3 + version: 14.0.3 packages/core: dependencies: @@ -624,9 +624,9 @@ packages: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} - commander@12.1.0: - resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} - engines: {node: '>=18'} + commander@14.0.3: + resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} + engines: {node: '>=20'} commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} @@ -1316,7 +1316,7 @@ snapshots: dependencies: readdirp: 4.1.2 - commander@12.1.0: {} + commander@14.0.3: {} commander@4.1.1: {} From 3880ea9f2bc17732a6ea4077a687f44b567150df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=BE=E5=B1=B1=E8=B2=B4=E8=87=B3?= Date: Wed, 27 May 2026 21:57:22 +0900 Subject: [PATCH 2/2] test(cli): adapt approval-reject case 21 to commander 14 propagation rules commander 14 stopped propagating `exitOverride()` and `configureOutput()` from a parent `Command` to its nested subcommands. Case 21 raises the missing-required-option error on the leaf `approval reject` command, two levels below the test's root program, so the previous setup never saw `writeErr` and never caught the `CommanderError` - the worker just printed to process.stderr and exited. Reapply both overrides across the whole subcommand tree from inside the test. The fix is idempotent on commander 12 (calling `exitOverride()` twice on the same command is a no-op), so the test stays green either way once the dependency bump lands. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/cli/src/commands/approval.test.ts | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/commands/approval.test.ts b/packages/cli/src/commands/approval.test.ts index aed08e58..2e3f2727 100644 --- a/packages/cli/src/commands/approval.test.ts +++ b/packages/cli/src/commands/approval.test.ts @@ -629,14 +629,24 @@ describe("runApprovalReject", () => { await createApproval(repo, { id: approvalId }); const program = new Command(); registerApprovalCommand(program); - program.exitOverride(); let stderrBuf = ""; - program.configureOutput({ - writeErr: (msg) => { - stderrBuf += msg; - }, - writeOut: () => undefined, - }); + // commander 14 stopped propagating `exitOverride()` and `configureOutput()` + // from the parent program to nested subcommands. The missing-required-option + // error is raised on the leaf `approval reject` subcommand, so the same + // overrides have to be re-applied across the whole tree to keep the test + // hermetic (otherwise commander writes to process.stderr and exits the + // worker). + const applyOverrides = (cmd: Command): void => { + cmd.exitOverride(); + cmd.configureOutput({ + writeErr: (msg) => { + stderrBuf += msg; + }, + writeOut: () => undefined, + }); + for (const sub of cmd.commands) applyOverrides(sub); + }; + applyOverrides(program); let captured: unknown; try { await program.parseAsync(["node", "basou", "approval", "reject", approvalId]);