refactor(shared): rename fontCache to collectionCache

- Rename fontCache.ts to collectionCache.ts
- Rename FontCacheManager interface to CollectionCacheManager
- Make implementation fully generic (already was, just renamed interface)
- Update exports in shared/fetch/index.ts
- Fix getStats() to return derived store value for accurate statistics
- Add comprehensive test coverage for collection cache manager
  - 41 test cases covering all functionality
  - Tests for caching, deduplication, state tracking
  - Tests for statistics, reactivity, and edge cases

Closes task-1 of Phase 1 refactoring
This commit is contained in:
Ilia Mashkov
2026-01-06 14:38:55 +03:00
parent 7d2fe49e9c
commit 29d1cc0cdc
21 changed files with 3093 additions and 4 deletions

View File

@@ -1292,6 +1292,24 @@ __metadata:
languageName: node
linkType: hard
"@tanstack/query-core@npm:5.90.16":
version: 5.90.16
resolution: "@tanstack/query-core@npm:5.90.16"
checksum: 10c0/f6a4827feeed2b4118323056bbda8d5099823202d1f29b538204ae2591be4e80f2946f3311eed30fefe866643f431c04b560457f03415d40caf2f353ba1efac0
languageName: node
linkType: hard
"@tanstack/svelte-query@npm:^6.0.14":
version: 6.0.14
resolution: "@tanstack/svelte-query@npm:6.0.14"
dependencies:
"@tanstack/query-core": "npm:5.90.16"
peerDependencies:
svelte: ^5.25.0
checksum: 10c0/5f7218596e3a2cbe5b877afb2cea678539e38ea9400f000361f859922189273b07e94e42ac8154245f5138fa509e5a24c01b6f7ae5e655acb61daaaef9da80c3
languageName: node
linkType: hard
"@testing-library/dom@npm:9.x.x || 10.x.x":
version: 10.4.1
resolution: "@testing-library/dom@npm:10.4.1"
@@ -2429,6 +2447,7 @@ __metadata:
"@storybook/svelte-vite": "npm:^10.1.11"
"@sveltejs/vite-plugin-svelte": "npm:^6.2.1"
"@tailwindcss/vite": "npm:^4.1.18"
"@tanstack/svelte-query": "npm:^6.0.14"
"@testing-library/jest-dom": "npm:^6.9.1"
"@testing-library/svelte": "npm:^5.3.1"
"@tsconfig/svelte": "npm:^5.0.6"