Skip to content

Commit ccbd1b9

Browse files
chore(deps-dev): bump @appium/eslint-config-appium-ts from 0.3.3 to 1.0.1 (#451)
* chore(deps-dev): bump @appium/eslint-config-appium-ts Bumps [@appium/eslint-config-appium-ts](https://github.com/appium/appium/tree/HEAD/packages/eslint-config-appium-ts) from 0.3.3 to 1.0.1. - [Release notes](https://github.com/appium/appium/releases) - [Changelog](https://github.com/appium/appium/blob/master/packages/eslint-config-appium-ts/CHANGELOG.md) - [Commits](https://github.com/appium/appium/commits/@appium/[email protected]/packages/eslint-config-appium-ts) --- updated-dependencies: - dependency-name: "@appium/eslint-config-appium-ts" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix lint * fix lint --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kazuaki Matsuo <[email protected]>
1 parent d03f862 commit ccbd1b9

14 files changed

+21
-32
lines changed

.editorconfig

-13
This file was deleted.

.eslintignore

-2
This file was deleted.

eslint.config.mjs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import appiumConfig from '@appium/eslint-config-appium-ts';
2+
3+
export default [
4+
...appiumConfig,
5+
];

lib/chromedriver.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import {
1212
getChromedriverBinaryPath,
1313
generateLogPrefix,
1414
} from './utils';
15-
import semver from 'semver';
15+
import * as semver from 'semver';
1616
import _ from 'lodash';
1717
import path from 'path';
1818
import {compareVersions} from 'compare-versions';
19-
import ChromedriverStorageClient from './storage-client/storage-client';
19+
import { ChromedriverStorageClient } from './storage-client/storage-client';
2020
import {toW3cCapNames, getCapValue} from './protocol-helpers';
2121

2222
const NEW_CD_VERSION_FORMAT_MAJOR_VERSION = 73;
@@ -839,7 +839,7 @@ export class Chromedriver extends events.EventEmitter {
839839
try {
840840
await B.promisify(cp.exec)(cmd);
841841
this.log.debug('Successfully cleaned up old chromedrivers');
842-
} catch (err) {
842+
} catch {
843843
this.log.warn('No old chromedrivers seem to exist');
844844
}
845845

@@ -878,7 +878,7 @@ export class Chromedriver extends events.EventEmitter {
878878
try {
879879
await this.jwproxy.command('/url', 'GET');
880880
return true;
881-
} catch (e) {
881+
} catch {
882882
return false;
883883
}
884884
}

lib/storage-client/chromelabs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import _ from 'lodash';
22
import path from 'path';
33
import {logger} from '@appium/support';
4-
import semver from 'semver';
4+
import * as semver from 'semver';
55
import {ARCH, CPU} from '../constants';
66

77
const log = logger.getLogger('ChromedriverChromelabsStorageClient');

lib/storage-client/googleapis.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import _ from 'lodash';
2-
import xpath from 'xpath';
2+
import {select as xpathSelect} from 'xpath';
33
import {util, logger} from '@appium/support';
44
import {retrieveData} from '../utils';
55
import B from 'bluebird';
@@ -99,7 +99,7 @@ export async function parseGoogleapiStorageXml(xml, shouldParseNotes = true) {
9999
const driverNodes = /** @type {Array<Node|Attr>} */ (
100100
// @ts-expect-error Misssing Node properties are not needed.
101101
// https://github.com/xmldom/xmldom/issues/724
102-
xpath.select(`//*[local-name(.)='Contents']`, doc)
102+
xpathSelect(`//*[local-name(.)='Contents']`, doc)
103103
);
104104
log.debug(`Parsed ${driverNodes.length} entries from storage XML`);
105105
if (_.isEmpty(driverNodes)) {

lib/storage-client/storage-client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
import {parseGoogleapiStorageXml} from './googleapis';
2222
import {parseKnownGoodVersionsWithDownloadsJson, parseLatestKnownGoodVersionsJson} from './chromelabs';
2323
import {compareVersions} from 'compare-versions';
24-
import semver from 'semver';
24+
import * as semver from 'semver';
2525

2626
const MAX_PARALLEL_DOWNLOADS = 5;
2727
const STORAGE_INFOS = /** @type {readonly StorageInfo[]} */ ([{

lib/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type ADB from 'appium-adb';
1+
import type { ADB } from 'appium-adb';
22

33
export interface ChromedriverOpts {
44
host?: string;

lib/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ const getOsInfo = _.memoize(
133133
}
134134
);
135135

136-
// @ts-expect-error
137-
// error TS2345: Argument of type '{}' is not assignable to parameter of type 'DriverOpts<Readonly<Record<string, Constraint>>>'
136+
// @ts-expect-error to avoid error
137+
// TS2345: Argument of type '{}' is not assignable to parameter of type 'DriverOpts<Readonly<Record<string, Constraint>>>'
138138
// Type '{}' is missing the following properties from type 'ServerArgs': address, allowCors, allowInsecure, basePath, and 26 more.
139139
const getBaseDriverInstance = _.memoize(() => new BaseDriver({}, false));
140140

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"e2e-test": "mocha --exit --timeout 10m \"./test/functional/**/*-specs.js\""
6868
},
6969
"devDependencies": {
70-
"@appium/eslint-config-appium-ts": "^0.x",
70+
"@appium/eslint-config-appium-ts": "^1.x",
7171
"@appium/test-support": "^3.0.0",
7272
"@appium/tsconfig": "^0.x",
7373
"@semantic-release/changelog": "^6.0.1",

test/functional/chromedriver-e2e-specs.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function nextState(cd) {
1717
function nextError(cd) {
1818
return new B((resolve) => {
1919
cd.on(Chromedriver.EVENT_ERROR, (err) => {
20-
// eslint-disable-line promise/prefer-await-to-callbacks
2120
resolve(err);
2221
});
2322
});
@@ -48,7 +47,7 @@ function buildReqRes(url, method, body) {
4847
send: (body) => {
4948
try {
5049
body = JSON.parse(body);
51-
} catch (e) {}
50+
} catch {}
5251
res.sentBody = body;
5352
},
5453
};

test/functional/storage-client-e2e-specs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ChromedriverStorageClient from '../../lib/storage-client/storage-client';
1+
import { ChromedriverStorageClient } from '../../lib/storage-client/storage-client';
22
import _ from 'lodash';
33
import { fs, tempDir } from '@appium/support';
44

test/helpers/install.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { fs, mkdirp } from '@appium/support';
2-
import ChromedriverStorageClient from '../../lib/storage-client/storage-client';
2+
import { ChromedriverStorageClient } from '../../lib/storage-client/storage-client';
33
import {
44
CD_VER, getOsInfo, getChromedriverDir,
55
} from '../../lib/utils';

test/unit/storage-client-specs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ChromedriverStorageClient from '../../lib/storage-client/storage-client';
1+
import { ChromedriverStorageClient } from '../../lib/storage-client/storage-client';
22
import _ from 'lodash';
33

44
describe('ChromedriverStorageClient', function () {

0 commit comments

Comments
 (0)