diff --git a/src/core-worker.ts b/src/core-worker.ts index ac1df477..19fba4b5 100644 --- a/src/core-worker.ts +++ b/src/core-worker.ts @@ -62,5 +62,4 @@ export class SerializableCore { return this.core.makeFixableAndFix(results, ruleIds, fixableMaker); } } - -expose(SerializableCore, nodeEndpoint(parentPort)); +expose(SerializableCore, nodeEndpoint.default(parentPort)); diff --git a/src/index.ts b/src/index.ts index d2fb732a..d00dca4f 100755 --- a/src/index.ts +++ b/src/index.ts @@ -34,7 +34,7 @@ export async function run(options: Options) { // Directly executing the Core API will hog the main thread and halt the spinner. // So we wrap it with comlink and run it on the Worker. const worker = new Worker(join(__dirname, 'core-worker.js')); - const ProxiedCore = wrap(nodeEndpoint(worker)); + const ProxiedCore = wrap(nodeEndpoint.default(worker)); const core = await new ProxiedCore(config); let nextScene: NextScene = { name: 'lint' }; diff --git a/tsconfig.base.json b/tsconfig.base.json index 1e2fbe0c..7c141e03 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,7 +15,7 @@ /* Module Options */ "module": "node12", "moduleResolution": "node12", - "esModuleInterop": true, // CommonJS モジュールを `import _ from 'commonjs'` で import できるように + "esModuleInterop": false, // `"module": "node12"` との相性が悪いので off にする "resolveJsonModule": true, // import した json の型を推論するように "forceConsistentCasingInFileNames": true, // 大文字小文字を区別しない環境 (win) でも unix と同じように区別する