]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
feat: deprecate PiniaPlugin in favor of PiniaVuePlugin
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 24 Aug 2021 07:33:45 +0000 (09:33 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 24 Aug 2021 07:33:45 +0000 (09:33 +0200)
packages/pinia/src/index.ts
packages/pinia/src/vue2-plugin.ts

index 73305dd8f67fe8db32069d8480ba4dc543fab26d..b17a2016be100fcfc84bb83e9140f102631ad8ab 100644 (file)
@@ -61,4 +61,8 @@ export type {
 
 export { acceptHMRUpdate } from './hmr'
 
-export { PiniaPlugin } from './vue2-plugin'
+export {
+  // TODO: remove in release and deprecate PiniaStorePlugin in favor of PiniaPlugin
+  PiniaPlugin,
+  PiniaVuePlugin,
+} from './vue2-plugin'
index 1d9ccb7ce6e34124af9b2433c72a20426b7084d3..25bc75cdb085a4f3690a82186745b257d69ceb76 100644 (file)
@@ -25,7 +25,7 @@ import { Pinia, piniaSymbol, setActivePinia } from './rootStore'
  *
  * @param _Vue
  */
-export const PiniaPlugin: Plugin = function (_Vue) {
+export const PiniaVuePlugin: Plugin = function (_Vue) {
   // Equivalent of
   // app.config.globalProperties.$pinia = pinia
   _Vue.mixin({
@@ -69,3 +69,8 @@ export const PiniaPlugin: Plugin = function (_Vue) {
     },
   })
 }
+
+/**
+ * @deprecated use PiniaVuePlugin
+ */
+export const PiniaPlugin = PiniaVuePlugin