refactor: migrate hrefs to resolve()/asset() from $app/paths

Replace string-literal and template-literal hrefs across the codebase
with the modern SvelteKit 2.26+ resolve() and asset() APIs. Migration
makes route IDs explicit, type-checked against generated $app/types,
and base-path-aware. Two codemod scripts handle the bulk; remaining
ambiguous, query-bearing, and precomputed-href cases are converted
manually at the assignment sites.
This commit is contained in:
2026-04-29 22:14:29 +02:00
parent 70506e169a
commit e5d218820b
64 changed files with 669 additions and 161 deletions
@@ -1,4 +1,5 @@
<script>
import { resolve } from '$app/paths';
import { onMount } from 'svelte';
import { goto } from '$app/navigation';
import { page } from '$app/stores';
@@ -243,7 +244,7 @@
</div>
{#if payment}
<EditButton href="/{root}/payments/edit/{paymentId}" />
<EditButton href={resolve('/[cospendRoot=cospendRoot]/payments/edit/[id]', { cospendRoot: root, id: paymentId })} />
{/if}
<style>