Skip to content

Commit

Permalink
[0/1][eas-cli] rename getUpdateGroupJsonInfo (#2157)
Browse files Browse the repository at this point in the history
* [eas-cli] rename getUpdateGroupJsonInfo

* update CHANGELOG.md

* feedback
  • Loading branch information
quinlanj committed Dec 19, 2023
1 parent 43180c0 commit 655f6c8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🧹 Chores

- Rename getUpdateGroupJsonInfo. ([#2157](https://github.com/expo/eas-cli/pull/2157) by [@quinlanj](https://github.com/quinlanj))

## [5.9.2](https://github.com/expo/eas-cli/releases/tag/v5.9.2) - 2023-12-15

### 🧹 Chores
Expand Down
4 changes: 2 additions & 2 deletions packages/eas-cli/src/commands/update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
uploadAssetsAsync,
} from '../../project/publish';
import { ensureEASUpdateIsConfiguredAsync } from '../../update/configure';
import { getUpdateGroupJsonInfo } from '../../update/utils';
import { getUpdateJsonInfosForUpdates } from '../../update/utils';
import {
checkManifestBodyAgainstUpdateInfoGroup,
getCodeSigningInfoAsync,
Expand Down Expand Up @@ -469,7 +469,7 @@ export default class UpdatePublish extends EasCommand {
}

if (jsonFlag) {
printJsonOnlyOutput(getUpdateGroupJsonInfo(newUpdates));
printJsonOnlyOutput(getUpdateJsonInfosForUpdates(newUpdates));
} else {
if (new Set(newUpdates.map(update => update.group)).size > 1) {
Log.addNewLineIfNone();
Expand Down
4 changes: 2 additions & 2 deletions packages/eas-cli/src/commands/update/roll-back-to-embedded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
getUpdateMessageForCommandAsync,
} from '../../project/publish';
import { ensureEASUpdateIsConfiguredAsync } from '../../update/configure';
import { getUpdateGroupJsonInfo } from '../../update/utils';
import { getUpdateJsonInfosForUpdates } from '../../update/utils';
import {
CodeSigningInfo,
checkDirectiveBodyAgainstUpdateInfoGroup,
Expand Down Expand Up @@ -228,7 +228,7 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
}

if (jsonFlag) {
printJsonOnlyOutput(getUpdateGroupJsonInfo(newUpdates));
printJsonOnlyOutput(getUpdateJsonInfosForUpdates(newUpdates));
} else {
if (new Set(newUpdates.map(update => update.group)).size > 1) {
Log.addNewLineIfNone();
Expand Down
4 changes: 2 additions & 2 deletions packages/eas-cli/src/commands/update/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Log from '../../log';
import {
formatUpdateGroup,
getUpdateGroupDescriptions,
getUpdateGroupJsonInfo,
getUpdateJsonInfosForUpdates,
} from '../../update/utils';
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json';

Expand Down Expand Up @@ -47,7 +47,7 @@ export default class UpdateView extends EasCommand {
const updatesByGroup = await UpdateQuery.viewUpdateGroupAsync(graphqlClient, { groupId });

if (jsonFlag) {
printJsonOnlyOutput(getUpdateGroupJsonInfo(updatesByGroup));
printJsonOnlyOutput(getUpdateJsonInfosForUpdates(updatesByGroup));
} else {
const [updateGroupDescription] = getUpdateGroupDescriptions([updatesByGroup]);

Expand Down
4 changes: 2 additions & 2 deletions packages/eas-cli/src/update/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ export function formatUpdateTitle(update: UpdateFragment): string {
)} by ${actorName}, runtimeVersion: ${runtimeVersion}] ${message}`;
}

export function getUpdateGroupJsonInfo(updateGroups: UpdateFragment[]): UpdateJsonInfo[] {
return updateGroups.map(update => ({
export function getUpdateJsonInfosForUpdates(updates: UpdateFragment[]): UpdateJsonInfo[] {
return updates.map(update => ({
id: update.id,
createdAt: update.createdAt,
group: update.group,
Expand Down

0 comments on commit 655f6c8

Please sign in to comment.