Skip to content

Commit 579cadd

Browse files
committed
Using esModuleInterop typescript flag for all modules
1 parent 6320179 commit 579cadd

File tree

8 files changed

+31
-15
lines changed

8 files changed

+31
-15
lines changed

package-lock.json

+22-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/example/src/workerExample.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
ItemRequest,
77
SourceRequest,
88
} from "@watchedcom/sdk";
9-
import * as request from "supertest";
9+
import request from "supertest";
1010
import {
1111
EXAMPLE_ITEMS,
1212
EXAMPLE_SOURCES,

packages/schema/src/helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Ajv from "ajv";
1+
import Ajv from "ajv";
22

33
export interface SchemaOptions {
44
schema: any;

packages/sdk/src/cache/errors.ts

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export class IgnoreCacheError extends Error {}
1313
export class SetResultError<T> extends Error {
1414
constructor(public forceResult: T) {
1515
super("SetResultError");
16-
this.forceResult = forceResult;
1716
}
1817
}
1918

packages/sdk/src/utils/request-recorder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,6 @@ export const replayRecordFile = async (
148148
silent: boolean = false
149149
) => {
150150
const myEngine = Array.isArray(engine) ? createEngine(engine) : engine;
151-
const recordData: RecordData[] = await import(getPath(recordPath));
151+
const recordData: RecordData[] = (await import(getPath(recordPath))).default;
152152
await replayRecordData(myEngine, recordData, ids, silent);
153153
};

packages/sdk/tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "dist",
5-
"esModuleInterop": true
4+
"outDir": "dist"
65
},
7-
"include": ["src/index.ts", "src/scripts/**/*.ts"]
6+
"include": ["src/index.ts"]
87
}

packages/test/src/testAddon.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import {
2222
WorkerAddonClass,
2323
WorkerAddonResourceActions,
2424
} from "@watchedcom/sdk";
25-
import * as assert from "assert";
26-
import * as request from "supertest";
25+
import assert from "assert";
26+
import request from "supertest";
2727

2828
export class AddonTest {
2929
public readonly app: request.SuperTest<request.Test>;

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"module": "commonjs",
55
"target": "es2019",
66
"declaration": true,
7-
"strictNullChecks": true
7+
"strictNullChecks": true,
8+
"esModuleInterop": true
89
}
910
}

0 commit comments

Comments
 (0)