@tanstack/svelte-query 6 is built on runes:
- createQuery and createInfiniteQuery take their options as a function
and return a reactive object that components read as query.data.
- createMutation takes its options the same way.
What this commit changes:
- Every query creator in src/lib/api now takes its arguments as getters
and reads them inside the options, so a query follows the values it
depends on. Before, each component rebuilt it in a $derived.
- Constant arguments are passed as getters too, so the rule has no
exceptions.
- Components call a creator once at init: const query =
createArtistQuery(() => id). The $derived(create…) and $store pairs
are gone.
- A query that loads only on demand (a chosen genre or year, the
Handled view) has an enabled getter. The page keeps its `cond ? q :
null` alias, because a switched-off query reports isPending and the
page expects null when nothing is chosen.
- Tests: the query mocks return plain objects. liveQuery
(test-utils/liveQuery.svelte.ts) gives a test a result it can change
mid-test. Argument checks call the getter the page passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- lucide-svelte is replaced by its successor @lucide/svelte. The
component names are the same, so only the import path changes (44
files).
- jsdom 31, @testing-library/jest-dom 8, @types/node 26.
- The lockfile is refreshed within every range: svelte 5.60, vite 8.4,
vitest 5.1, @sveltejs/kit 3.5, adapter-static 4.0.1. sharp is no
longer in the tree.
TypeScript stays on 6: svelte-check 4.7.9, the web lane's type check,
accepts typescript ^5 || ^6 only. svelte-query 6 follows in its own
commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges Renovate's kit 3 (PR #149) and adapter-static 4 (PR #148) bumps,
plus the migration they need. The mechanical part is `sv migrate
sveltekit-3`, run one task at a time and reviewed:
- svelte.config.js is gone. Its options move into sveltekit() in
vite.config.ts, exported as kitOptions so vitest.config.ts runs the
same kit setup, including the $test-utils alias the tests import.
- $lib becomes #lib through package.json "imports". There is no
src/lib/index, so only the "#lib/*" entry is kept.
- tsconfig extends $app/tsconfig.
- Peer floors raised to kit 3's requirements: svelte ^5.57.1, vite
^8.0.12, svelte-check ^4.7.5.
By hand, from the codemod's list of non-automated tasks:
- goto's replaceState option is now replace; keepFocus becomes
reset: false. For the search typeahead, reset: false also stops the
scroll-to-top, which is wanted while typing.
- The test setup mocks drop pushState/replaceState and $app/paths
base/assets, which kit 3 removed, and mock refreshAll in place of
invalidateAll.
- The other flagged files only read page.url or goto internal routes,
so they needed no change.
TypeScript goes to ^6, not the ^7 Renovate offers: kit 3 declares
typescript ^6 as a peer and svelte-check 4.7 accepts ^5 || ^6. Move to
7 once both accept it.
With Tailwind 4 and kit 3 in, `npm audit` on the whole tree reports 0,
so the web lane now audits every dependency rather than only what
ships to browsers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a global selection store backing a checkbox per track row and a
floating SelectionBar above PlayerBar with Play next / Add to queue /
Add to playlist / Like all / Clear.
- selection/store.svelte.ts: id Set + TrackRef Map + anchor index;
toggleOne, selectRange (shift+click), clearSelection. Singleton —
layout effect clears on pathname change.
- TrackRow: checkbox slot replaces the track number on hover; row
click toggles selection once any row is picked; shift+click extends
the range. Esc clears (takes priority over closing the queue
drawer).
- SelectionBar: floating pill above PlayerBar, mounted inside the
QueryClientProvider so the Like-all action can resolve.
- player.playNextMany: bulk variant of playNext for "Play next" on a
multi-track selection.
Covered by selection-store unit tests and three new TrackRow tests
(checkbox toggle, sticky select-mode row click, shift+click range).