Skip to content

Commit

Permalink
refactor: Switch the package to use Appium2 modules (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Jan 27, 2022
1 parent 24d28fd commit 1099c41
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
@@ -1,3 +1,3 @@
{
"extends": "appium"
"extends": "@appium/eslint-config-appium"
}
4 changes: 3 additions & 1 deletion gulpfile.js
@@ -1,10 +1,12 @@
'use strict';

const gulp = require('gulp');
const boilerplate = require('appium-gulp-plugins').boilerplate.use(gulp);
const boilerplate = require('@appium/gulp-plugins').boilerplate.use(gulp);
const DEFAULTS = require('@appium/gulp-plugins').boilerplate.DEFAULTS;

boilerplate({
build: 'appium-ios-simulator',
files: DEFAULTS.files.concat('index.js'),
coverage: {
files: ['./build/test/unit/**/*-specs.js'],
verbose: true
Expand Down
2 changes: 1 addition & 1 deletion lib/certificate.js
@@ -1,7 +1,7 @@
import crypto from 'crypto';
import { exec } from 'teen_process';
import path from 'path';
import { fs, mkdirp } from 'appium-support';
import { fs, mkdirp } from '@appium/support';
import { execSQLiteQuery } from './utils';
import log from './logger';
import _ from 'lodash';
Expand Down
2 changes: 1 addition & 1 deletion lib/extensions/prepare-apps.js
@@ -1,4 +1,4 @@
import { fs } from 'appium-support';
import { fs } from '@appium/support';
import log from '../logger';
import path from 'path';

Expand Down
2 changes: 1 addition & 1 deletion lib/geolocation.js
@@ -1,7 +1,7 @@
import _ from 'lodash';
import log from './logger';
import { exec } from 'teen_process';
import { fs } from 'appium-support';
import { fs } from '@appium/support';

const LYFT_SET_LOCATION = 'set-simulator-location';

Expand Down
2 changes: 1 addition & 1 deletion lib/logger.js
@@ -1,4 +1,4 @@
import { logger } from 'appium-support';
import { logger } from '@appium/support';
import _ from 'lodash';


Expand Down
2 changes: 1 addition & 1 deletion lib/permissions.js
@@ -1,5 +1,5 @@
import _ from 'lodash';
import { fs, util } from 'appium-support';
import { fs, util } from '@appium/support';
import { exec } from 'teen_process';
import log from './logger';
import TCCDB from './tcc-db';
Expand Down
2 changes: 1 addition & 1 deletion lib/settings.js
@@ -1,5 +1,5 @@
import _ from 'lodash';
import { plist } from 'appium-support';
import { plist } from '@appium/support';
import path from 'path';
import log from './logger';
import semver from 'semver';
Expand Down
2 changes: 1 addition & 1 deletion lib/simulator-xcode-10.js
@@ -1,5 +1,5 @@
import SimulatorXcode93 from './simulator-xcode-9.3';
import { fs, timing } from 'appium-support';
import { fs, timing } from '@appium/support';
import { waitForCondition } from 'asyncbox';
import { MOBILE_SAFARI_BUNDLE_ID, SAFARI_STARTUP_TIMEOUT } from './utils';
import log from './logger';
Expand Down
2 changes: 1 addition & 1 deletion lib/simulator-xcode-6.js
@@ -1,7 +1,7 @@
import path from 'path';
import { default as xcode, getPath as getXcodePath } from 'appium-xcode';
import log from './logger';
import { fs, tempDir, mkdirp, plist, timing, util } from 'appium-support';
import { fs, tempDir, mkdirp, plist, timing, util } from '@appium/support';
import B from 'bluebird';
import _ from 'lodash';
import AsyncLock from 'async-lock';
Expand Down
2 changes: 1 addition & 1 deletion lib/simulator-xcode-8.js
Expand Up @@ -8,7 +8,7 @@ import {
setLocationWithLyft,
setLocationWithIdb,
setLocationWithAppleScript } from './geolocation';
import { timing } from 'appium-support';
import { timing } from '@appium/support';
import { MOBILE_SAFARI_BUNDLE_ID, SAFARI_STARTUP_TIMEOUT } from './utils';


Expand Down
2 changes: 1 addition & 1 deletion lib/simulator-xcode-9.js
@@ -1,7 +1,7 @@
import SimulatorXcode8 from './simulator-xcode-8';
import _ from 'lodash';
import path from 'path';
import { fs, timing } from 'appium-support';
import { fs, timing } from '@appium/support';
import AsyncLock from 'async-lock';
import log from './logger';
import { waitForCondition } from 'asyncbox';
Expand Down
2 changes: 1 addition & 1 deletion lib/tcc-db.js
@@ -1,5 +1,5 @@
import path from 'path';
import { fs, mkdirp } from 'appium-support';
import { fs, mkdirp } from '@appium/support';
import { execSQLiteQuery } from './utils';

class TCCDB {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -4,7 +4,7 @@ import { exec } from 'teen_process';
import { waitForCondition } from 'asyncbox';
import { getVersion } from 'appium-xcode';
import Simctl from 'node-simctl';
import { fs, tempDir, util } from 'appium-support';
import { fs, tempDir, util } from '@appium/support';
import { Certificate } from './certificate';
import path from 'path';
import Simulator from './simulator-xcode-6';
Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -29,17 +29,17 @@
"build/lib"
],
"dependencies": {
"@appium/support": "^2.55.3",
"@babel/runtime": "^7.0.0",
"@xmldom/xmldom": "^0.x",
"appium-support": "^2.44.0",
"appium-xcode": "^3.1.0",
"appium-xcode": "^4.0.0",
"async-lock": "^1.0.0",
"asyncbox": "^2.3.1",
"bluebird": "^3.5.1",
"lodash": "^4.2.1",
"node-simctl": "^6.6.0",
"semver": "^7.0.0",
"source-map-support": "^0.5.3",
"source-map-support": "^0.x",
"teen_process": "^1.3.0"
},
"scripts": {
Expand All @@ -61,11 +61,11 @@
"precommit-test"
],
"devDependencies": {
"appium-gulp-plugins": "^5.4.0",
"@appium/gulp-plugins": "^6.0.0",
"@appium/eslint-config-appium": "^5.0.0",
"chai": "^4.1.0",
"chai-as-promised": "^7.1.1",
"colors": "^1.1.2",
"eslint-config-appium": "^4.0.1",
"fs-extra": "^10.0.0",
"gulp": "^4.0.0",
"ios-test-app": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/functional/simulator-e2e-specs.js
Expand Up @@ -4,7 +4,7 @@ import { getSimulator, killAllSimulators } from '../..';
import Simctl from 'node-simctl';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import { fs } from 'appium-support';
import { fs } from '@appium/support';
import B from 'bluebird';
import { absolute as testAppPath } from 'ios-test-app';
import { retryInterval, waitForCondition } from 'asyncbox';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/calendar-specs.js
Expand Up @@ -3,7 +3,7 @@
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import Calendar from '../../lib/calendar';
import { fs } from 'appium-support';
import { fs } from '@appium/support';
import { copySync } from 'fs-extra';
import { execSQLiteQuery } from '../../lib/utils';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/certificate-specs.js
Expand Up @@ -3,7 +3,7 @@
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import { Certificate, TrustStore } from '../../lib/certificate';
import { fs, util } from 'appium-support';
import { fs, util } from '@appium/support';
import { copySync } from 'fs-extra';

chai.should();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/settings-specs.js
Expand Up @@ -5,7 +5,7 @@ import chaiAsPromised from 'chai-as-promised';
import * as settings from '../../lib/settings';
import SimulatorXcode6 from '../../lib/simulator-xcode-6';
import path from 'path';
import { tempDir, fs } from 'appium-support';
import { tempDir, fs } from '@appium/support';
import sinon from 'sinon';
import { asyncmap } from 'asyncbox';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/simulator-common-specs.js
Expand Up @@ -6,7 +6,7 @@ import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import _ from 'lodash';
import sinon from 'sinon';
import { fs } from 'appium-support';
import { fs } from '@appium/support';
import B from 'bluebird';

chai.should();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/utils-specs.js
Expand Up @@ -15,7 +15,7 @@ import { toBiometricDomainComponent } from '../../lib/utils';
import { devices } from '../assets/deviceList';
import Simulator from '../../lib/simulator-xcode-6';
import SimulatorXcode9 from '../../lib/simulator-xcode-9';
import { fs } from 'appium-support';
import { fs } from '@appium/support';
import path from 'path';


Expand Down

0 comments on commit 1099c41

Please sign in to comment.