Files
minstrel/web/package.json
T
bvandeusenandClaude Opus 5.5 be384c8efe
release / go (push) Failing after 1m10s
release / web (push) Failing after 10s
release / android (push) Failing after 1m2s
release / govulncheck (push) Successful in 17s
release / integration (push) Successful in 2m31s
release / Build signed APK (push) Failing after 1m43s
release / Build + push container image (push) Skipped
web: svelte-query 6 — queries are reactive objects read directly, not stores (#8532)
@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>
2026-12-04 10:55:05 -05:00

40 lines
1.0 KiB
JSON

{
"name": "minstrel-web",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"test": "svelte-kit sync && vitest run",
"tokens": "node scripts/tokens-to-css.js"
},
"devDependencies": {
"@sveltejs/adapter-static": "^4.0.0",
"@sveltejs/kit": "^3.0.0",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"@tailwindcss/vite": "^4.3.3",
"@testing-library/jest-dom": "^8.0.0",
"@testing-library/svelte": "^5.3.1",
"@types/node": "^26.6.11",
"jsdom": "^31.0.1",
"svelte": "^5.57.1",
"svelte-check": "^4.7.5",
"tailwindcss": "^4.3.3",
"typescript": "^6.0.0",
"vite": "^8.0.12",
"vitest": "^5.0.0"
},
"dependencies": {
"@lucide/svelte": "^1.87.0",
"@neodrag/svelte": "^2.3.3",
"@tanstack/svelte-query": "^6.4.7"
},
"imports": {
"#lib/*": "./src/lib/*",
"#test-utils/*": "./src/test-utils/*"
}
}