From ccb95b0580202b79432e3430e70baa2827d93947 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Thu, 12 Dec 2024 19:53:50 +0100 Subject: [PATCH 1/3] feat: invert the reverse port flag --- packages/repack/src/commands/options.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/repack/src/commands/options.ts b/packages/repack/src/commands/options.ts index a0219d96b..560d09ad7 100644 --- a/packages/repack/src/commands/options.ts +++ b/packages/repack/src/commands/options.ts @@ -51,8 +51,9 @@ export const startCommandOptions = [ 'Run the dev server for the specified platform only. By default, the dev server will bundle for all platforms.', }, { - name: '--reverse-port', - description: 'ADB reverse port on starting devServers only for Android', + name: '--no-reverse-port', + description: + 'Disables running ADB reverse automatically when bundling for Android', }, { name: '--verbose', From 3092d0caa1054799574cdc0a5b37c89fe3383c3b Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Thu, 12 Dec 2024 19:56:00 +0100 Subject: [PATCH 2/3] chore: add changeset --- .changeset/dull-ants-change.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/dull-ants-change.md diff --git a/.changeset/dull-ants-change.md b/.changeset/dull-ants-change.md new file mode 100644 index 000000000..6446f553e --- /dev/null +++ b/.changeset/dull-ants-change.md @@ -0,0 +1,5 @@ +--- +"@callstack/repack": major +--- + +Removed `--reverse-port` CLI option and replaced it with `--no-reverse-port` CLI option. From 43aa0716aab79e15fe3b6c1ea4e1fc2b25bb5562 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Mon, 16 Dec 2024 14:12:33 +0100 Subject: [PATCH 3/3] fix: rely only on revertPort flag --- packages/repack/src/commands/rspack/start.ts | 6 +----- packages/repack/src/commands/webpack/start.ts | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/repack/src/commands/rspack/start.ts b/packages/repack/src/commands/rspack/start.ts index abcb98ba4..0cdf455db 100644 --- a/packages/repack/src/commands/rspack/start.ts +++ b/packages/repack/src/commands/rspack/start.ts @@ -126,11 +126,7 @@ export async function start( ); } - if ( - reversePort || - args.platform === undefined || - args.platform === 'android' - ) { + if (reversePort) { void runAdbReverse({ port: serverPort, logger: ctx.log }); } diff --git a/packages/repack/src/commands/webpack/start.ts b/packages/repack/src/commands/webpack/start.ts index 5c5ecd85c..4c3ee07a8 100644 --- a/packages/repack/src/commands/webpack/start.ts +++ b/packages/repack/src/commands/webpack/start.ts @@ -124,11 +124,7 @@ export async function start(_: string[], config: Config, args: StartArguments) { ); } - if ( - reversePort || - args.platform === undefined || - args.platform === 'android' - ) { + if (reversePort) { void runAdbReverse({ port: serverPort, logger: ctx.log }); }