Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhihengGet committed Feb 28, 2024
1 parent 603c97e commit 7067a67
Show file tree
Hide file tree
Showing 5 changed files with 5,879 additions and 382 deletions.
2 changes: 1 addition & 1 deletion examples/svelte/svelte-melt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.1",
"svelte": "5.0.0-next.66",
"svelte": "5.0.0-next.68",
"svelte-check": "^3.6.4",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
Expand Down
6 changes: 4 additions & 2 deletions examples/svelte/svelte-melt/src/routes/paginate.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
let b = ['hi', bookFilterStore];
const data = createQuery(() => {
return {
queryKey: ['hi', bookFilterStore],
queryKey: ['paginate', bookFilterStore],
queryFn: async () => {
debugger;
const s = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'].map((v) => {
return { title: v };
});
Expand All @@ -16,7 +17,8 @@
}
return s.slice(5, 6);
},
staleTime: 5000
staleTime: 5000,
enabled: bookFilterStore.paginate.page % 2 == 1
};
});
/* const querycache = useQueryClient().getQueryCache();
Expand Down
15 changes: 7 additions & 8 deletions packages/svelte-query-runes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-query",
"version": "5.14.2-beta.17",
"name": "svelte-query-runes",
"version": "5.14.2-beta.18",
"private": false,
"description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte",
"author": "zhiheng",
Expand All @@ -19,11 +19,12 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"svelte": "./dist/index.js"
},
"./dev": {
"types": "./dist/index.d.ts",
"default": "./src/index"
"default": "./src/index",
"svelte": "./dist/index.js"
}
},
"files": [
Expand All @@ -44,16 +45,14 @@
"pack": "pnpm pack --pack-destination"
},
"dependencies": {
"@tanstack/query-core": "workspace:^",
"@types/lodash-es": "^4.17.12",
"lodash-es": "^4.17.21"
"@tanstack/query-core": "workspace:^"
},
"devDependencies": {
"@sveltejs/package": "^2.2.7",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"@testing-library/svelte": "^4.1.0",
"eslint-plugin-svelte": "^2.35.1",
"svelte": "4.2.12",
"svelte": "5.0.0-next.68",
"svelte-check": "^3.6.5",
"svelte-eslint-parser": "^0.33.1"
},
Expand Down
4 changes: 0 additions & 4 deletions packages/svelte-query-runes/src/createBaseQuery.svelte.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { notifyManager } from '@tanstack/query-core'
import { cloneDeep } from 'lodash-es'
import { unstate, untrack } from 'svelte'
import { useIsRestoring } from './useIsRestoring'
import { useQueryClient } from './useQueryClient'
Expand All @@ -11,9 +10,6 @@ import type {
QueryObserverResult,
} from '@tanstack/query-core'

function clone(v: any) {
return cloneDeep(v)
}
export function createBaseQuery<
TQueryFnData,
TError,
Expand Down
Loading

0 comments on commit 7067a67

Please sign in to comment.