From d337c11c01acc3b261d274c34676dc5c0b91d321 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Fri, 13 Nov 2026 09:08:55 +0000 Subject: [PATCH 1/2] fix(cli): bump commander to 12.x Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .changeset/cli-commander-12.md | 5 +++++ packages/cli/package.json | 2 +- packages/cli/src/bin/rnx-cli.ts | 7 +++++-- yarn.lock | 11 ++--------- 4 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 .changeset/cli-commander-12.md diff --git a/.changeset/cli-commander-12.md b/.changeset/cli-commander-12.md new file mode 100644 index 0000000000..c984f62fe1 --- /dev/null +++ b/.changeset/cli-commander-12.md @@ -0,0 +1,5 @@ +--- +"@rnx-kit/cli": patch +--- + +Bumped `commander` to 12.x diff --git a/packages/cli/package.json b/packages/cli/package.json index 4e3dd3c5a0..23212f69ce 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -59,7 +59,7 @@ "@rnx-kit/types-bundle-config": "workspace:^", "@rnx-kit/types-kit-config": "workspace:^", "@rnx-kit/types-node": "workspace:^", - "commander": "^11.1.0", + "commander": "^12.1.0", "ora": "^5.4.1", "qrcode": "catalog:" }, diff --git a/packages/cli/src/bin/rnx-cli.ts b/packages/cli/src/bin/rnx-cli.ts index e98e32de38..2c8f09662e 100644 --- a/packages/cli/src/bin/rnx-cli.ts +++ b/packages/cli/src/bin/rnx-cli.ts @@ -1,7 +1,7 @@ import type { Config } from "@react-native-community/cli-types"; import { Command } from "commander"; import * as path from "node:path"; -import { loadContextForCommand } from "./context.ts"; +import { loadContextForCommand, uniquify } from "./context.ts"; import { findExternalCommands } from "./externalCommands.ts"; type CommandOption = Required["options"][number]; @@ -19,7 +19,10 @@ export async function main() { const [, , userCommand] = process.argv; const context = await loadContextForCommand(userCommand); - const allCommands = context.commands.concat(findExternalCommands(context)); + // Commander throws if a command name is registered more than once + const allCommands = uniquify( + context.commands.concat(findExternalCommands(context)) + ); const program = new Command(path.basename(__filename, ".js")); for (const info of allCommands) { diff --git a/yarn.lock b/yarn.lock index 1c350c5350..b53751e67e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5352,7 +5352,7 @@ __metadata: "@types/connect": "catalog:" "@types/node": "catalog:" "@types/qrcode": "catalog:" - commander: "npm:^11.1.0" + commander: "npm:^12.1.0" markdown-table: "catalog:" memfs: "catalog:" metro: "npm:^0.84.0" @@ -9266,14 +9266,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^11.1.0": - version: 11.1.0 - resolution: "commander@npm:11.1.0" - checksum: 10c0/13cc6ac875e48780250f723fb81c1c1178d35c5decb1abb1b628b3177af08a8554e76b2c0f29de72d69eef7c864d12613272a71fabef8047922bc622ab75a179 - languageName: node - linkType: hard - -"commander@npm:^12.0.0": +"commander@npm:^12.0.0, commander@npm:^12.1.0": version: 12.1.0 resolution: "commander@npm:12.1.0" checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9 From a253035fee50132695951eee43b0380b622e7cb3 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Fri, 13 Nov 2026 09:29:51 +0000 Subject: [PATCH 2/2] docs: add PR description guideline to AGENTS.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- AGENTS.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 8e1331d0eb..429b10780f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -145,6 +145,15 @@ action creates a release PR or publishes to npm. Don't add change files for private packages (`"private": true`), e.g. `@rnx-kit/template` and test apps. +### Pull Request Descriptions + +Follow `.github/pull_request_template.md`. Write the description for reviewers +and users: give an overview of the change and explain the reasoning behind it, +such as the motivation, alternatives considered and why they were rejected, +breaking changes, and user-facing impact. Skip implementation details that can +be inferred from the diff, such as file-by-file summaries or how the code was +changed. + ## Key Packages - **`@rnx-kit/cli`** - Main CLI (`rnx-cli`) integrating all tools