Skip to content

Commit a5d1825

Browse files
authored
[chore] fix type error, remove obsolete entry from turbo config (sveltejs#8089)
(latter hopefully fixes some wrong cache hits)
1 parent 53300c4 commit a5d1825

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

packages/kit/src/core/prerender/prerender.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ const [, , client_out_dir, manifest_path, results_path, verbose, env] = process.
2222
prerender();
2323

2424
/**
25-
* @template T
25+
* @template {{message: string}} T
26+
* @template {Omit<T, 'message'>} K
2627
* @param {import('types').Logger} log
2728
* @param {'fail' | 'warn' | 'ignore' | ((details: T) => void)} input
28-
* @param {(details: T) => string} format
29-
* @returns {(details: T) => void}
29+
* @param {(details: K) => string} format
30+
* @returns {(details: K) => void}
3031
*/
3132
function normalise_error_handler(log, input, format) {
3233
switch (input) {
@@ -41,6 +42,7 @@ function normalise_error_handler(log, input, format) {
4142
case 'ignore':
4243
return () => {};
4344
default:
45+
// @ts-expect-error TS thinks T might be of a different kind, but it's not
4446
return (details) => input({ ...details, message: format(details) });
4547
}
4648
}

turbo.json

+1-11
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
"env": ["VERCEL", "ENABLE_VC_BUILD"]
2323
},
2424
"check": {
25-
"dependsOn": ["prepare"],
2625
"inputs": [
2726
"index.js",
2827
"index.d.ts",
2928
"ambient.d.ts",
3029
"src/**",
30+
"source/**",
3131
"types/**",
3232
".svelte-kit/types/**",
3333
".custom-out-dir/types/**",
@@ -41,16 +41,6 @@
4141
"outputs": [],
4242
"outputMode": "new-only"
4343
},
44-
"prepare": {
45-
"inputs": ["src/**", "source/**"],
46-
"outputs": [
47-
".svelte-kit/types/**",
48-
".svelte-kit/tsconfig.json",
49-
".custom-out-dir/types/**",
50-
".custom-out-dir/tsconfig.json"
51-
],
52-
"outputMode": "new-only"
53-
},
5444
"test": {
5545
"dependsOn": ["^build"],
5646
"outputs": ["coverage/", "test-results/**"],

0 commit comments

Comments
 (0)