rn-iso 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/runner.js +4 -4
package/package.json
CHANGED
package/src/runner.js
CHANGED
|
@@ -66,7 +66,7 @@ export function buildScriptCommand(packageManager, scriptName, extraArgs = []) {
|
|
|
66
66
|
|
|
67
67
|
// Decide which CLI a script invokes. Affects flag names:
|
|
68
68
|
// iOS: Expo `--device <UDID>` | RN `--udid <UDID>`
|
|
69
|
-
// Android: Expo `--device <AVD-name>` | RN `--
|
|
69
|
+
// Android: Expo `--device <AVD-name>` | RN `--device <serial>`
|
|
70
70
|
// Expo's run:android resolves --device by name (not by serial), so we pass
|
|
71
71
|
// the AVD name there even though we boot/track by serial.
|
|
72
72
|
export function detectScriptCli(scriptBody) {
|
|
@@ -113,8 +113,8 @@ export function buildAndroidCommand({ projectRoot, packageManager, scriptName, i
|
|
|
113
113
|
const script = getProjectScript(projectRoot, scriptName);
|
|
114
114
|
if (script) {
|
|
115
115
|
const cli = detectScriptCli(script);
|
|
116
|
-
// Expo: --device <AVD name | serial>; RN: --
|
|
117
|
-
const deviceFlag = cli === 'expo' ? `--device "${expoDeviceArg}"` : `--
|
|
116
|
+
// Expo: --device <AVD name | serial>; RN: --device <serial>.
|
|
117
|
+
const deviceFlag = cli === 'expo' ? `--device "${expoDeviceArg}"` : `--device ${serial}`;
|
|
118
118
|
return buildScriptCommand(packageManager, scriptName, [
|
|
119
119
|
deviceFlag,
|
|
120
120
|
`--port ${port}`,
|
|
@@ -126,7 +126,7 @@ export function buildAndroidCommand({ projectRoot, packageManager, scriptName, i
|
|
|
126
126
|
if (isExpo) {
|
|
127
127
|
return `npx expo run:android --device "${expoDeviceArg}" --port ${port}${tailStr}`;
|
|
128
128
|
}
|
|
129
|
-
return `RCT_METRO_PORT=${port} npx react-native run-android --
|
|
129
|
+
return `RCT_METRO_PORT=${port} npx react-native run-android --device ${serial}${tailStr}`;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
// POSIX-safe single-quote shell escape. Leaves "safe" tokens (alnum and a
|