All notable changes to @ametie/vue-muza-use will be documented here.
Format: Semantic Versioning
Looking for pre-1.0 docs? See the v0.10.0 README.
watchoption removed fromUseApiOptions.url,params, anddataare now auto-tracked — the request re-fires automatically when their reactive dependencies change. No explicitwatchneeded.staleWhileRevalidateoption removed fromUseApiOptions. Moved intoCacheOptionsasswr: boolean. Usecache: { id: 'key', swr: true }instead ofcache: 'key', staleWhileRevalidate: true.peerDependencies: minimum Vue version bumped from^3.3.0to^3.5.0(required foreffectScope.pause/resume).
lazy?: boolean— opt-out of auto-tracking. Whentrue, reactive changes tourl,params, anddatado NOT trigger a re-fetch. Use for forms and manual mutations where you callexecute()yourself.refetchOnFocus?: boolean | { throttle?: number }— re-fetch when the browser tab regains focus. Default throttle: 60 000ms. Pass{ throttle: 0 }to always refetch. Configurable globally viacreateApiClient({ globalOptions: { refetchOnFocus: true } }).refetchOnReconnect?: boolean— re-fetch when the browser regains network connectivity (onlineevent). No throttle applied. Configurable globally.CacheOptions.swr?: boolean— replaces the top-levelstaleWhileRevalidateoption.
// watch → auto-tracking
// Before
useApi('/products', {
params: () => ({ q: search.value }),
watch: [search],
})
// After
useApi('/products', {
params: () => ({ q: search.value }),
})
// staleWhileRevalidate → cache.swr
// Before
useApi('/users', { cache: 'users', staleWhileRevalidate: true })
// After
useApi('/users', { cache: { id: 'users', swr: true } })
// New: refetchOnFocus
useApi('/dashboard', { refetchOnFocus: true })
// New: global config
createApiClient({
globalOptions: { refetchOnFocus: true, refetchOnReconnect: true }
})
// Form (opt-out of auto-tracking)
useApi('/products', {
data: form,
lazy: true,
})ignoreUpdatesinternally migrated from a boolean flag toeffectScope.pause()/resume(). External API is unchanged.
selectoption — transform response data before storing indata. Third genericTSelectedonUseApiOptions<T, D, TSelected>.staleWhileRevalidateoption — serve cached data instantly while revalidating in the background. Exposesrevalidatingref.withCredentialsoption — per-request override of Axios credential behavior.revalidatingref inUseApiReturn— indicates background SWR revalidation in progress.
UseApiReturn.responsetype changed toRef<AxiosResponse<unknown> | null>to decouple from response generic.- Repository renamed from
vue-useApitovue-muza-use.
- Full test coverage (100+ tests).
- Documentation rewrite.
- Claude Code skill for feature-scoped API layer pattern.
- Cache documentation.
cacheoption — in-memory response cache with configurable TTL.invalidateCacheoption — bust related caches on mutation success.
ignoreUpdates— update watched refs without triggering a re-fetch.
- Retry logic with configurable
retryandretryDelay.
- Renamed
setDatatomutate.
- Batch requests (
useApiBatch) — parallel requests with combined loading state and progress tracking.
mutate(formerlysetData) — manually setdatavalue without a network request.
- Auto-refetch on reactive dependency change (
watchoption).
- Initial public release.
useApi,useApiGet,useApiPost,useApiPut,useApiPatch,useApiDelete.- Axios interceptor integration for auth token refresh.
immediate,debounce,polloptions.execute,cancelcontrols.- Race condition prevention.
- Automatic cleanup on component unmount.