@sveltejs/kit 2.70.3 -> 3.1.0, @sveltejs/adapter-static 3.0.10 -> 4.0.0. Closes GHSA-27mw-82g8-phjj and GHSA-pfhg-q3qv-9q6r (dismissed in v4.4.1 as not applicable), and drops the cookie override kit 2 needed: npm audit reports nothing. - Config: svelte.config.js is refused by kit 3. Its options are now sveltekitConfig(tauri) in build/sveltekit-config.ts, passed by vite.config.ts as sveltekit(sveltekitConfig(IS_TAURI)), with tests for both CSP flavours, paths.relative, the sitemap entry and the prerender 404 handler. The unused, now-deprecated "@" alias and typescript.config hook are gone; tsconfig.json extends $app/tsconfig and owns `include`. - $lib -> #lib (package.json imports), with .js on module imports. tsconfig repeats the mapping in `paths`: svelte-check --tsgo only maps .svelte imports through `paths`, and without it every #lib component fell back to the *.svelte shim (props unchecked; proven with a planted error). - Param matchers: src/params/legaldoc.ts -> src/params.ts (defineParams). vite build imports that file with Node's own import(), so it imports #lib/legal.ts and legal.ts imports ./schema.ts by their real names. - PWA: @vite-pwa/sveltekit never supported kit 3 and wrote the worker when the SERVER build closed, which kit 3's environment build does first. build/pwa.ts wires vite-plugin-pwa in a buildApp hook after kit's prerender and before its adapter, with the same globs and URL mapping. - goto options renamed (replace, reset: false, refreshAll); the /games filter write is a shallow goto; a legacy /#/ path that matches no route falls back to location.replace (kit 3's goto rejects it). Hook types from @sveltejs/kit/hooks; the client handleError returns nothing to keep kit's message. - runed 0.35 (bits-ui) peers kit ^2: overridden to our kit, as for echarts-wordcloud. Verified against a kit 2 build of the same commit: same 11,037 files bar hashed chunks, same non-immutable precache URLs, navigateFallback "/", identical CSP per page (hashes masked), manifest and sitemap byte-equal, same visible text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
2.1 KiB
JSON
41 lines
2.1 KiB
JSON
{
|
|
// SvelteKit generates the base config into node_modules/$app on every
|
|
// `svelte-kit sync` (which `npm run check` and `build:admin` run first). It
|
|
// supplies the $app types and the module/target settings, none of which
|
|
// should be restated here, because SvelteKit changes them between versions
|
|
// and a hand-written copy drifts silently.
|
|
//
|
|
// Since SvelteKit 3 the base no longer says WHICH files belong to the app,
|
|
// so `include` is ours. It is what SvelteKit 2 generated, minus the Worker:
|
|
// src and the Vite config (which pulls in build/), plus build/'s tests.
|
|
// worker/ has its own tsconfig.worker.json and must not be checked against
|
|
// the DOM lib here.
|
|
"extends": "$app/tsconfig",
|
|
"compilerOptions": {
|
|
// The base sets it as well; it stays here because two declaration-file
|
|
// clashes need it and neither is ours to fix (measured with it off,
|
|
// 2026-10-26):
|
|
// - src/workers/jsonl-parser.ts carries `/// <reference lib="webworker" />`,
|
|
// which puts lib.webworker.d.ts and lib.dom.d.ts in one program; they
|
|
// declare `self`, `onmessage` and friends with different types.
|
|
// - echarts-wordcloud's index.d.ts default-imports echarts, whose 6.x
|
|
// types have no default export (the package.json override that keeps
|
|
// it on echarts 6 is about its runtime, which works).
|
|
"skipLibCheck": true,
|
|
"strict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
// Replaces the base's list, so its $app/types has to be repeated.
|
|
"types": ["$app/types", "node"],
|
|
// The `imports` entry of package.json, repeated for `svelte-check --tsgo`.
|
|
// TypeScript resolves `#lib/...` through package.json on its own, but
|
|
// svelte-check redirects .svelte imports to the declarations it emits only
|
|
// through `paths`: without this, every component imported as
|
|
// `#lib/....svelte` fell back to the ambient `*.svelte` shim - its props
|
|
// unchecked, its module exports missing.
|
|
"paths": { "#lib/*": ["./src/lib/*"] }
|
|
},
|
|
"include": ["src/**/*.js", "src/**/*.ts", "src/**/*.svelte", "vite.config.ts", "build/**/*.test.ts"]
|
|
}
|