mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
chore(deps): update dependency ohash to v2 (dev) (#3453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Benjamin Canac <canacb1@gmail.com> Co-authored-by: Sébastien Chopin <atinux@gmail.com>
This commit is contained in:
@@ -423,6 +423,7 @@ const { data: module } = await useFetch<{
|
||||
username: string
|
||||
}[]
|
||||
}>('https://api.nuxt.com/modules/ui', {
|
||||
key: 'stats',
|
||||
transform: ({ stats, contributors }) => ({ stats, contributors })
|
||||
})
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ if (!page.value) {
|
||||
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
|
||||
}
|
||||
|
||||
const { data: releases } = await useFetch('/api/releases.json')
|
||||
const { data: pulls } = await useLazyFetch('/api/pulls.json', { default: () => [] })
|
||||
const { data: releases } = await useFetch('/api/releases.json', { key: 'releases-list' })
|
||||
const { data: pulls } = await useLazyFetch('/api/pulls.json', { default: () => [], key: 'pulls-list' })
|
||||
|
||||
const dates = computed(() => {
|
||||
const first = releases.value[releases.value.length - 1]
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"@vueuse/math": "^12.7.0",
|
||||
"defu": "^6.1.4",
|
||||
"fuse.js": "^7.1.0",
|
||||
"ohash": "^1.1.5",
|
||||
"ohash": "^2.0.10",
|
||||
"pathe": "^2.0.3",
|
||||
"scule": "^1.3.0",
|
||||
"tailwind-merge": "^2.6.0",
|
||||
|
||||
18
pnpm-lock.yaml
generated
18
pnpm-lock.yaml
generated
@@ -68,8 +68,8 @@ importers:
|
||||
specifier: ^7.1.0
|
||||
version: 7.1.0
|
||||
ohash:
|
||||
specifier: ^1.1.5
|
||||
version: 1.1.5
|
||||
specifier: ^2.0.10
|
||||
version: 2.0.10
|
||||
pathe:
|
||||
specifier: ^2.0.3
|
||||
version: 2.0.3
|
||||
@@ -4829,8 +4829,8 @@ packages:
|
||||
ohash@1.1.5:
|
||||
resolution: {integrity: sha512-AtXrG/lMFjPBWj3uhWYFwYVZQqutPYRsv6nnPLTipnC+gJuMFc+WFzf/jx+94Ebray1vxfQfEFDtpIpppOe4xQ==}
|
||||
|
||||
ohash@2.0.9:
|
||||
resolution: {integrity: sha512-ljz2sybhXrRpBW9LleuJPP9uxbMKW8qxFz9lLOHW2QEel78rJ1sUgaX2cBNDt49w+JleNSkhYkVOCx6RgkKn0Q==}
|
||||
ohash@2.0.10:
|
||||
resolution: {integrity: sha512-jf9szh2McTXpXGqejbfHxy4wcs6CXc6MShfzLIdHuCrl2W3qG49qutlOMq1Bdmvpv3s/XJffTu4ElRBPtIOncQ==}
|
||||
|
||||
on-finished@2.4.1:
|
||||
resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==}
|
||||
@@ -7574,7 +7574,7 @@ snapshots:
|
||||
listhen: 1.9.0
|
||||
nypm: 0.6.0
|
||||
ofetch: 1.4.1
|
||||
ohash: 2.0.9
|
||||
ohash: 2.0.10
|
||||
pathe: 2.0.3
|
||||
perfect-debounce: 1.0.0
|
||||
pkg-types: 2.0.1
|
||||
@@ -9570,7 +9570,7 @@ snapshots:
|
||||
giget: 1.2.5
|
||||
jiti: 2.4.2
|
||||
mlly: 1.7.4
|
||||
ohash: 2.0.9
|
||||
ohash: 2.0.10
|
||||
pathe: 2.0.3
|
||||
perfect-debounce: 1.0.0
|
||||
pkg-types: 1.3.1
|
||||
@@ -9587,7 +9587,7 @@ snapshots:
|
||||
exsolve: 1.0.1
|
||||
giget: 2.0.0
|
||||
jiti: 2.4.2
|
||||
ohash: 2.0.9
|
||||
ohash: 2.0.10
|
||||
pathe: 2.0.3
|
||||
perfect-debounce: 1.0.0
|
||||
pkg-types: 2.0.1
|
||||
@@ -12331,7 +12331,7 @@ snapshots:
|
||||
nuxt-site-config: 3.1.1(magicast@0.3.5)(vue@3.5.13(typescript@5.6.3))
|
||||
nypm: 0.6.0
|
||||
ofetch: 1.4.1
|
||||
ohash: 2.0.9
|
||||
ohash: 2.0.10
|
||||
pathe: 2.0.3
|
||||
pkg-types: 2.0.1
|
||||
playwright-core: 1.50.1
|
||||
@@ -12660,7 +12660,7 @@ snapshots:
|
||||
|
||||
ohash@1.1.5: {}
|
||||
|
||||
ohash@2.0.9: {}
|
||||
ohash@2.0.10: {}
|
||||
|
||||
on-finished@2.4.1:
|
||||
dependencies:
|
||||
|
||||
@@ -137,7 +137,7 @@ import type { PropType, AriaAttributes } from 'vue'
|
||||
import { upperFirst } from 'scule'
|
||||
import { defu } from 'defu'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { isEqual } from 'ohash'
|
||||
import { isEqual } from 'ohash/utils'
|
||||
import UIcon from '../elements/Icon.vue'
|
||||
import UButton from '../elements/Button.vue'
|
||||
import UProgress from '../elements/Progress.vue'
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { isEqual, diff } from 'ohash'
|
||||
import { isEqual, diff } from 'ohash/utils'
|
||||
import { type PropType, defineComponent } from 'vue'
|
||||
import { nuxtLinkProps } from '../../utils'
|
||||
|
||||
@@ -74,14 +74,18 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
function isPartiallyEqual(item1, item2) {
|
||||
function isPartiallyEqual(item1: any, item2: any) {
|
||||
const diffedKeys = diff(item1, item2).reduce((filtered, q) => {
|
||||
if (q.type === 'added') {
|
||||
filtered.push(q.key)
|
||||
filtered.add(q.key)
|
||||
}
|
||||
return filtered
|
||||
}, [])
|
||||
return isEqual(item1, item2, { excludeKeys: key => diffedKeys.includes(key) })
|
||||
}, new Set<string>())
|
||||
|
||||
const item1Filtered = Object.fromEntries(Object.entries(item1).filter(([key]) => !diffedKeys.has(key)))
|
||||
const item2Filtered = Object.fromEntries(Object.entries(item2).filter(([key]) => !diffedKeys.has(key)))
|
||||
|
||||
return isEqual(item1Filtered, item2Filtered)
|
||||
}
|
||||
|
||||
function resolveLinkClass(route, $route, { isActive, isExactActive }: { isActive: boolean, isExactActive: boolean }) {
|
||||
|
||||
@@ -104,7 +104,7 @@ import {
|
||||
import { computedAsync, useDebounceFn } from '@vueuse/core'
|
||||
import { defu } from 'defu'
|
||||
import { twJoin } from 'tailwind-merge'
|
||||
import { isEqual } from 'ohash'
|
||||
import { isEqual } from 'ohash/utils'
|
||||
import UIcon from '../elements/Icon.vue'
|
||||
import UAvatar from '../elements/Avatar.vue'
|
||||
import { useUI } from '../../composables/useUI'
|
||||
|
||||
@@ -141,7 +141,7 @@ import {
|
||||
import { computedAsync, useDebounceFn } from '@vueuse/core'
|
||||
import { defu } from 'defu'
|
||||
import { twJoin } from 'tailwind-merge'
|
||||
import { isEqual } from 'ohash'
|
||||
import { isEqual } from 'ohash/utils'
|
||||
import UIcon from '../elements/Icon.vue'
|
||||
import UAvatar from '../elements/Avatar.vue'
|
||||
import { useUI } from '../../composables/useUI'
|
||||
|
||||
Reference in New Issue
Block a user