From 6f5afaad69f9eba36cf7fd682de90fbb7e4f09a1 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 30 May 2024 14:07:42 -0700 Subject: [PATCH] chore: expand tsconfig coverage --- packages/adapter-static/tsconfig.json | 2 +- packages/amp/package.json | 4 ++++ packages/amp/tsconfig.json | 12 ++++++++++++ packages/kit/kit.vitest.config.js | 6 +++++- packages/kit/tsconfig.json | 2 +- packages/migrate/tsconfig.json | 3 +-- packages/package/test/watch/svelte.config.js | 6 +----- packages/package/tsconfig.json | 4 ++-- pnpm-lock.yaml | 4 ++++ 9 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 packages/amp/tsconfig.json diff --git a/packages/adapter-static/tsconfig.json b/packages/adapter-static/tsconfig.json index 1723393334d7..dafbce422a39 100644 --- a/packages/adapter-static/tsconfig.json +++ b/packages/adapter-static/tsconfig.json @@ -13,5 +13,5 @@ "@sveltejs/kit": ["../kit/types/index"] } }, - "include": ["index.js"] + "include": ["index.js", "test/utils.js"] } diff --git a/packages/amp/package.json b/packages/amp/package.json index 87926d822f8b..7b62a10e93e4 100644 --- a/packages/amp/package.json +++ b/packages/amp/package.json @@ -23,9 +23,13 @@ "index.d.ts" ], "scripts": { + "check": "tsc", "lint": "prettier --check .", "format": "pnpm lint --write" }, + "devDependencies": { + "typescript": "^5.3.3" + }, "peerDependencies": { "@sveltejs/kit": "^1.0.0 || ^2.0.0" } diff --git a/packages/amp/tsconfig.json b/packages/amp/tsconfig.json new file mode 100644 index 000000000000..26885cff272f --- /dev/null +++ b/packages/amp/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "noEmit": true, + "strict": true, + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", + "allowSyntheticDefaultImports": true + } +} diff --git a/packages/kit/kit.vitest.config.js b/packages/kit/kit.vitest.config.js index 189f9828fc39..dfcf36d5f638 100644 --- a/packages/kit/kit.vitest.config.js +++ b/packages/kit/kit.vitest.config.js @@ -5,7 +5,11 @@ export default defineConfig({ test: { // shave a couple seconds off the tests isolate: false, - singleThread: true, + poolOptions: { + threads: { + singleThread: true + } + }, include: ['src/**/*.spec.js'], exclude: [ '**/node_modules/**', diff --git a/packages/kit/tsconfig.json b/packages/kit/tsconfig.json index 8425dc63819c..0b7f9d49aa6d 100644 --- a/packages/kit/tsconfig.json +++ b/packages/kit/tsconfig.json @@ -18,7 +18,7 @@ "noUnusedParameters": true }, "include": [ - "postinstall.js", + "*.js", "scripts/**/*", "src/**/*", "src/types/**/*", diff --git a/packages/migrate/tsconfig.json b/packages/migrate/tsconfig.json index 26ec8077781d..26885cff272f 100644 --- a/packages/migrate/tsconfig.json +++ b/packages/migrate/tsconfig.json @@ -8,6 +8,5 @@ "module": "node16", "moduleResolution": "node16", "allowSyntheticDefaultImports": true - }, - "include": ["./migrations/**/*", "./utils.js", "./bin.js"] + } } diff --git a/packages/package/test/watch/svelte.config.js b/packages/package/test/watch/svelte.config.js index 6bd253bdf27d..ff8b4c56321a 100644 --- a/packages/package/test/watch/svelte.config.js +++ b/packages/package/test/watch/svelte.config.js @@ -1,5 +1 @@ -import preprocess from 'svelte-preprocess'; - -export default { - preprocess: preprocess() -}; +export default {}; diff --git a/packages/package/tsconfig.json b/packages/package/tsconfig.json index c9e5965e3660..74972a20c243 100644 --- a/packages/package/tsconfig.json +++ b/packages/package/tsconfig.json @@ -13,6 +13,6 @@ "types": ["./types/index"] } }, - "include": ["src/**/*", "test/index.js", "types/**/*"], - "exclude": ["src/test/fixtures/**/*", "src/test/watch/**/*"] + "include": ["*.js", "src/**/*", "test/index.js", "types/**/*"], + "exclude": ["test/fixtures/**/*"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f2e50f1a6f32..325b88868489 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -296,6 +296,10 @@ importers: '@sveltejs/kit': specifier: ^1.0.0 || ^2.0.0 version: link:../kit + devDependencies: + typescript: + specifier: ^5.3.3 + version: 5.4.5 packages/create-svelte: dependencies: