Skip to content

Commit 6e8329d

Browse files
authored
chore: Update dev dependencies (#358)
1 parent fe82b02 commit 6e8329d

Some content is hidden

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

45 files changed

+365
-1063
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,22 @@
4646
},
4747
"devDependencies": {
4848
"@ionic/eslint-config": "^0.3.0",
49-
"@ionic/prettier-config": "^1.0.1",
50-
"@semantic-release/changelog": "^6.0.1",
49+
"@ionic/prettier-config": "^4.0.0",
50+
"@semantic-release/changelog": "^6.0.3",
5151
"@semantic-release/git": "^10.0.1",
5252
"@types/babel__traverse": "7.17.1",
53-
"@types/debug": "^4.1.7",
54-
"@types/elementtree": "^0.1.1",
55-
"@types/ini": "^1.3.31",
53+
"@types/debug": "^4.1.10",
54+
"@types/elementtree": "^0.1.3",
55+
"@types/ini": "^1.3.32",
5656
"@types/jest": "^26.0.13",
5757
"@types/node": "^16.0.0",
58-
"@types/plist": "^3.0.2",
59-
"@types/split2": "^3.2.1",
60-
"@types/through2": "^2.0.34",
61-
"@types/yauzl": "^2.10.0",
58+
"@types/plist": "^3.0.4",
59+
"@types/split2": "^4.2.2",
60+
"@types/through2": "^2.0.40",
61+
"@types/yauzl": "^2.10.2",
6262
"eslint": "^7.8.1",
6363
"jest": "^26.4.2",
64-
"prettier": "^2.2.1",
64+
"prettier": "^3.0.3",
6565
"semantic-release": "^19.0.5",
6666
"ts-jest": "^26.3.0",
6767
"typescript": "~4.1.2"

src/android/run.ts

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@ import {
2626
} from './utils/adb';
2727
import { getApkInfo } from './utils/apk';
2828
import { getInstalledAVDs } from './utils/avd';
29-
import {
30-
installApkToDevice,
31-
selectDeviceByTarget,
32-
selectHardwareDevice,
33-
selectVirtualDevice,
34-
} from './utils/run';
29+
import { installApkToDevice, selectDeviceByTarget, selectHardwareDevice, selectVirtualDevice } from './utils/run';
3530
import type { SDK } from './utils/sdk';
3631
import { getSDK } from './utils/sdk';
3732

@@ -49,9 +44,7 @@ export async function run(args: readonly string[]): Promise<void> {
4944
const [device, host] = port.split(':');
5045

5146
if (!device || !host) {
52-
throw new CLIException(
53-
`Invalid --forward value "${port}": expecting <device port:host port>, e.g. 8080:8080`,
54-
);
47+
throw new CLIException(`Invalid --forward value "${port}": expecting <device port:host port>, e.g. 8080:8080`);
5548
}
5649

5750
ports.push({ device, host });
@@ -64,11 +57,7 @@ export async function run(args: readonly string[]): Promise<void> {
6457

6558
const device = await selectDevice(sdk, args);
6659

67-
log(
68-
`Selected ${device.type === 'hardware' ? 'hardware device' : 'emulator'} ${
69-
device.serial
70-
}\n`,
71-
);
60+
log(`Selected ${device.type === 'hardware' ? 'hardware device' : 'emulator'} ${device.serial}\n`);
7261

7362
const { appId, activityName } = await getApkInfo(apkPath);
7463
await waitForBoot(sdk, device);
@@ -109,10 +98,7 @@ export async function run(args: readonly string[]): Promise<void> {
10998
}
11099
}
111100

112-
export async function selectDevice(
113-
sdk: SDK,
114-
args: readonly string[],
115-
): Promise<Device> {
101+
export async function selectDevice(sdk: SDK, args: readonly string[]): Promise<Device> {
116102
const debug = Debug(`${modulePrefix}:${selectDevice.name}`);
117103

118104
const devices = await getDevices(sdk);
@@ -127,10 +113,7 @@ export async function selectDevice(
127113
if (targetDevice) {
128114
return targetDevice;
129115
} else {
130-
throw new AndroidRunException(
131-
`Target not found: ${target}`,
132-
ERR_TARGET_NOT_FOUND,
133-
);
116+
throw new AndroidRunException(`Target not found: ${target}`, ERR_TARGET_NOT_FOUND);
134117
}
135118
}
136119

@@ -166,8 +149,5 @@ export async function selectDevice(
166149
}
167150
}
168151

169-
throw new AndroidRunException(
170-
'No target devices/emulators available.',
171-
ERR_NO_TARGET,
172-
);
152+
throw new AndroidRunException('No target devices/emulators available.', ERR_NO_TARGET);
173153
}

src/android/sdk-info.ts

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ export async function run(args: readonly string[]): Promise<void> {
1818
const sdk = await getSDK();
1919
const packages = await findAllSDKPackages(sdk);
2020
const apis = await getAPILevels(packages);
21-
const platforms = apis.map(api => {
21+
const platforms = apis.map((api) => {
2222
return { ...api };
2323
});
2424

2525
const sdkinfo: SDKInfo = {
2626
root: sdk.root,
2727
avdHome: sdk.avdHome,
2828
platforms,
29-
tools: packages.filter(pkg => typeof pkg.apiLevel === 'undefined'),
29+
tools: packages.filter((pkg) => typeof pkg.apiLevel === 'undefined'),
3030
};
3131

3232
if (args.includes('--json')) {
@@ -40,32 +40,22 @@ export async function run(args: readonly string[]): Promise<void> {
4040
function formatSDKInfo(sdk: SDKInfo): string {
4141
return `
4242
SDK Location: ${sdk.root}
43-
AVD Home${
44-
sdk.avdHome ? `: ${sdk.avdHome}` : ` (!): not found`
45-
}
43+
AVD Home${sdk.avdHome ? `: ${sdk.avdHome}` : ` (!): not found`}
4644
47-
${sdk.platforms.map(platform => `${formatPlatform(platform)}\n\n`).join('\n')}
45+
${sdk.platforms.map((platform) => `${formatPlatform(platform)}\n\n`).join('\n')}
4846
Tools:
4947
50-
${sdk.tools.map(tool => formatPackage(tool)).join('\n')}
48+
${sdk.tools.map((tool) => formatPackage(tool)).join('\n')}
5149
`.trim();
5250
}
5351

5452
function formatPlatform(platform: Platform): string {
5553
return `
5654
API Level: ${platform.apiLevel}
57-
Packages: ${platform.packages
58-
.map(p => formatPackage(p))
59-
.join('\n' + ' '.repeat(22))}
55+
Packages: ${platform.packages.map((p) => formatPackage(p)).join('\n' + ' '.repeat(22))}
6056
`.trim();
6157
}
6258

63-
function formatPackage(p: {
64-
name: string;
65-
path: string;
66-
version?: string | RegExp;
67-
}): string {
68-
return `${p.name} ${p.path} ${
69-
typeof p.version === 'string' ? p.version : ''
70-
}`;
59+
function formatPackage(p: { name: string; path: string; version?: string | RegExp }): string {
60+
return `${p.name} ${p.path} ${typeof p.version === 'string' ? p.version : ''}`;
7161
}

src/android/utils/__tests__/avd.ts

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ import * as avdUtils from '../avd';
66
describe('android/utils/avd', () => {
77
describe('getAVDFromINI', () => {
88
it('should properly parse Pixel_2_API_28', async () => {
9-
const inipath = path.resolve(
10-
__dirname,
11-
'./fixtures/avd/Pixel_2_API_28.ini',
12-
);
9+
const inipath = path.resolve(__dirname, './fixtures/avd/Pixel_2_API_28.ini');
1310
const ini: any = await iniUtils.readINI(inipath);
1411
ini.path = path.resolve(__dirname, './fixtures/avd/Pixel_2_API_28.avd'); // patch path
1512

@@ -28,15 +25,9 @@ describe('android/utils/avd', () => {
2825
});
2926

3027
it('should properly parse Pixel_2_XL_API_28', async () => {
31-
const inipath = path.resolve(
32-
__dirname,
33-
'./fixtures/avd/Pixel_2_XL_API_28.ini',
34-
);
28+
const inipath = path.resolve(__dirname, './fixtures/avd/Pixel_2_XL_API_28.ini');
3529
const ini: any = await iniUtils.readINI(inipath);
36-
ini.path = path.resolve(
37-
__dirname,
38-
'./fixtures/avd/Pixel_2_XL_API_28.avd',
39-
); // patch path
30+
ini.path = path.resolve(__dirname, './fixtures/avd/Pixel_2_XL_API_28.avd'); // patch path
4031

4132
const expected = {
4233
id: 'Pixel_2_XL_API_28',
@@ -53,10 +44,7 @@ describe('android/utils/avd', () => {
5344
});
5445

5546
it('should properly parse Pixel_API_25', async () => {
56-
const inipath = path.resolve(
57-
__dirname,
58-
'./fixtures/avd/Pixel_API_25.ini',
59-
);
47+
const inipath = path.resolve(__dirname, './fixtures/avd/Pixel_API_25.ini');
6048
const ini: any = await iniUtils.readINI(inipath);
6149
ini.path = path.resolve(__dirname, './fixtures/avd/Pixel_API_25.avd'); // patch path
6250

@@ -75,10 +63,7 @@ describe('android/utils/avd', () => {
7563
});
7664

7765
it('should properly parse Nexus_5X_API_24', async () => {
78-
const inipath = path.resolve(
79-
__dirname,
80-
'./fixtures/avd/Nexus_5X_API_24.ini',
81-
);
66+
const inipath = path.resolve(__dirname, './fixtures/avd/Nexus_5X_API_24.ini');
8267
const ini: any = await iniUtils.readINI(inipath);
8368
ini.path = path.resolve(__dirname, './fixtures/avd/Nexus_5X_API_24.avd'); // patch path
8469

@@ -97,10 +82,7 @@ describe('android/utils/avd', () => {
9782
});
9883

9984
it('should properly parse avdmanager_1', async () => {
100-
const inipath = path.resolve(
101-
__dirname,
102-
'./fixtures/avd/avdmanager_1.ini',
103-
);
85+
const inipath = path.resolve(__dirname, './fixtures/avd/avdmanager_1.ini');
10486
const ini: any = await iniUtils.readINI(inipath);
10587
ini.path = path.resolve(__dirname, './fixtures/avd/avdmanager_1.avd'); // patch path
10688

src/android/utils/__tests__/emulator.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ describe('android/utils/emulator', () => {
2727
});
2828

2929
it('should parse response from output', () => {
30-
const expected =
31-
authRequiredOutput.split('\n').slice(0, -2).join('\n') + '\n';
30+
const expected = authRequiredOutput.split('\n').slice(0, -2).join('\n') + '\n';
3231
const event = parseAndroidConsoleResponse(authRequiredOutput);
3332
expect(event).toBe(expected);
3433
});

0 commit comments

Comments
 (0)