Skip to content

Commit 045f205

Browse files
feat!: Migrate the package to ESM (#2914)
BREAKING CHANGE: Consumers using require('appium-xcuitest-driver') must switch to import/dynamic import() — the package no longer ships a CommonJS entry point. BREAKING CHANGE: start is no longer callable as driver.start(...). BREAKING CHANGE: stop is no longer callable as driver.stop(...). BREAKING CHANGE: runReset is no longer callable as driver.runReset(...). BREAKING CHANGE: configureApp is no longer callable as driver.configureApp(...). BREAKING CHANGE: determineDevice is no longer callable as driver.determineDevice(...). BREAKING CHANGE: setInitialOrientation is no longer callable as driver.setInitialOrientation(...). BREAKING CHANGE: resetIos is no longer callable as driver.resetIos(...). BREAKING CHANGE: mergeCliArgsToOpts is no longer callable as driver.mergeCliArgsToOpts(...). BREAKING CHANGE: handleMjpegOptions is no longer callable as driver.handleMjpegOptions(...). BREAKING CHANGE: allocateMjpegServerPort is no longer callable as driver.allocateMjpegServerPort(...). BREAKING CHANGE: getDefaultUrl is no longer callable as driver.getDefaultUrl(...). BREAKING CHANGE: onSettingsUpdate is no longer callable as driver.onSettingsUpdate(...). BREAKING CHANGE: isXcodebuildNeeded is no longer callable as driver.isXcodebuildNeeded(...). BREAKING CHANGE: createSim has been removed; it was already deprecated. BREAKING CHANGE: startWdaSession is no longer callable as driver.startWdaSession(...). BREAKING CHANGE: installAUT is no longer callable as driver.installAUT(...). BREAKING CHANGE: installOtherApps is no longer callable as driver.installOtherApps(...).
1 parent 31fb239 commit 045f205

178 files changed

Lines changed: 1557 additions & 1468 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/functional-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ jobs:
9292
popd
9393
name: Install Appium Server
9494
- run: |
95-
brew install xq
9695
npm install
9796
npm install --no-save mjpeg-consumer
98-
npm install mocha-multi-reporters --save-dev
9997
name: Install dev dependencies
10098
- run: |
10199
export cwd=$(pwd)

lib/app-infos-cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import path from 'node:path';
22

33
import type {AppiumLogger, StringRecord} from '@appium/types';
4-
import {plist, fs, tempDir, zip} from 'appium/support';
4+
import {plist, fs, tempDir, zip} from 'appium/support.js';
55
import {LRUCache} from 'lru-cache';
66

7-
import {escapeRegExp, isPlainObject} from './utils';
7+
import {escapeRegExp, isPlainObject} from './utils/index.js';
88

99
const MANIFEST_CACHE = new LRUCache<string, StringRecord>({
1010
max: 40,

lib/commands/active-app-info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type {XCUITestDriver} from '../driver';
2-
import type {ActiveAppInfo} from './types';
1+
import type {XCUITestDriver} from '../driver.js';
2+
import type {ActiveAppInfo} from './types.js';
33

44
/**
55
* Returns information about the active application.

lib/commands/alert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {XCUITestDriver} from '../driver';
1+
import type {XCUITestDriver} from '../driver.js';
22

33
export type AlertAction = 'accept' | 'dismiss' | 'getButtons';
44

0 commit comments

Comments
 (0)