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. 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', 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 }); }