From 2fcd979104f537ce0e5817f397d2b4fc2dc5aefd Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 2 Jan 2024 20:19:08 -0800 Subject: [PATCH] fix: modulResolution mode for jest --- packages/@eventual/compiler/package.json | 6 +++--- packages/@eventual/compiler/src/eventual-infer.ts | 1 + packages/@eventual/compiler/tsconfig.test.json | 5 +---- packages/@eventual/core-runtime/package.json | 4 ++++ packages/@eventual/core-runtime/tsconfig.test.json | 6 ++---- packages/@eventual/core/package.json | 6 ++---- packages/@eventual/core/tsconfig.json | 2 +- packages/@eventual/testing/tsconfig.test.json | 4 +--- tsconfig-base.test.json | 5 ++++- 9 files changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/@eventual/compiler/package.json b/packages/@eventual/compiler/package.json index 83da1b95..0085d335 100644 --- a/packages/@eventual/compiler/package.json +++ b/packages/@eventual/compiler/package.json @@ -1,6 +1,9 @@ { "name": "@eventual/compiler", "version": "0.57.0", + "type": "module", + "module": "lib/index.js", + "types:": "lib/index.d.ts", "bin": { "eventual-bundle": "./bin/eventual-bundle.mjs", "eventual-infer": "./bin/eventual-infer.mjs" @@ -16,9 +19,6 @@ "require": "./bin/eventual-infer.mjs" } }, - "type": "module", - "module": "./lib/index.js", - "types:": "lib/index.d.ts", "files": [ "bin", "lib" diff --git a/packages/@eventual/compiler/src/eventual-infer.ts b/packages/@eventual/compiler/src/eventual-infer.ts index 74acd54c..d9fcc69c 100644 --- a/packages/@eventual/compiler/src/eventual-infer.ts +++ b/packages/@eventual/compiler/src/eventual-infer.ts @@ -12,6 +12,7 @@ import { type QueueSpec, type ServiceSpec, } from "@eventual/core/internal"; + import { CallExpression, ExportDeclaration, diff --git a/packages/@eventual/compiler/tsconfig.test.json b/packages/@eventual/compiler/tsconfig.test.json index 034460a6..b646c8d2 100644 --- a/packages/@eventual/compiler/tsconfig.test.json +++ b/packages/@eventual/compiler/tsconfig.test.json @@ -3,12 +3,9 @@ "compilerOptions": { "rootDir": ".", "noEmit": true, - "module": "NodeNext", - "target": "ESNext", - "moduleResolution": "NodeNext", "allowJs": true }, "include": ["src", "test"], "exclude": ["lib", "node_modules"], - "references": [{ "path": "../core" }] + "references": [{ "path": "../core/tsconfig.json" }] } diff --git a/packages/@eventual/core-runtime/package.json b/packages/@eventual/core-runtime/package.json index c9a9ecfc..98d2d409 100644 --- a/packages/@eventual/core-runtime/package.json +++ b/packages/@eventual/core-runtime/package.json @@ -37,6 +37,10 @@ "node_modules", "src" ], + "transformIgnorePatterns": [ + "node_modules/", + "node_modules/@eventual/core" + ], "moduleNameMapper": { "^(\\.{1,2}/.*)\\.js$": "$1" }, diff --git a/packages/@eventual/core-runtime/tsconfig.test.json b/packages/@eventual/core-runtime/tsconfig.test.json index 0d0100a5..663decf3 100644 --- a/packages/@eventual/core-runtime/tsconfig.test.json +++ b/packages/@eventual/core-runtime/tsconfig.test.json @@ -1,11 +1,9 @@ { - "extends": "../../../tsconfig-base", + "extends": "../../../tsconfig-base.test.json", "compilerOptions": { "rootDir": ".", "noEmit": true, - "allowJs": true, - "module": "NodeNext", - "moduleResolution": "NodeNext" + "allowJs": true }, "include": ["src", "test"], "exclude": ["lib", "node_modules"], diff --git a/packages/@eventual/core/package.json b/packages/@eventual/core/package.json index 49c5d8cc..5abf8723 100644 --- a/packages/@eventual/core/package.json +++ b/packages/@eventual/core/package.json @@ -1,6 +1,8 @@ { "name": "@eventual/core", "version": "0.57.0", + "type": "module", + "module": "./lib/index.js", "exports": { ".": { "import": "./lib/index.js" @@ -12,11 +14,7 @@ "import": "./lib/constants.js" } }, - "type": "module", - "module": "./lib/index.js", "files": [ - "constants", - "internal", "lib" ], "scripts": { diff --git a/packages/@eventual/core/tsconfig.json b/packages/@eventual/core/tsconfig.json index 26d7d7c5..064f4d74 100644 --- a/packages/@eventual/core/tsconfig.json +++ b/packages/@eventual/core/tsconfig.json @@ -4,7 +4,7 @@ "rootDir": "src", "outDir": "lib" }, - "include": ["src", "src/internal/result.ts"], + "include": ["src"], "exclude": ["lib", "node_modules"], "references": [] } diff --git a/packages/@eventual/testing/tsconfig.test.json b/packages/@eventual/testing/tsconfig.test.json index ffd5aebf..6b88329c 100644 --- a/packages/@eventual/testing/tsconfig.test.json +++ b/packages/@eventual/testing/tsconfig.test.json @@ -3,9 +3,7 @@ "compilerOptions": { "rootDir": ".", "noEmit": true, - "allowJs": true, - "module": "NodeNext", - "moduleResolution": "NodeNext" + "allowJs": true }, "include": ["src", "test"], "exclude": ["lib", "node_modules"], diff --git a/tsconfig-base.test.json b/tsconfig-base.test.json index 252731a6..15966a6c 100644 --- a/tsconfig-base.test.json +++ b/tsconfig-base.test.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig-base.json", "compilerOptions": { - "typeRoots": ["./node_modules/@types"] + "typeRoots": ["./node_modules/@types"], + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "Bundler" } }