Skip to content

chore(deps): migrate to SvelteKit 3 and bump undici for audit - #1028

Merged
PathGao merged 1 commit into
masterfrom
chore/sveltekit-3
Oct 24, 2026
Merged

PathGao merged 1 commit into
masterfrom
chore/sveltekit-3

Conversation

@PathGao

@PathGao PathGao commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

What this is

npm audit fails on master since a1477cf's run:

undici moves to 8.12.3 in the lockfile, inside jsdom's range, so no override is needed. The Kit advisories need the major.

What changed

Versions, each to the minimum Kit 3 requires per the migration guide:

  • @sveltejs/kit 2.70 → 3.1.0, @sveltejs/adapter-static 3 → 4.0.0 (all first-party adapters require Kit 3)
  • @sveltejs/vite-plugin-svelte 5 → 7.3.1, vite 6 → 8.3.5, typescript 5.9 → 6.0.3, svelte 5.56 → 5.57.2
  • the cookie: 0.7.2 override is dropped. It only existed for Kit 2's cookie dependency, and Kit 3 imports parseCookie from cookie 2, so the override broke the build.

Migration edits:

  • svelte.config.js is no longer supported. Its adapter (static, fallback: "index.html") and preprocess move into the sveltekit() plugin options in vite.config.js.
  • $lib is no longer generated. The three $lib/... imports become #lib/..., declared in package.json "imports". The startup-graph test that resolves those specifiers follows.
  • tsconfig.json extends $app/tsconfig instead of ./.svelte-kit/tsconfig.json, which declares no include, so the hand-copied list becomes ["src", "scripts", "*"].
  • TypeScript 6 prefixes transpileModule output with "use strict", so return ${js} in editorOptionWiring.test.ts returned that string. The evaluated literal is now bound to a name and returned after.

No change needed for Node: Kit 3 needs 22.17, CI runs 24. ssr = false in +layout.ts, $app/* (none used) and vitest config are unaffected.

Verification

npm ci clean, npm audit 0 vulnerabilities, npm run check 0 errors, npm test 1164 pass, npm run test:vitest 560 pass, npm run build succeeds. build/ matches master's layout: index.html SPA fallback with the same /_app/immutable/... paths, same Monaco workers, IME patch present. A macOS Tauri release .app builds.

npm audit fails on master: undici 8.0.0-8.12.1 (high, via jsdom) and
@sveltejs/kit < 3.0.0 (low, patched only in 3.0.0).

- @sveltejs/kit 3.1.0, adapter-static 4.0.0, vite-plugin-svelte 7.3.1,
  vite 8.3.5, typescript 6.0.3, svelte 5.57.2 (Kit 3 minimums)
- undici 8.12.3 in the lockfile (within jsdom's range)
- svelte.config.js removed, its options move to the sveltekit() plugin
- $lib imports become #lib, declared in package.json "imports"
- tsconfig extends $app/tsconfig and declares its own include
- drop the cookie 0.7.2 override, Kit 3 needs cookie 2
- editorOptionWiring test: TypeScript 6 emits "use strict" first, so the
  evaluated literal is bound to a name instead of returned as an expression
@PathGao
PathGao merged commit 231fe74 into master Oct 24, 2026
4 checks passed
@PathGao
PathGao deleted the chore/sveltekit-3 branch October 24, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant