]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
feat: update devtools-api
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 20 Dec 2021 15:09:49 +0000 (16:09 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 20 Dec 2021 15:09:49 +0000 (16:09 +0100)
packages/pinia/package.json
packages/pinia/src/createPinia.ts
packages/pinia/src/devtools/plugin.ts
packages/pinia/src/vue2-plugin.ts
packages/playground/tsconfig.json
tsconfig.json
yarn.lock

index 5927571b6a05d8abc636fc9f6d075048af01ec83..56d79ced93b25696edcc6e8e4adbad4128c97304 100644 (file)
@@ -76,7 +76,7 @@
     "vue2": "npm:vue@2"
   },
   "dependencies": {
-    "@vue/devtools-api": "^6.0.0-beta.20.1",
+    "@vue/devtools-api": "^6.0.0-beta.21",
     "vue-demi": "*"
   },
   "peerDependencies": {
index 4a1522ca60d9c472604a79ba738f2b37afdbab4a..acd9761243a5f2cc01fef85ebd2c45f48b48f846 100644 (file)
@@ -28,7 +28,6 @@ export function createPinia(): Pinia {
         app.config.globalProperties.$pinia = pinia
         /* istanbul ignore else */
         if (__DEV__ && IS_CLIENT) {
-          // @ts-expect-error: weird type in devtools api
           registerPiniaDevtools(app, pinia)
         }
         toBeInstalled.forEach((plugin) => _p.push(plugin))
index 89c2730ee559e337fff8885a90d3aafae4d808cf..423d5dfad6e610d4fd0a4d68472eaade74509b92 100644 (file)
@@ -533,7 +533,6 @@ export function devtoolsPlugin<
   }
 
   addStoreToDevtools(
-    // @ts-expect-error: should be of type App from vue
     app,
     // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
     store as StoreGeneric
index 42b9426efea761c3e2f5bbb32087da766602ce26..cb1d64270d7b9c7bc94e020b3aae41d0739c415b 100644 (file)
@@ -23,7 +23,7 @@ import { Pinia, piniaSymbol, setActivePinia } from './rootStore'
  * })
  * ```
  *
- * @param _Vue
+ * @param _Vue - `Vue` imported from 'vue'.
  */
 export const PiniaVuePlugin: Plugin = function (_Vue) {
   // Equivalent of
@@ -57,7 +57,6 @@ export const PiniaVuePlugin: Plugin = function (_Vue) {
           // installing pinia's plugin
           setActivePinia(pinia)
           if (__DEV__) {
-            // @ts-expect-error: weird type in devtools api
             registerPiniaDevtools(pinia._a, pinia)
           }
         }
index 181bbeb2465ed59c0e329e8fe123575e71f5ae01..860623e50c1dc431976d670664ba3f2b19557862 100644 (file)
@@ -9,7 +9,8 @@
     "sourceMap": true,
     "resolveJsonModule": true,
     "esModuleInterop": true,
-    "lib": ["esnext", "dom"]
+    "lib": ["esnext", "dom"],
+    "types": ["vite/client"]
   }
   // "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
 }
index f4a2f5cc0e6688d02ea8fa214ba84642a5229358..e048de4f71057acc32c19ac550b9a242031e21db 100644 (file)
@@ -36,6 +36,6 @@
     "removeComments": false,
     "jsx": "preserve",
     "lib": ["esnext", "dom"],
-    "types": ["jest", "node"]
+    "types": ["jest", "node", "vite/client"]
   }
 }
index 583c3632b1a476c138ccbf89665754154d68893d..0a3d8446e372a04966d5f6fa9a6ce0f3fbcdbc27 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
     "@vue/compiler-dom" "3.2.26"
     "@vue/shared" "3.2.26"
 
-"@vue/devtools-api@^6.0.0-beta.18", "@vue/devtools-api@^6.0.0-beta.20.1":
+"@vue/devtools-api@^6.0.0-beta.18":
   version "6.0.0-beta.20.1"
   resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.0-beta.20.1.tgz#5b499647e929c35baf2a66a399578f9aa4601142"
   integrity sha512-R2rfiRY+kZugzWh9ZyITaovx+jpU4vgivAEAiz80kvh3yviiTU3CBuGuyWpSwGz9/C7TkSWVM/FtQRGlZ16n8Q==
 
+"@vue/devtools-api@^6.0.0-beta.21":
+  version "6.0.0-beta.21"
+  resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.0-beta.21.tgz#74d78f15d61e7da31b3ed918e955c42aa94fbf6d"
+  integrity sha512-97C2evr7bKxtXEmgMiSuidKyW0fjdGJ6UBIAnUIH7vu5AHgp15u5h4USkeT1qj/jxl0wyOOfcnvevPapyDGAmQ==
+
 "@vue/reactivity-transform@3.2.26":
   version "3.2.26"
   resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.26.tgz#6d8f20a4aa2d19728f25de99962addbe7c4d03e9"