fix(deps): update dependency @vueuse/core to v10 #3381

Merged
dpschen merged 3 commits from renovate/major-vueuse into main 2023-04-14 21:53:07 +00:00
3 changed files with 51 additions and 11 deletions

View File

@ -55,7 +55,7 @@
"@kyvg/vue3-notification": "2.9.0",
"@sentry/tracing": "7.48.0",
"@sentry/vue": "7.48.0",
"@vueuse/core": "9.13.0",
"@vueuse/core": "10.0.0",
"axios": "1.3.5",
"blurhash": "2.0.5",
"bulma-css-variables": "0.9.33",

View File

@ -37,8 +37,8 @@ dependencies:
specifier: 7.48.0
version: 7.48.0(vue@3.2.47)
'@vueuse/core':
specifier: 9.13.0
version: 9.13.0(vue@3.2.47)
specifier: 10.0.0
version: 10.0.0(vue@3.2.47)
axios:
specifier: 1.3.5
version: 1.3.5
@ -4485,6 +4485,18 @@ packages:
'@types/node': 18.15.11
dev: true
/@vueuse/core@10.0.0(vue@3.2.47):
resolution: {integrity: sha512-Q/p2xaGVFVrJ0E4ID1SM35WIa0Eo4AeKPSLKuLpYG09zgUWuwEaY4lBoNzLzkdLjzq5goIJ3DfYFI0wt8W4MkA==}
dependencies:
'@types/web-bluetooth': 0.0.16
'@vueuse/metadata': 10.0.0
'@vueuse/shared': 10.0.0(vue@3.2.47)
vue-demi: 0.14.0(vue@3.2.47)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
dev: false
/@vueuse/core@9.13.0(vue@3.2.47):
resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==}
dependencies:
@ -4497,14 +4509,27 @@ packages:
- vue
dev: false
/@vueuse/metadata@10.0.0:
resolution: {integrity: sha512-7Rh6tcs6aYLRLSdDHF+74wWP0Y1zLwpNJszKAIqlNBrmqdbkz8yh6NtjCYvXrrW6g+FU3ZWvR7F5ASNls+bHmw==}
dev: false
/@vueuse/metadata@9.13.0:
resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==}
dev: false
/@vueuse/shared@10.0.0(vue@3.2.47):
resolution: {integrity: sha512-Zh3LgJqvUBWVY3SiMvXanTcfAneGbt63QPczBRDNgQ6jd/ehodO9a1lCFzaA6SWJJoI+ugVTjHFYJdoR656DVQ==}
dependencies:
vue-demi: 0.14.0(vue@3.2.47)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
dev: false
/@vueuse/shared@9.13.0(vue@3.2.47):
resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==}
dependencies:
vue-demi: 0.12.1(vue@3.2.47)
vue-demi: 0.14.0(vue@3.2.47)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@ -14563,6 +14588,21 @@ packages:
vue: 3.2.47
dev: false
/vue-demi@0.14.0(vue@3.2.47):
resolution: {integrity: sha512-gt58r2ogsNQeVoQ3EhoUAvUsH9xviydl0dWJj7dabBC/2L4uBId7ujtCwDRD0JhkGsV1i0CtfLAeyYKBht9oWg==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
peerDependencies:
'@vue/composition-api': ^1.0.0-rc.1
vue: ^3.0.0-0 || ^2.6.0
peerDependenciesMeta:
'@vue/composition-api':
optional: true
dependencies:
vue: 3.2.47
dev: false
/vue-eslint-parser@9.0.3(eslint@8.38.0):
resolution: {integrity: sha512-yL+ZDb+9T0ELG4VIFo/2anAOz8SvBdlqEnQnvJ3M7Scq56DvtjY0VY88bByRZB0D4J0u8olBcfrXTVONXsh4og==}
engines: {node: ^14.17.0 || >=16.0.0}

View File

@ -1,7 +1,7 @@
import { computed } from 'vue'
import type { Ref } from 'vue'
import {computed} from 'vue'
import type {Ref} from 'vue'
import {useTitle as useTitleVueUse, resolveRef} from '@vueuse/core'
import {useTitle as useTitleVueUse, toRef} from '@vueuse/core'
dpschen marked this conversation as resolved
Review

I wonder how this is different than the toRef provided by vue itself?

I wonder how this is different than the `toRef` provided by vue itself?
Review

This is also something that I wondered. Unsure!

This is also something that I wondered. Unsure!
Review

Looks like they actually only call vue's toRef when there's only one parameter: https://github.com/vueuse/vueuse/blob/main/packages/shared/toRef/index.ts#L23

Since that's pretty much how we use it, I guess we can switch to vue's.

Looks like they actually only call vue's `toRef` when there's only one parameter: https://github.com/vueuse/vueuse/blob/main/packages/shared/toRef/index.ts#L23 Since that's pretty much how we use it, I guess we can switch to vue's.
Review

Okay well actually trying it, it seems like I was wrong, and they do things differently. The title does not work when using vue's toRef but it does when using vueuse's. Let's keep it that way and call it a day.

Okay well actually trying it, it seems like I was wrong, and they do things differently. The title does not work when using vue's `toRef` but it does when using vueuse's. Let's keep it that way and call it a day.
Review

Other stuff will appear again. All good

Other stuff will appear again. All good
type UseTitleParameters = Parameters<typeof useTitleVueUse>
@ -9,12 +9,12 @@ export function useTitle(...args: UseTitleParameters) {
const [newTitle, ...restArgs] = args
const pageTitle = resolveRef(newTitle) as Ref<string>
const pageTitle = toRef(newTitle) as Ref<string>
const completeTitle = computed(() =>
const completeTitle = computed(() =>
(typeof pageTitle.value === 'undefined' || pageTitle.value === '')
? 'Vikunja'
: `${pageTitle.value} | Vikunja`,
? 'Vikunja'
: `${pageTitle.value} | Vikunja`,
)
return useTitleVueUse(completeTitle, ...restArgs)