Upgrading pinia 0.1 to 0.2
Unknown0.1.0 → 0.2.5
UnknownUpgrade verdict
DepDelta hasn't looked for this range's notes yet, so breaking changes can't be ruled out.
In plain terms
- DepDelta hasn't finished looking for the notes in this range, so it can't rule out breaking changes yet.
- Their commits are listed with this comparison.
Must act Unknown for releases without notes
Releases without notes may still need changes. Check their commits before upgrading.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- added:
interface Context - added:
property Context.$pinia: Pinia - added:
property Context.pinia: Pinia
- added:
interface PiniaCustomProperties - added:
property PiniaCustomProperties.$nuxt: Context
- added:
interface ComponentOptions<V extends Vue> - added:
property ComponentOptions.pinia?: Pinia
- added:
interface Vue - added:
property Vue.$pinia: Pinia
- removed:
default function NuxtPiniaModule(options: any): void
- removed:
const myPlugin: import('@nuxt/types').Plugin - removed:
default myPlugin
- added:
const createStore: typeof defineStore
- changed:
function useStoreDevtools(store: StoreWithState<string, StateTree>): void → function useStoreDevtools(store: StoreWithState<string, StateTree>, stateDescriptor: { get: () => StateTree; set: (newValue: StateTree) => void }): void
- removed:
export { PiniaSsr } from './ssrPlugin' - removed:
export { createStore } from './store' - removed:
export { getRootState } from './rootStore' - removed:
export { setActiveReq } from './rootStore' - removed:
export { setStateProvider } from './rootStore' - added:
export { Pinia } from './rootStore' - added:
export { PiniaCustomProperties } from './types' - added:
export { PiniaPlugin } from './plugin' - added:
export { PiniaStorePlugin } from './rootStore' - added:
export { StoreWithActions } from './types' - added:
export { StoreWithGetters } from './types' - added:
export { StoreWithState } from './types' - added:
export { createPinia } from './rootStore' - added:
export { createStore } from './deprecated' - added:
export { defineStore } from './store' - added:
export { setActivePinia } from './rootStore'
- added:
const PiniaPlugin: PluginFunction<void>
- removed:
const getActiveReq: () => Record<any, any> - removed:
const setActiveReq: (req: NonNullObject | undefined) => Record<any, any> | undefined - removed:
const stateProviders: WeakMap<Record<any, any>, StateProvider> - removed:
function getInitialState(id: string): StateTree | undefined - removed:
function getRootState(req: NonNullObject): Record<string, StateTree> - removed:
function setStateProvider(stateProvider: StateProvider): void - removed:
let activeReq: NonNullObject - changed:
const storesMap: WeakMap<Record<any, any>, Map<string, import('./types').Store<string, Record<string | number | symbol, any>, Record<string, import('./types').Method>, Record<s… → const storesMap: WeakMap<Pinia, Map<string, [StoreWithState<string, StateTree>, StateDescriptor<StateTree>]>> - added:
call PiniaStorePlugin(pinia: Pinia): Partial<PiniaCustomProperties> - added:
const getActivePinia: () => Pinia - added:
const piniaSymbol: InjectionKey<Pinia> - added:
const setActivePinia: (pinia: Pinia | undefined) => Pinia | undefined - added:
declare module 'vue/types/options' - added:
declare module 'vue/types/vue' - added:
function createPinia(): Pinia - added:
interface Pinia - added:
interface PiniaStorePlugin - added:
let activePinia: Pinia | undefined - added:
method Pinia.use(plugin: PiniaStorePlugin): void - added:
property Pinia.Vue: VueConstructor<Vue> - added:
property Pinia._p: Array<() => Partial<PiniaCustomProperties>> - added:
property Pinia.state: Ref<Record<string, StateTree>>
- removed:
const PiniaSsr: (_Vue: VueConstructor) => void
- removed:
function buildStore<Id extends string, S extends StateTree, G extends Record<string, Method>, A extends Record<string, Method>>(id: Id, buildState?: () => S, getters?: G, actions?: A, initialState?: S | undefined): Store<Id, S, G, A> - removed:
function createStore<Id extends string, S extends StateTree, G, A>(options: { id: Id; state?: () => S; getters?: G & ThisType<S & StoreWithGetters<G>>; actions?: A & ThisType<A & S & StoreWithState<Id, S> & StoreWithGetters<G>> }): (reqKey?: object | undefined) => Store<Id, S, G, A> - added:
function defineStore<Id extends string, S extends StateTree, G, A>(options: { id: Id; state?: () => S; getters?: G & ThisType<S & StoreWithGetters<G> & PiniaCustomProperties>; actions?: A & ThisType<A & S & StoreWithState<Id, S> & StoreWithGetters<G> & PiniaCustomProperties> }): (pinia?: Pinia | null | undefined) => Store<Id, S, G, A>
- removed:
method StoreWithState.patch(partialState: DeepPartial<S>): void - removed:
method StoreWithState.reset(): void - removed:
method StoreWithState.subscribe(callback: SubscriptionCallback<S>): () => void - removed:
property StoreWithState._r: NonNullObject - removed:
property StoreWithState.id: Id - removed:
property StoreWithState.state: S - changed:
type Store<Id extends string, S extends StateTree, G, A> = StoreWithState<Id, S> & S & StoreWithGetters<G> & StoreWithActions<A> → type Store<Id extends string, S extends StateTree, G, A> = StoreWithState<Id, S> & S & StoreWithGetters<G> & StoreWithActions<A> & PiniaCustomProperties<Id, S, G, A> - added:
interface PiniaCustomProperties<Id extends string = string, S extends StateTree = StateTree, G = Record<string, Method>, A = Record<string, Method>> - added:
interface StateDescriptor<S extends StateTree> - added:
method StateDescriptor.get(): S - added:
method StateDescriptor.set(newValue: S): void - added:
method StoreWithState.$patch(partialState: DeepPartial<S>): void - added:
method StoreWithState.$patch(stateMutator: (state: S) => void): void - added:
method StoreWithState.$reset(): void - added:
method StoreWithState.$subscribe(callback: SubscriptionCallback<S>): () => void - added:
property StoreWithState.$id: Id - added:
property StoreWithState.$state: S - added:
property StoreWithState._p: Pinia
- added:
const IS_CLIENT: boolean - added:
const assign: { <T, U>(target: T, source: U): T & U; <T_1, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; <T_2, U_2, V_1, W>(target: T_2, source1: U_2, sourc…
- added:
declare module '@nuxt/types' - added:
declare module 'pinia'