Update to SvelteKit 3
维护者通常 2 天内回复
还没有人认领这个 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.jsand moveadapter()andvitePreprocess()
into thesveltekit({ ... })plugin options invite.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()optioninvalidateAll→refreshAll,replaceState→replace. Affected:
src/routes/(app)/storage/[bucket]/[...prefix]/+page.svelte:28on main; on the S3 branch also
storage/browse/[connection]/[bucket]/[...prefix]/+page.svelte:61,84andstorage/+layout.svelte:53 - Standalone
invalidateAll()→refreshAll():src/lib/storage/state.svelte.ts:188,337,359
plusarchive.svelte.ts:236and other call sites - Rework
handleErroratsrc/hooks.server.ts:94— it now receives all errors including
expectederror()throws, so every 404/403 would currently be logged aterrorlevel and have
its message replaced with "An unexpected error occurred". Discriminate onkind. - Review
use:enhanceforms — cross-pageactionnow navigates automatically, and enhanced
responses use thefail()status instead of always 200 - Check external redirects still work — they now need
{ external: true }or an origin allowlist
(relevant to the OIDC flow insrc/routes/auth/) -
$app/paths: Pathnames no longer start with/, which affects the
PUBLIC_PATHSprefix matching insrc/hooks.server.ts:46-55
Documentation
- Update
AGENTS.md— it documents$libpaths, the$env/process.envlogging setup and the
superforms rule, all of which change - Update
deploy/helm/cockpitREADME and any env-var documentation
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 0
- 平均合并
- 4 天 6 小时
- 30 天内合并 PR
- 12
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stackabletech/cockpit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
stackabletech/cockpit#224 ·
维护者通常 2 天内回复
-
Remove unused dependencies可能已有人在做 @Bohreromir 于 17 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 78/100
stackabletech/cockpit#101 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 20/100
stackabletech/cockpit#362 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 57/100
stackabletech/cockpit#361 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
stackabletech/cockpit#360 ·
维护者通常 2 天内回复
查看 stackabletech/cockpit 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
siyuan-note/siyuan#20313 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 92/100
alunduil/projects-v2-sync#14 ·
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)未关闭
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
DevTools page styles leak into the host app in development可能已有人在做 @onmax 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
nuxt-modules/better-auth#567 · 1 条评论 ·
维护者通常 1 天内回复