Skip to content

Commit

Permalink
[eas-cli] Remove long-deprecated update flags
Browse files Browse the repository at this point in the history
  • Loading branch information
wschurman committed Aug 21, 2024
1 parent 8af8569 commit cc2fc9a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 43 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🛠 Breaking changes

- Remove long-deprecated `eas update` flags. ([#2501](https://github.com/expo/eas-cli/pull/2501) by [@wschurman](https://github.com/wschurman))

### 🎉 New features

### 🐛 Bug fixes
Expand Down
14 changes: 0 additions & 14 deletions packages/eas-cli/src/commands/update/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,6 @@ describe(UpdatePublish.name, () => {
jest.mocked(PublishMutation.publishUpdateGroupAsync).mockClear();
});

// Deprecated and split to a new command: update:republish
it('errors with --republish', async () => {
await expect(new UpdatePublish(['--republish'], commandOptions).run()).rejects.toThrow(
'--group and --republish flags are deprecated'
);
});

// Deprecated and split to a new command: update:republish
it('errors with --group', async () => {
await expect(new UpdatePublish(['--group=abc123'], commandOptions).run()).rejects.toThrow(
'--group and --republish flags are deprecated'
);
});

it('errors with both --channel and --branch', async () => {
const flags = ['--channel=channel123', '--branch=branch123'];

Expand Down
29 changes: 0 additions & 29 deletions packages/eas-cli/src/commands/update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ type RawUpdateFlags = {
'non-interactive': boolean;
'emit-metadata': boolean;
json: boolean;
/** @deprecated see UpdateRepublish command */
group?: string;
/** @deprecated see UpdateRepublish command */
republish?: boolean;
};

type UpdateFlags = {
Expand Down Expand Up @@ -107,14 +103,6 @@ export default class UpdatePublish extends EasCommand {
description: 'A short message describing the update',
required: false,
}),
republish: Flags.boolean({
description: 'Republish an update group (deprecated, see republish command)',
exclusive: ['input-dir', 'skip-bundler'],
}),
group: Flags.string({
description: 'Update group to republish (deprecated, see republish command)',
exclusive: ['input-dir', 'skip-bundler'],
}),
'input-dir': Flags.string({
description: 'Location of the bundle',
default: 'dist',
Expand Down Expand Up @@ -557,23 +545,6 @@ export default class UpdatePublish extends EasCommand {
);
}

if (flags.group || flags.republish) {
// Pick the first flag set that is defined, in this specific order
const args = [
['--group', flags.group],
['--branch', flags.branch],
].filter(([_, value]) => value)[0];

Log.newLine();
Log.warn(
'The --group and --republish flags are deprecated, use the republish command instead:'
);
Log.warn(` ${chalk.bold([`eas update:republish`, ...(args ?? [])].join(' '))}`);
Log.newLine();

Errors.error('--group and --republish flags are deprecated', { exit: 1 });
}

const skipBundler = flags['skip-bundler'] ?? false;
let emitMetadata = flags['emit-metadata'] ?? false;

Expand Down

0 comments on commit cc2fc9a

Please sign in to comment.