Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Update to SvelteKit 3

未關閉
#348 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
22/100
Issue 類型
重構
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
typescript

研究方向

This is a full SvelteKit 3 migration, not a first-issue. After the listed TypeScript/Vite upgrades, run npx sv migrate sveltekit-3, then follow the checklists: move adapter and vitePreprocess into vite.config.ts, retarget tsconfig.json extends, and rename $lib/$app imports. Touch the named call sites for goto/invalidateAll/handleError in src/hooks.server.ts, storage pages, and src/lib/storage/*.svelte.ts, then update AGENTS.md and helm env docs. Done when the app builds, env/zod, OIDC redirects, and forms behave under the new APIs.

由索引模型根據 Issue 內容生成。

描述

[!CAUTION]
This is not a complete list
And we should also wait for a few svelte patches before migrating

Prerequisit upgrades

  • TypeScript 5 to 6+
  • Vite 7 to 8

Auto migration

  • Run npx sv migrate sveltekit-3

Configuration

  • Delete svelte.config.js and move adapter() and vitePreprocess()
    into the sveltekit({ ... }) plugin options in vite.config.ts
  • tsconfig.json: change "extends" from "./.svelte-kit/tsconfig.json" to "$app/tsconfig"

Module aliases and imports

  • $lib → #lib
  • $app/environment → $app/env — 15 refs on main, 25 on the S3 branch

Environment variables

  • Rework all ENV vars to conform to the new env convention
  • Add zod schemas for every env

Navigation, forms and errors

  • goto() option invalidateAll → refreshAll, replaceState → replace. Affected:
    src/routes/(app)/storage/[bucket]/[...prefix]/+page.svelte:28 on main; on the S3 branch also
    storage/browse/[connection]/[bucket]/[...prefix]/+page.svelte:61,84 and storage/+layout.svelte:53
  • Standalone invalidateAll() → refreshAll(): src/lib/storage/state.svelte.ts:188,337,359
    plus archive.svelte.ts:236 and other call sites
  • Rework handleError at src/hooks.server.ts:94 — it now receives all errors including
    expected error() throws, so every 404/403 would currently be logged at error level and have
    its message replaced with "An unexpected error occurred". Discriminate on kind.
  • Review use:enhance forms — cross-page action now navigates automatically, and enhanced
    responses use the fail() status instead of always 200
  • Check external redirects still work — they now need { external: true } or an origin allowlist
    (relevant to the OIDC flow in src/routes/auth/)
  • $app/paths: Pathnames no longer start with /, which affects the
    PUBLIC_PATHS prefix matching in src/hooks.server.ts:46-55

Documentation

  • Update AGENTS.md — it documents $lib paths, the $env/process.env logging setup and the
    superforms rule, all of which change
  • Update deploy/helm/cockpit README and any env-var documentation
主要語言
TypeScript
星號
1
分支
0
平均合併
3 天 20 小時
30 天內合併 PR
14

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

stackabletech/cockpit 的其他 Issue

查看 stackabletech/cockpit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。