Skip to content

Commit 7408964

Browse files
authored
feat: More vue improvements (#3585)
1 parent 6809480 commit 7408964

22 files changed

+2190
-219
lines changed

.changeset/plenty-sloths-battle.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@data-client/vue': patch
3+
---
4+
5+
renderDataClient -> mountDataClient
6+
renderDataComposable -> renderDataClient

.changeset/proud-rooms-pick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@data-client/vue': patch
3+
---
4+
5+
Make composables reactive to computed props

.changeset/small-wasps-win.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@data-client/vue': patch
3+
---
4+
5+
Add useCache()

packages/vue/src/__tests__/integration-garbage-collection.web.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { defineComponent, h } from 'vue';
44
import { Article, ArticleResource } from '../../../../__tests__/new';
55
import useQuery from '../consumers/useQuery';
66
import useSuspense from '../consumers/useSuspense';
7-
import { renderDataComposable, renderDataClient } from '../test';
7+
import { renderDataClient, mountDataClient } from '../test';
88

99
const GC_INTERVAL = 100; // Use short interval for faster tests
1010

@@ -17,7 +17,7 @@ describe('Integration Garbage Collection Web (Vue)', () => {
1717
expect(gcPolicy).toBeDefined();
1818
});
1919

20-
it('should accept gcPolicy option in renderDataClient', () => {
20+
it('should accept gcPolicy option in mountDataClient', () => {
2121
const TestComp = defineComponent({
2222
name: 'TestComp',
2323
setup() {
@@ -30,7 +30,7 @@ describe('Integration Garbage Collection Web (Vue)', () => {
3030
expiryMultiplier: 2,
3131
});
3232

33-
const { wrapper, cleanup } = renderDataClient(TestComp, {
33+
const { wrapper, cleanup } = mountDataClient(TestComp, {
3434
gcPolicy,
3535
});
3636

@@ -45,7 +45,7 @@ describe('Integration Garbage Collection Web (Vue)', () => {
4545
content: 'Test Content',
4646
};
4747

48-
const { result, cleanup, waitForNextUpdate } = renderDataComposable(
48+
const { result, cleanup, waitForNextUpdate } = renderDataClient(
4949
() => useSuspense(ArticleResource.get, { id: 1 }),
5050
{
5151
initialFixtures: [
@@ -77,7 +77,7 @@ describe('Integration Garbage Collection Web (Vue)', () => {
7777
{ id: 2, title: 'Article 2', content: 'Content 2' },
7878
];
7979

80-
const { result, cleanup } = renderDataComposable(
80+
const { result, cleanup } = renderDataClient(
8181
() => useQuery(ArticleResource.getList.schema),
8282
{
8383
initialFixtures: [
@@ -116,7 +116,7 @@ describe('Integration Garbage Collection Web (Vue)', () => {
116116
});
117117

118118
// Test with expiryMultiplier of 4
119-
const { cleanup: cleanup1 } = renderDataClient(TestComp, {
119+
const { cleanup: cleanup1 } = mountDataClient(TestComp, {
120120
initialFixtures: [
121121
{
122122
endpoint: ArticleResource.get,
@@ -133,7 +133,7 @@ describe('Integration Garbage Collection Web (Vue)', () => {
133133
cleanup1();
134134

135135
// Test with expiryMultiplier of 2 (default in tests)
136-
const { cleanup: cleanup2 } = renderDataClient(TestComp, {
136+
const { cleanup: cleanup2 } = mountDataClient(TestComp, {
137137
initialFixtures: [
138138
{
139139
endpoint: ArticleResource.get,

0 commit comments

Comments
 (0)