Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This is the log of notable changes to EAS CLI and related packages.

### 🎉 New features

- [eas-cli] Make `eas simulator` the canonical command and keep `eas simulator:start` as an alias. ([#4112](https://github.com/expo/eas-cli/pull/4112) by [@szdziedzic](https://github.com/szdziedzic))
- [build-tools] Add `ref` input to the `eas/checkout` step to check out a different git ref (branch, tag, or commit SHA) than the one that triggered the job. ([#4035](https://github.com/expo/eas-cli/pull/4035) by [@sswrk](https://github.com/sswrk))
- [build-tools] Load local composite function catalogs at build time so custom builds and generic jobs can resolve local composite functions referenced via `uses:`. ([#3930](https://github.com/expo/eas-cli/pull/3930) by [@sswrk](https://github.com/sswrk))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
loadSimulatorEnvAsync,
resetSimulatorEnvAsync,
} from '../../../simulator/env';
import SimulatorStart from '../start';
import Simulator from '../index';

jest.mock('fs-extra');
jest.mock('../../../graphql/mutations/DeviceRunSessionMutation');
Expand Down Expand Up @@ -139,7 +139,7 @@ function getMockOclifConfig(): Config {
return config;
}

describe(SimulatorStart, () => {
describe(Simulator, () => {
const mockConfig = getMockOclifConfig();
const previousDeviceRunSessionId = process.env[EAS_SIMULATOR_SESSION_ID];

Expand All @@ -162,10 +162,10 @@ describe(SimulatorStart, () => {
});

function createCommand(argv: string[]): {
command: SimulatorStart;
command: Simulator;
getContextAsync: jest.SpyInstance;
} {
const command = new SimulatorStart(argv, mockConfig);
const command = new Simulator(argv, mockConfig);
// @ts-expect-error getContextAsync is protected
const getContextAsync = jest.spyOn(command, 'getContextAsync').mockResolvedValue({
loggedIn: { graphqlClient },
Expand All @@ -185,7 +185,7 @@ describe(SimulatorStart, () => {
]);
await command.runAsync();

expect(getContextAsync).toHaveBeenCalledWith(SimulatorStart, {
expect(getContextAsync).toHaveBeenCalledWith(Simulator, {
nonInteractive: true,
});
expect(mockCreateDeviceRunSessionAsync).toHaveBeenCalledWith(graphqlClient, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const APP_PLATFORM_BY_FLAG_VALUE: Record<PlatformFlagValue, AppPlatform> = {
ios: AppPlatform.Ios,
};

export default class SimulatorStart extends EasCommand {
export default class Simulator extends EasCommand {
static override hidden = true;
static override aliases = ['simulator'];
static override aliases = ['simulator:start'];
static override description =
'[EXPERIMENTAL] start a remote simulator session on EAS and get instructions to connect to it';

Expand Down Expand Up @@ -100,7 +100,7 @@ export default class SimulatorStart extends EasCommand {
};

async runAsync(): Promise<void> {
const { flags } = await this.parse(SimulatorStart);
const { flags } = await this.parse(Simulator);
const { json: jsonFlag, nonInteractive } = resolveNonInteractiveAndJsonFlags(flags);

if (jsonFlag) {
Expand All @@ -111,7 +111,7 @@ export default class SimulatorStart extends EasCommand {
projectId,
projectDir,
loggedIn: { graphqlClient },
} = await this.getContextAsync(SimulatorStart, {
} = await this.getContextAsync(Simulator, {
nonInteractive,
});

Expand Down
Loading