Skip to content

Commit

Permalink
fix: update for new rn 73
Browse files Browse the repository at this point in the history
  • Loading branch information
rams23 committed Dec 22, 2023
1 parent dc8c69e commit 87fbf80
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 1,573 deletions.
10 changes: 5 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"@oclif/core": "^2",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^2.3.2",
"@react-native-community/cli-platform-android": "10.2.0",
"@react-native-community/cli-platform-ios": "10.2.0",
"@react-native-community/cli-tools": "10.1.1",
"@react-native-community/cli-platform-android": "12.3.0",
"@react-native-community/cli-platform-ios": "12.3.0",
"@react-native-community/cli-tools": "12.3.0",
"@rn-buildhub/storage-interface": "workspace:^",
"adm-zip": "^0.5.10",
"axios": "^1.3.4",
Expand All @@ -40,8 +40,8 @@
},
"devDependencies": {
"@oclif/test": "^2.3.7",
"@react-native-community/cli": "^10.2.0",
"@react-native-community/cli-config": "^10.1.1",
"@react-native-community/cli": "12.3.0",
"@react-native-community/cli-config": "12.3.0",
"@rn-buildhub/azure-storage": "workspace:^",
"@rn-buildhub/gcp-storage": "workspace:^",
"@rn-buildhub/s3-storage": "workspace:^",
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/application/metroManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import childProcess from 'child_process';
import axios from 'axios';
import path from 'path';
import { getProjectRootDir, sleep } from './utils';
import { startServerInNewWindow } from '@react-native-community/cli-platform-android/build/commands/buildAndroid/startServerInNewWindow';
import { getDefaultUserTerminal } from '@react-native-community/cli-tools';
import { getDefaultUserTerminal, startServerInNewWindow } from '@react-native-community/cli-tools';

export async function startMetro(resetCache = false, port = '8081') {
startServerInNewWindow(
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/application/runIos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import chalk from 'chalk';
import { executeCommand, getAppName, getProjectRootDir } from './utils';
import { buildIos } from './buildIos';
import { getIosBuildDestination, iosBuildPlatforms, IosPlatform } from './iosUtils';
import { getDevices as getDevicesRNCLI } from '@react-native-community/cli-platform-ios/build/tools/getDevices';
import { default as getDevicesRNCLI } from '@react-native-community/cli-platform-ios/build/tools/listIOSDevices';
import path from 'path';
import { getIosFlavors } from './config';
import logger from './logger';
Expand Down Expand Up @@ -43,8 +43,8 @@ function getIosSimulatorsDevices(): Device[] {
}));
}

function getIosPhysicalDevices(): Device[] {
const devices = getDevicesRNCLI();
async function getIosPhysicalDevices(): Promise<Device[]> {
const devices = await getDevicesRNCLI();
return devices
.filter(d => d.type === 'device' || d.type === 'catalyst')
.map(d => {
Expand Down Expand Up @@ -194,7 +194,7 @@ export async function runApp(
if (iosPlatform.name === iosBuildPlatforms.simulator.name) {
devices = getIosSimulatorsDevices();
} else {
devices = getIosPhysicalDevices();
devices = await getIosPhysicalDevices();
}

if (devices.length === 0) {
Expand Down
Loading

0 comments on commit 87fbf80

Please sign in to comment.