Skip to content

Commit a97bcb5

Browse files
committed
Enable TS esModuleInterop
Required to use latest versions of adbkit, but also it seems like matching correct ES requirements is probably the way to go long term if we want to keep up with the JS ecosystem.
1 parent 7da1323 commit a97bcb5

34 files changed

+47
-48
lines changed

pack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as path from 'path';
22
import * as fs from 'fs-extra';
3-
import * as _ from 'lodash';
3+
import _ from 'lodash';
44
import { spawn as spawnAsync, SpawnOptions } from 'child_process';
55

66
const OUTPUT_DIR = path.join(__dirname, 'build');

prepare.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as path from 'path';
22
import type { Stats } from 'fs';
33
import * as fs from 'fs/promises';
4-
import * as klaw from 'klaw';
4+
import klaw from 'klaw';
55
import { spawn as spawnAsync, SpawnOptions } from 'child_process';
66

77
const spawn = (command: string, args: string[] = [], options: SpawnOptions = {}) => {
@@ -17,12 +17,11 @@ const spawn = (command: string, args: string[] = [], options: SpawnOptions = {})
1717
}
1818

1919
const collectAsyncIterator = async (asyncIterator: any) => {
20-
const result = [];
20+
const result: any[] = [];
2121
for await (const value of asyncIterator) result.push(value);
2222
return result;
2323
}
2424

25-
2625
const OVERRIDES_DIR = path.join(__dirname, 'overrides');
2726

2827
(async () => {

src/api-server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as _ from 'lodash';
1+
import _ from 'lodash';
22
import * as os from 'os';
33
import * as events from 'events';
4-
import * as express from 'express';
5-
import * as cors from 'cors';
6-
import corsGate = require('cors-gate');
4+
import express from 'express';
5+
import cors from 'cors';
6+
import corsGate from 'cors-gate';
77
import { makeExecutableSchema } from '@graphql-tools/schema';
88
import { GraphQLScalarType } from 'graphql';
99
import { graphqlHTTP } from 'express-graphql';

src/browsers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as path from 'path';
22
import { promisify } from 'util';
33

4-
import * as getBrowserLauncherCb from '@httptoolkit/browser-launcher';
4+
import getBrowserLauncherCb from '@httptoolkit/browser-launcher';
55
import {
66
LaunchOptions,
77
Launch,

src/dns-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from 'lodash';
1+
import _ from 'lodash';
22
import * as dns2 from 'dns2';
33

44
const DNS_SERVER_MAP: { [mockServerPort: number]: Promise<DnsServer> | undefined } = {};

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as path from 'path';
22
import * as fs from 'fs';
3-
import * as envPaths from 'env-paths';
3+
import envPaths from 'env-paths';
44
import { Mutex } from 'async-mutex';
55

66
import {

src/interceptors/android/android-adb-interceptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from 'lodash';
1+
import _ from 'lodash';
22
import * as os from 'os';
33

44
import { Interceptor } from '..';

src/interceptors/chromium-based-interceptors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as _ from 'lodash';
1+
import _ from 'lodash';
22
import { generateSPKIFingerprint } from 'mockttp';
33

44
import { HtkConfig } from '../config';

src/interceptors/docker/docker-build-injection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as _ from 'lodash';
1+
import _ from 'lodash';
22
import * as path from 'path';
33
import * as stream from 'stream';
44
import * as EventStream from 'event-stream';
5-
import * as getRawBody from 'raw-body';
5+
import getRawBody from 'raw-body';
66
import maybeGunzip = require('gunzip-maybe');
77
import * as tarStream from 'tar-stream';
88
import { parse as parseDockerfile, CommandEntry } from 'docker-file-parser';

src/interceptors/docker/docker-commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as _ from 'lodash';
2-
import * as Docker from 'dockerode';
1+
import _ from 'lodash';
2+
import Docker from 'dockerode';
33
import * as path from 'path';
44

55
import { delay } from '../../util/promise';

0 commit comments

Comments
 (0)