Skip to content

Upgrading pinia 0.4 to 0.5

Unknown0.4.1 → 0.5.4

Fetching 5 releases from GitHub…0 / 5
UnknownUpgrade verdict

DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.

  • DepDelta is still reading the release notes in this range, so it can't rule out breaking changes yet.
  • This page updates as the notes come in.
Still reading release notes

DepDelta is still reading the release notes in this range. This updates as they come in.

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • changed: property Vue._pStores?: Record<string, GenericStore> → property Vue._pStores?: Record<string, Store>
  • added: export { ActionsTree } from './types'
  • added: export { MutationType } from './types'
  • added: export { PiniaCustomStateProperties } from './types'
  • added: export { StoreOnActionListener } from './types'
  • added: export { StoreOnActionListenerContext } from './types'
  • added: export { SubscriptionCallback } from './types'
  • added: export { SubscriptionCallbackMutation } from './types'
  • added: export { SubscriptionCallbackMutationDirect } from './types'
  • added: export { SubscriptionCallbackMutationPatchFunction } from './types'
  • added: export { SubscriptionCallbackMutationPatchObject } from './types'
  • added: export { _SubscriptionCallbackMutationBase } from './types'
  • changed: function setMapStoreSuffix(suffix: 'suffix' extends keyof MapStoresCustomization ? MapStoresCustomization['suffix'] : string): void → function setMapStoreSuffix(suffix: MapStoresCustomization extends Record<'suffix', string> ? MapStoresCustomization['suffix'] : string): void
  • changed: type _MapActionsObjectReturn<A, T extends Record<string, keyof A>> = { [key in keyof T]: Store<string, StateTree, {}, A>[T[key]] } → type _MapActionsObjectReturn<A, T extends Record<string, keyof A>> = { [key in keyof T]: A[T[key]] }
  • changed: type _MapActionsReturn<A> = { [key in keyof A]: Store<string, StateTree, {}, A>[key] } → type _MapActionsReturn<A> = { [key in keyof A]: A[key] }
  • changed: type _MapStateObjectReturn<Id extends string, S extends StateTree, G extends GettersTree<S>, A, T extends Record<string, keyof S | keyof G | ((store: Store<Id, S, G, A>) => any)>> = { [key in keyof T]: () => T[key] extends (store: GenericStore) => infer R ? R : T[key] extends keyof S | keyof G ? Store<Id, S, G, A>[T[key]] : never } → type _MapStateObjectReturn<Id extends string, S extends StateTree, G extends GettersTree<S>, A, T extends Record<string, keyof S | keyof G | ((store: Store<Id, S, G, A>) => any)>> = { [key in keyof T]: () => T[key] extends (store: Store) => infer R ? R : T[key] extends keyof Store<Id, S, G, A> ? Store<Id, S, G, A>[T[key]] : never }
  • changed: type _MapStateReturn<S extends StateTree, G extends GettersTree<S>> = { [key in keyof S | keyof G]: () => Store<string, S, G, {}>[key] } → type _MapStateReturn<S extends StateTree, G extends GettersTree<S>> = { [key in keyof S | keyof G]: () => key extends keyof Store<string, S, G, {}> ? Store<string, S, G, {}>[key] : never }
  • changed: type _MapWritableStateObjectReturn<S extends StateTree, T extends Record<string, keyof S>> = { [key in keyof T]: { get: () => Store<string, S, {}, {}>[T[key]]; set: (value: Store<string, S, {}, {}>[T[key]]) => any } } → type _MapWritableStateObjectReturn<S extends StateTree, T extends Record<string, keyof S>> = { [key in keyof T]: { get: () => S[T[key]]; set: (value: S[T[key]]) => any } }
  • changed: type _MapWritableStateReturn<S extends StateTree> = { [key in keyof S]: { get: () => Store<string, S, {}, {}>[key]; set: (value: Store<string, S, {}, {}>[key]) => any } } → type _MapWritableStateReturn<S extends StateTree> = { [key in keyof S]: { get: () => S[key]; set: (value: S[key]) => any } }
  • changed: type _StoreObject<S> = S extends StoreDefinition<infer Ids, infer State, infer Getters, infer Actions> ? { [Id in `${Ids}${'suffix' extends keyof MapStoresCustomization ? MapStoresCu… → type _StoreObject<S> = S extends StoreDefinition<infer Ids, infer State, infer Getters, infer Actions> ? { [Id in `${Ids}${MapStoresCustomization extends Record<'suffix', string> ? M…
  • removed: property Pinia.Vue: VueConstructor<Vue>
  • changed: call PiniaStorePlugin(context: PiniaPluginContext): Partial<PiniaCustomProperties> | void → call PiniaStorePlugin(context: PiniaPluginContext): Partial<PiniaCustomProperties & PiniaCustomStateProperties> | void
  • changed: const storesMap: WeakMap<Pinia, Map<string, [StoreWithState<string, StateTree>, StateDescriptor<StateTree>, InjectionKey<GenericStore>]>> → const storesMap: WeakMap<Pinia, Map<string, [StoreWithState<string, StateTree, GettersTree<StateTree>, ActionsTree>, StateDescriptor<StateTree>, InjectionKey<Store<string, Stat…
  • changed: interface PiniaPluginContext<Id extends string = string, S extends StateTree = StateTree, G extends GettersTree<S> = GettersTree<S>, A = Record<string, _Method>> → interface PiniaPluginContext<Id extends string = string, S extends StateTree = StateTree, G extends GettersTree<S> = GettersTree<S>, A = ActionsTree>
  • removed: type GenericStoreDefinition = StoreDefinition<string, StateTree, GettersTree<StateTree>, Record<string, _Method>>
  • changed: interface PiniaCustomProperties<Id extends string = string, S extends StateTree = StateTree, G extends GettersTree<S> = GettersTree<S>, A = Record<string, _Method>> → interface PiniaCustomProperties<Id extends string = string, S extends StateTree = StateTree, G extends GettersTree<S> = GettersTree<S>, A = ActionsTree>
  • changed: interface StoreWithState<Id extends string, S extends StateTree> → interface StoreWithState<Id extends string, S extends StateTree, G extends GettersTree<StateTree> = GettersTree<S>, A = ActionsTree>
  • changed: method StoreWithState.$patch(partialState: DeepPartial<S>): void → method StoreWithState.$patch(partialState: DeepPartial<UnwrapRef<S>>): void
  • changed: method StoreWithState.$patch<F extends (state: S) => void>(stateMutator: ReturnType<F> extends Promise<any> ? never : F): void → method StoreWithState.$patch<F extends (state: UnwrapRef<S>) => void>(stateMutator: ReturnType<F> extends Promise<any> ? never : F): void
  • changed: property DefineStoreOptions.actions?: A & ThisType<A & S & StoreWithState<Id, S> & StoreWithGetters<G> & PiniaCustomProperties> → property DefineStoreOptions.actions?: A & ThisType<A & UnwrapRef<StateTree extends S ? {} : S> & StoreWithState<Id, S, G, A> & StoreWithGetters<GettersTree<S> extends G ? {} : G> & PiniaCustomProperties>
  • changed: property DefineStoreOptions.getters?: G & ThisType<S & StoreWithGetters<G> & PiniaCustomProperties> → property DefineStoreOptions.getters?: G & ThisType<UnwrapRef<StateTree extends S ? {} : S> & StoreWithGetters<G> & PiniaCustomProperties>
  • changed: property StoreWithState.$state: S → property StoreWithState.$state: UnwrapRef<StateTree extends S ? {} : S> & PiniaCustomStateProperties<S>
  • changed: type GenericStore = Store<string, StateTree, GettersTree<StateTree>, Record<string, _Method>> → type GenericStore<Id extends string = string, S extends StateTree = any, G extends GettersTree<S> = GettersTree<S>, A = ActionsTree> = StoreWithState<Id, S, G, A> & UnwrapRef<S> & StoreWithGetters<G> & StoreWithActions<A> & PiniaCustomProperties<Id, S, G, A> & PiniaCustomStateProperties<S>
  • changed: type GettersTree<S extends StateTree> = Record<string, ((state: S) => any) | (() => any)> → type GettersTree<S extends StateTree> = Record<string, ((state: UnwrapRef<(StateTree extends S ? {} : S) & PiniaCustomStateProperties<S>>) => any) | (() => any)>
  • changed: type Store<Id extends string, S extends StateTree, G extends GettersTree<S>, A> = StoreWithState<Id, S> & S & StoreWithGetters<G> & StoreWithActions<A> & PiniaCustomProperties<Id, S, G, A> → type Store<Id extends string = string, S extends StateTree = StateTree, G extends GettersTree<S> = GettersTree<S>, A = ActionsTree> = StoreWithState<Id, StateTree extends S ? {} : S, G, A> & (StateTree extends S ? {} : UnwrapRef<S>) & (GettersTree<S> extends G ? {} : StoreWithGetters<G>) & (A…
  • changed: type SubscriptionCallback<S> = (mutation: { storeName: string; type: string; payload: DeepPartial<S> }, state: S) => void → type SubscriptionCallback<S> = (mutation: SubscriptionCallbackMutation<S>, state: UnwrapRef<S>) => void
  • added: enum MutationType
  • added: interface PiniaCustomStateProperties<S extends StateTree = StateTree>
  • added: interface SubscriptionCallbackMutationDirect extends _SubscriptionCallbackMutationBase
  • added: interface SubscriptionCallbackMutationPatchFunction extends _SubscriptionCallbackMutationBase
  • added: interface SubscriptionCallbackMutationPatchObject<S> extends _SubscriptionCallbackMutationBase
  • added: interface _SubscriptionCallbackMutationBase
  • added: member MutationType.direct = 'direct'
  • added: member MutationType.patchFunction = 'patch function'
  • added: member MutationType.patchObject = 'patch object'
  • added: method StoreWithState.$onAction(callback: StoreOnActionListener<Id, S, G, A>): () => void
  • added: property StoreWithState._as: StoreOnActionListener[]
  • added: property SubscriptionCallbackMutationDirect.type: MutationType.direct
  • added: property SubscriptionCallbackMutationPatchFunction.type: MutationType.patchFunction
  • added: property SubscriptionCallbackMutationPatchObject.payload: DeepPartial<S>
  • added: property SubscriptionCallbackMutationPatchObject.type: MutationType.patchObject
  • added: property _SubscriptionCallbackMutationBase.storeId: string
  • added: property _SubscriptionCallbackMutationBase.storeName: string
  • added: property _SubscriptionCallbackMutationBase.type: MutationType
  • added: type ActionsTree = Record<string, _Method>
  • added: type StoreOnActionListener<Id extends string = string, S extends StateTree = StateTree, G extends GettersTree<S> = GettersTree<S>, A = ActionsTree> = (context: StoreOnActionListenerContext<Id, S, G, A>) => void
  • added: type StoreOnActionListenerContext<Id extends string, S extends StateTree, G extends GettersTree<S>, A> = { [Name in keyof A]: { name: Name; store: Store<Id, S, G, A>; args: A[Name] extends _Method ? Parameters<A[Name]> : unknown[]; after: (callback: A[Name] extend…
  • added: type SubscriptionCallbackMutation<S> = SubscriptionCallbackMutationDirect | SubscriptionCallbackMutationPatchObject<S> | SubscriptionCallbackMutationPatchFunction
  • added: type UnwrapPromise<T> = T extends Promise<infer V> ? V : T