Skip to content

Commit b5443ac

Browse files
committed
Revert "feat: support vite 6"
This reverts commit d19dbff.
1 parent c3fa48b commit b5443ac

File tree

5 files changed

+73
-180
lines changed

5 files changed

+73
-180
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
"mlly": "^1.7.3",
179179
"pathe": "^1.1.2",
180180
"scule": "^1.3.0",
181-
"unplugin": "2.0.0-beta.1",
181+
"unplugin": "^1.16.0",
182182
"yaml": "^2.6.1"
183183
},
184184
"peerDependencies": {
@@ -219,7 +219,7 @@
219219
"unplugin-auto-import": "^0.18.6",
220220
"unplugin-vue-markdown": "^0.26.3",
221221
"unplugin-vue-router": "workspace:*",
222-
"vite": "^6.0.1",
222+
"vite": "^5.4.11",
223223
"vite-plugin-vue-devtools": "^7.6.7",
224224
"vitepress": "1.5.0",
225225
"vitest": "^2.1.6",

playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"@vue/tsconfig": "^0.6.0",
1313
"json-server": "^0.17.4",
1414
"unplugin-vue-router": "workspace:*",
15-
"vite": "^6.0.1",
16-
"vite-plugin-inspect": "^0.10.1"
15+
"vite": "^5.4.11",
16+
"vite-plugin-inspect": "^0.8.8"
1717
},
1818
"dependencies": {
1919
"@tanstack/vue-query": "^5.60.6",

playground/src/pages/users/colada-loader.[id].vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts" setup>
22
import { simulateError, useUserData } from '@/loaders/colada-loaders'
3-
import { serializeTreeMap, useQueryCache } from '@pinia/colada'
3+
import { serializeTreeMap } from '@pinia/colada'
4+
import { getActivePinia } from 'pinia'
45
56
definePage({
67
meta: {
@@ -9,9 +10,16 @@ definePage({
910
})
1011
1112
const route = useRoute('/users/colada-loader.[id]')
12-
const queryCache = useQueryCache()
13+
14+
const pinia = getActivePinia()!
1315
function copy() {
14-
console.log(JSON.parse(JSON.stringify(serializeTreeMap(queryCache.caches))))
16+
console.log(
17+
JSON.parse(
18+
JSON.stringify(
19+
serializeTreeMap(pinia.state.value._pc_query.entryRegistry)
20+
)
21+
)
22+
)
1523
}
1624
1725
const {

playground/src/pages/users/pinia-colada.[id].vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,28 @@ const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
33
</script>
44

55
<script lang="ts" setup>
6-
import { ref } from 'vue'
7-
import { useQuery, serializeTreeMap, useQueryCache } from '@pinia/colada'
6+
import { computed, ref } from 'vue'
7+
import { useQuery, serialize } from '@pinia/colada'
8+
import { getActivePinia } from 'pinia'
89
910
const route = useRoute('/users/[id]')
1011
1112
const simulateError = ref(false)
1213
13-
const queryCache = useQueryCache()
14-
14+
const pinia = getActivePinia()!
1515
function copy() {
16-
console.log(JSON.parse(JSON.stringify(serializeTreeMap(queryCache.caches))))
16+
console.log(
17+
JSON.parse(
18+
JSON.stringify(serialize(pinia.state.value._pc_query.entryRegistry))
19+
)
20+
)
1721
}
1822
1923
const {
2024
data: pcUSer,
2125
status,
2226
error: pcError,
23-
isLoading: pcIsFetching,
27+
isFetching: pcIsFetching,
2428
refetch,
2529
refresh,
2630
} = useQuery({

0 commit comments

Comments
 (0)