Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Update to SvelteKit 3

Aberta
#348 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
22/100
Tipo de issue
Refatoração
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

[!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
Linguagem predominante
TypeScript
Estrelas
1
Forks
0
Merge médio
4d 6h
PRs com merge (30d)
12

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de stackabletech/cockpit

Todas as issues de stackabletech/cockpit

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.