From: Eduardo San Martin Morote Date: Mon, 20 Dec 2021 15:09:49 +0000 (+0100) Subject: feat: update devtools-api X-Git-Tag: @pinia/nuxt@0.1.7~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca266868c5c5a00f3bebb326e9a0b9aaf90fb344;p=thirdparty%2Fvuejs%2Fpinia.git feat: update devtools-api --- diff --git a/packages/pinia/package.json b/packages/pinia/package.json index 5927571b..56d79ced 100644 --- a/packages/pinia/package.json +++ b/packages/pinia/package.json @@ -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": { diff --git a/packages/pinia/src/createPinia.ts b/packages/pinia/src/createPinia.ts index 4a1522ca..acd97612 100644 --- a/packages/pinia/src/createPinia.ts +++ b/packages/pinia/src/createPinia.ts @@ -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)) diff --git a/packages/pinia/src/devtools/plugin.ts b/packages/pinia/src/devtools/plugin.ts index 89c2730e..423d5dfa 100644 --- a/packages/pinia/src/devtools/plugin.ts +++ b/packages/pinia/src/devtools/plugin.ts @@ -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 to StoreGeneric? store as StoreGeneric diff --git a/packages/pinia/src/vue2-plugin.ts b/packages/pinia/src/vue2-plugin.ts index 42b9426e..cb1d6427 100644 --- a/packages/pinia/src/vue2-plugin.ts +++ b/packages/pinia/src/vue2-plugin.ts @@ -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) } } diff --git a/packages/playground/tsconfig.json b/packages/playground/tsconfig.json index 181bbeb2..860623e5 100644 --- a/packages/playground/tsconfig.json +++ b/packages/playground/tsconfig.json @@ -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"] } diff --git a/tsconfig.json b/tsconfig.json index f4a2f5cc..e048de4f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -36,6 +36,6 @@ "removeComments": false, "jsx": "preserve", "lib": ["esnext", "dom"], - "types": ["jest", "node"] + "types": ["jest", "node", "vite/client"] } } diff --git a/yarn.lock b/yarn.lock index 583c3632..0a3d8446 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2193,11 +2193,16 @@ "@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"