Repository navigation
Release v3.6.0
What's Changed
⚡ Pluggable Cache Layer (client.cache / @ansango/lastfm-api/cache)
MemoryCacheStorefor Node/Bun with configurable TTL and auto garbage collection.StorageCacheStorefor browser environments (localStorage / sessionStorage).CacheManagerwith hierarchical TTL resolution (per-method, per-namespace, and default fallback).- Integrated caching in
fetcherwith cache bypass for authenticated and mutation requests.
📡 Real-Time Scrobble Watcher (client.watcher / @ansango/lastfm-api/watcher)
- Fully typed
TypedEventEmitterevent bus. ScrobbleWatcherpolling engine emittingnowPlaying,nowPlayingEnd,scrobble,idle, anderrorevents.- Lifecycle management with
.start(),.stop(),.isActive(), and.forcePoll().
📦 Modular Subpath Exports & Zero Dependencies
- Added
@ansango/lastfm-api/cache,@ansango/lastfm-api/cache/schemas,@ansango/lastfm-api/watcher, and@ansango/lastfm-api/watcher/schemastopackage.json. - Removed
dotenvdependency in favor of native Node/Bun environment resolution.
Full Changelog: v3.5.0...v3.6.0