Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump @appium/eslint-config-appium-ts from 0.3.3 to 1.0.1 #451

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

5 changes: 5 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import appiumConfig from '@appium/eslint-config-appium-ts';

export default [
...appiumConfig,
];
8 changes: 4 additions & 4 deletions lib/chromedriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import {
getChromedriverBinaryPath,
generateLogPrefix,
} from './utils';
import semver from 'semver';
import * as semver from 'semver';
import _ from 'lodash';
import path from 'path';
import {compareVersions} from 'compare-versions';
import ChromedriverStorageClient from './storage-client/storage-client';
import { ChromedriverStorageClient } from './storage-client/storage-client';
import {toW3cCapNames, getCapValue} from './protocol-helpers';

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

Expand Down Expand Up @@ -878,7 +878,7 @@ export class Chromedriver extends events.EventEmitter {
try {
await this.jwproxy.command('/url', 'GET');
return true;
} catch (e) {
} catch {
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/storage-client/chromelabs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'lodash';
import path from 'path';
import {logger} from '@appium/support';
import semver from 'semver';
import * as semver from 'semver';
import {ARCH, CPU} from '../constants';

const log = logger.getLogger('ChromedriverChromelabsStorageClient');
Expand Down
4 changes: 2 additions & 2 deletions lib/storage-client/googleapis.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import xpath from 'xpath';
import {select as xpathSelect} from 'xpath';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could also be done as import * as xpath from 'xpath'

import {util, logger} from '@appium/support';
import {retrieveData} from '../utils';
import B from 'bluebird';
Expand Down Expand Up @@ -99,7 +99,7 @@ export async function parseGoogleapiStorageXml(xml, shouldParseNotes = true) {
const driverNodes = /** @type {Array<Node|Attr>} */ (
// @ts-expect-error Misssing Node properties are not needed.
// https://github.com/xmldom/xmldom/issues/724
xpath.select(`//*[local-name(.)='Contents']`, doc)
xpathSelect(`//*[local-name(.)='Contents']`, doc)
);
log.debug(`Parsed ${driverNodes.length} entries from storage XML`);
if (_.isEmpty(driverNodes)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/storage-client/storage-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import {parseGoogleapiStorageXml} from './googleapis';
import {parseKnownGoodVersionsWithDownloadsJson, parseLatestKnownGoodVersionsJson} from './chromelabs';
import {compareVersions} from 'compare-versions';
import semver from 'semver';
import * as semver from 'semver';

const MAX_PARALLEL_DOWNLOADS = 5;
const STORAGE_INFOS = /** @type {readonly StorageInfo[]} */ ([{
Expand Down
2 changes: 1 addition & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type ADB from 'appium-adb';
import type { ADB } from 'appium-adb';

export interface ChromedriverOpts {
host?: string;
Expand Down
4 changes: 2 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ const getOsInfo = _.memoize(
}
);

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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"e2e-test": "mocha --exit --timeout 10m \"./test/functional/**/*-specs.js\""
},
"devDependencies": {
"@appium/eslint-config-appium-ts": "^0.x",
"@appium/eslint-config-appium-ts": "^1.x",
"@appium/test-support": "^3.0.0",
"@appium/tsconfig": "^0.x",
"@semantic-release/changelog": "^6.0.1",
Expand Down
3 changes: 1 addition & 2 deletions test/functional/chromedriver-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function nextState(cd) {
function nextError(cd) {
return new B((resolve) => {
cd.on(Chromedriver.EVENT_ERROR, (err) => {
// eslint-disable-line promise/prefer-await-to-callbacks
resolve(err);
});
});
Expand Down Expand Up @@ -48,7 +47,7 @@ function buildReqRes(url, method, body) {
send: (body) => {
try {
body = JSON.parse(body);
} catch (e) {}
} catch {}
res.sentBody = body;
},
};
Expand Down
2 changes: 1 addition & 1 deletion test/functional/storage-client-e2e-specs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ChromedriverStorageClient from '../../lib/storage-client/storage-client';
import { ChromedriverStorageClient } from '../../lib/storage-client/storage-client';
import _ from 'lodash';
import { fs, tempDir } from '@appium/support';

Expand Down
2 changes: 1 addition & 1 deletion test/helpers/install.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fs, mkdirp } from '@appium/support';
import ChromedriverStorageClient from '../../lib/storage-client/storage-client';
import { ChromedriverStorageClient } from '../../lib/storage-client/storage-client';
import {
CD_VER, getOsInfo, getChromedriverDir,
} from '../../lib/utils';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/storage-client-specs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ChromedriverStorageClient from '../../lib/storage-client/storage-client';
import { ChromedriverStorageClient } from '../../lib/storage-client/storage-client';
import _ from 'lodash';

describe('ChromedriverStorageClient', function () {
Expand Down
Loading