Skip to content

Commit a5482a7

Browse files
authored
chore: migrate to Appium 3.x (#2576)
1 parent 2de931b commit a5482a7

File tree

8 files changed

+756
-631
lines changed

8 files changed

+756
-631
lines changed

.yarn/patches/appium-npm-2.11.2-f39bb587af.patch renamed to .yarn/patches/appium-npm-3.0.2-7d0e99d983.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
diff --git a/build/lib/extension/manifest.js b/build/lib/extension/manifest.js
2-
index 5b650a6ff4dbe737ffdf8821e255e9e4e3d89da3..6179965231285c3ae1d3cddee0c45c57ab3fba03 100644
2+
index af59df0ff07d6294bbc373cbcc273cc06300482f..6ad054e11bc7ece77e80e08c0d265e538ebe7c53 100644
33
--- a/build/lib/extension/manifest.js
44
+++ b/build/lib/extension/manifest.js
5-
@@ -195,12 +195,14 @@ class Manifest {
6-
onMatch(path_1.default.join(__classPrivateFieldGet(this, _Manifest_appiumHome, "f"), 'package.json'), true),
5+
@@ -180,12 +180,14 @@ class Manifest {
6+
onMatch(path_1.default.join(this.#appiumHome, 'package.json'), true),
77
];
88
// add dependencies to the queue
99
- const filepaths = await support_1.fs.glob('node_modules/{*,@*/*}/package.json', {
10-
- cwd: __classPrivateFieldGet(this, _Manifest_appiumHome, "f"),
10+
- cwd: this.#appiumHome,
1111
- absolute: true,
1212
- });
1313
- for (const filepath of filepaths) {

example/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
"@rnx-kit/polyfills": "^0.2.0",
3939
"@rnx-kit/tsconfig": "^2.0.0",
4040
"@types/react": "~19.0.0",
41-
"appium": "patch:appium@npm%3A2.19.0#~/.yarn/patches/appium-npm-2.11.2-f39bb587af.patch",
42-
"appium-uiautomator2-driver": "^4.0.0",
43-
"appium-xcuitest-driver": "^9.0.0",
41+
"appium": "patch:appium@npm%3A3.0.2#~/.yarn/patches/appium-npm-3.0.2-7d0e99d983.patch",
42+
"appium-uiautomator2-driver": "^5.0.0",
43+
"appium-xcuitest-driver": "^10.0.0",
4444
"react-native-test-app": "workspace:*",
4545
"webdriverio": "^9.0.0"
4646
},

example/test/specs/wdio.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const findLatestIPhoneSimulator = (() => {
101101
const sims = devices[latestRuntime];
102102
const simulator = sims.find(({ name }) => name.includes("Pro"));
103103
result = [
104-
simulator?.name ?? "iPhone 15 Pro",
104+
simulator?.name ?? "iPhone 16 Pro",
105105
latestRuntime
106106
.substring("com.apple.CoreSimulator.SimRuntime.iOS-".length)
107107
.replaceAll("-", "."),

package.json

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,16 @@
157157
},
158158
"packageManager": "[email protected]",
159159
"resolutions": {
160-
"@appium/base-driver/axios": "^1.8.3",
160+
"@appium/base-driver/axios": "^1.11.0",
161+
"@appium/base-driver/lru-cache": "^11.2.1",
161162
"@appium/docutils": "link:./example",
162-
"@appium/support/archiver": "^7.0.1",
163-
"@appium/support/axios": "^1.8.3",
164-
"@appium/support/form-data": "^4.0.2",
165-
"@appium/support/semver": "^7.7.1",
166-
"@appium/support/teen_process": "^2.3.1",
167-
"@appium/support/uuid": "^11.1.0",
163+
"@appium/logger/lru-cache": "^11.2.1",
164+
"@appium/support/archiver": "~7.0.1",
165+
"@appium/support/axios": "^1.11.0",
166+
"@appium/support/form-data": "~4.0.4",
167+
"@appium/support/semver": "~7.7.2",
168+
"@appium/support/teen_process": "~3.0.1",
169+
"@appium/support/uuid": "~13.0.0",
168170
"@colors/colors": "^1.6.0",
169171
"@expo/json-file/@babel/code-frame": "^7.10.4",
170172
"@microsoft/eslint-plugin-sdl/eslint-plugin-n": "^17.10.3",
@@ -184,12 +186,13 @@
184186
"@react-native/js-polyfills": "^0.78.0",
185187
"@react-native/normalize-colors": "^0.78.0",
186188
"@react-native/virtualized-lists": "^0.78.0",
187-
"appium/ajv": "^8.17.1",
188-
"appium/axios": "^1.8.3",
189-
"appium/semver": "^7.7.1",
190-
"appium/teen_process": "^2.3.1",
191-
"appium/ws": "^8.18.1",
192-
"appium/yaml": "^2.6.0",
189+
"appium/ajv": "~8.17.1",
190+
"appium/axios": "^1.11.0",
191+
"appium/lru-cache": "^11.2.1",
192+
"appium/semver": "~7.7.2",
193+
"appium/teen_process": "~3.0.1",
194+
"appium/ws": "~8.18.3",
195+
"appium/yaml": "~2.8.1",
193196
"argparse/sprintf-js": "^1.0.2",
194197
"body-parser": "~1.20.3",
195198
"body-parser/qs": "^6.13.0",

scripts/testing/test-apple.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export function installPods({
6464
rm_r(`${platform}/Podfile.lock`);
6565
rm_r(`${platform}/Pods`);
6666
rm_r(`${platform}/build`);
67+
68+
process.env["RCT_USE_PREBUILT_RNCORE"] = "1";
6769
$("pod", "install", `--project-directory=${platform}`);
6870

6971
return Promise.resolve();

scripts/testing/test-matrix.mts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ const TAG = "┃";
2929
const TEST_VARIANTS = ["paper", "fabric"] as const;
3030

3131
function isVariantSupported({ version, variant }: Required<BuildConfig>) {
32-
return variant === "fabric" || toVersionNumber(version) < v(0, 82, 0);
32+
return (
33+
variant === "fabric" ||
34+
Boolean(version && toVersionNumber(version) < v(0, 82, 0))
35+
);
3336
}
3437

3538
function isAppleVariantSupported(config: Required<BuildConfig>) {
@@ -38,7 +41,7 @@ function isAppleVariantSupported(config: Required<BuildConfig>) {
3841
}
3942

4043
const { version, engine } = config;
41-
if (engine === "jsc" && toVersionNumber(version) >= v(0, 80, 0)) {
44+
if (engine === "jsc" && version && toVersionNumber(version) >= v(0, 80, 0)) {
4245
return false;
4346
}
4447

@@ -390,7 +393,7 @@ if (platforms.length === 0) {
390393
process.exitCode = e;
391394
} else {
392395
process.exitCode = 1;
393-
showBanner(`❌ ${e}`);
396+
showBanner(`❌ ${(e instanceof Error && e.stack) || e}`);
394397
}
395398
});
396399
}

scripts/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export type ApplePlatform = "ios" | "macos" | "visionos";
311311
export type TargetPlatform = ApplePlatform | "android" | "windows";
312312

313313
export type BuildConfig = {
314-
version: string;
314+
version: string | undefined;
315315
platform: TargetPlatform;
316316
variant: "fabric" | "paper";
317317
engine?: "hermes" | "jsc";

0 commit comments

Comments
 (0)