Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ea6b6b

Browse files
feat(deps): upgrade to zero v0.22 (#100)
1 parent 4795f2c commit 6ea6b6b

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dist"
1818
],
1919
"engines": {
20-
"node": ">=20.0.0"
20+
"node": ">=22"
2121
},
2222
"scripts": {
2323
"build": "unbuild",
@@ -35,7 +35,7 @@
3535
"vue": "^3.5.13"
3636
},
3737
"dependencies": {
38-
"@rocicorp/zero": "^0.21.0"
38+
"@rocicorp/zero": "^0.22.0"
3939
},
4040
"devDependencies": {
4141
"@antfu/eslint-config": "latest",

pnpm-lock.yaml

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/query.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type { HumanReadable, Query, ResultType, Schema, TTL } from '@rocicorp/ze
44
import type { ComputedRef, MaybeRefOrGetter } from 'vue'
55
import type { VueView } from './view'
66

7-
import { DEFAULT_TTL } from '@rocicorp/zero'
87
import {
98
computed,
109
getCurrentInstance,
@@ -15,6 +14,8 @@ import {
1514
} from 'vue'
1615
import { vueViewFactory } from './view'
1716

17+
const DEFAULT_TTL_MS = 1_000 * 60 * 5
18+
1819
export interface UseQueryOptions {
1920
ttl?: TTL | undefined
2021
}
@@ -33,7 +34,7 @@ export function useQuery<
3334
options?: MaybeRefOrGetter<UseQueryOptions>,
3435
): QueryResult<TReturn> {
3536
const ttl = computed(() => {
36-
return toValue(options)?.ttl ?? DEFAULT_TTL
37+
return toValue(options)?.ttl ?? DEFAULT_TTL_MS
3738
})
3839
const view = shallowRef<VueView<HumanReadable<TReturn>> | null>(null)
3940

0 commit comments

Comments
 (0)