diff --git a/playgrounds/package-lock.json b/playgrounds/package-lock.json index 3304ec0e..4d8e92e3 100644 --- a/playgrounds/package-lock.json +++ b/playgrounds/package-lock.json @@ -25,7 +25,7 @@ } }, "..": { - "version": "5.6.8", + "version": "5.7.0", "license": "MIT", "dependencies": { "@vitest/snapshot": "^4.1.7", diff --git a/tsconfig.build.json b/tsconfig.build.json index 61c12db8..5d222b63 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,7 +1,13 @@ { "extends": "./tsconfig.json", - "exclude": [ - // Warning: not excluding test folder change the release folder root structure - "./test/**/*.ts" + "compilerOptions": { + "module": "nodenext", // Required to trap missing extension on import + "outDir": "./lib/", + "rootDir": "./src", + "tsBuildInfoFile": "./lib/tsconfig.build.tsbuildinfo", + "moduleResolution": "nodenext" // Required to trap missing extension on import + }, + "include": [ + "./src/**/*.ts" ] -} \ No newline at end of file +} diff --git a/tsconfig.json b/tsconfig.json index 89716bf2..324a22b7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,11 @@ /** * Let's aligned with the WebdriverIO tsconfig.json. * @see https://github.com/webdriverio/webdriverio/blob/main/tsconfig.json#L5 + * + * This configuration is for test and src files, for the build, see the tsconfig.build.json. + * */ "compilerOptions": { - "outDir": "./lib/", "module": "esnext", "target": "es2022", "lib": ["ES2022", "DOM"], @@ -14,7 +16,7 @@ "skipLibCheck": true, "strictPropertyInitialization": true, "strictNullChecks": true, - "moduleResolution": "bundler", + "moduleResolution": "bundler", // Can use bundler and omit file extension in test code. "allowSyntheticDefaultImports": true, "types": [ "node", @@ -22,7 +24,8 @@ ] }, "include": [ + "./src/**/*.ts", + "__mocks__/**/*.ts", "./test/**/*.ts", - "./src/**/*.ts" ] } diff --git a/vitest.config.ts b/vitest.config.ts index 1c7cd458..ce26f718 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -29,10 +29,10 @@ export default defineConfig({ 'types-checks-filter-out-node_modules.js', ], thresholds: { - lines: 88.4, - functions: 86.7, - statements: 88.3, - branches: 80.8, + lines: 89.7, + functions: 88.4, + statements: 89.6, + branches: 81.8, } } }