Skip to content

Commit 5be900b

Browse files
committed
[eas-cli] Put "All channels" first in the channel-filter prompt
1 parent c8b8994 commit 5be900b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/eas-cli/src/commands/update/embedded/__tests__/list.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ describe(UpdateEmbeddedList, () => {
263263
expect(mockLogLog.mock.calls.some(c => /ago/.test(String(c[0])))).toBe(true);
264264
});
265265

266-
it('builds the prompt choices in channel-order then "All channels"', async () => {
266+
it('puts "All channels" first in the prompt, then channels in order', async () => {
267267
mockViewChannels.mockResolvedValue([
268268
{ id: 'ch1', name: 'production' } as any,
269269
{ id: 'ch2', name: 'preview' } as any,
@@ -275,6 +275,6 @@ describe(UpdateEmbeddedList, () => {
275275

276276
const [, choices] = mockSelectAsync.mock.calls[0];
277277
const titles = (choices as any[]).map(c => c.title);
278-
expect(titles).toEqual(['production', 'preview', 'All channels']);
278+
expect(titles).toEqual(['All channels', 'production', 'preview']);
279279
});
280280
});

packages/eas-cli/src/commands/update/embedded/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ async function promptForChannelAsync(
154154
}
155155

156156
const selected = await selectAsync<string>('Filter embedded updates by which channel?', [
157-
...channels.map(c => ({ title: c.name, value: c.name })),
158157
{ title: 'All channels', value: ALL_CHANNELS },
158+
...channels.map(c => ({ title: c.name, value: c.name })),
159159
]);
160160
return selected === ALL_CHANNELS ? undefined : selected;
161161
}

0 commit comments

Comments
 (0)