Skip to content

Commit 8a7c61a

Browse files
chore(release): version packages (#97)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 67153e4 commit 8a7c61a

File tree

11 files changed

+223
-74
lines changed

11 files changed

+223
-74
lines changed

.changeset/deep-file-detection.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/query-error-typing.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

.changeset/vue-query-and-query-core.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

packages/core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @tuyau/core
22

3+
## 1.2.1
4+
5+
### Patch Changes
6+
7+
- 2ef9f8e: Fix shallow file detection in request body. `#hasFile` now recursively checks nested objects and arrays (up to 5 levels deep) to properly detect files and switch to multipart/form-data.
8+
39
## 1.2.0
410

511
### Minor Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tuyau/core",
33
"type": "module",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"description": "E2E typesafe client for AdonisJS",
66
"author": "Julien Ripouteau <julien@ripouteau.com>",
77
"license": "MIT",

packages/query-core/CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# @tuyau/query-core
2+
3+
## 1.1.0
4+
5+
### Minor Changes
6+
7+
- 665cd5e: Extract shared utilities into `@tuyau/query-core` and add `@tuyau/vue-query` adapter for TanStack Vue Query.
8+
- `@tuyau/query-core`: New package with framework-agnostic utilities (`buildKey`, `extractKyOptions`, `invoke`, shared types) extracted from `@tuyau/react-query`.
9+
- `@tuyau/react-query`: Refactored to use `@tuyau/query-core` internally. No breaking changes — all existing exports are preserved.
10+
- `@tuyau/vue-query`: New package providing a Vue adapter for TanStack Query, mirroring the `@tuyau/react-query` API with Vue-specific type adaptations.
11+
12+
## `@tuyau/vue-query`
13+
14+
```bash
15+
pnpm add @tuyau/vue-query @tuyau/core @tanstack/vue-query
16+
```
17+
18+
```ts
19+
import { createTuyau } from "@tuyau/core/client";
20+
import { createTuyauVueQueryClient } from "@tuyau/vue-query";
21+
22+
const client = createTuyau<api>({ baseUrl: "http://localhost:3333" });
23+
const tuyau = createTuyauVueQueryClient({ client });
24+
25+
// Queries
26+
useQuery(tuyau.users.index.queryOptions({ query: { name: "John" } }));
27+
28+
// Reactive queries (use a getter for automatic re-evaluation)
29+
const name = ref("John");
30+
useQuery(() =>
31+
tuyau.users.index.queryOptions({ query: { name: name.value } }),
32+
);
33+
34+
// Mutations
35+
const { mutate } = useMutation(tuyau.users.store.mutationOptions());
36+
37+
// Infinite queries
38+
useInfiniteQuery(
39+
tuyau.articles.index.infiniteQueryOptions(
40+
{ query: { limit: 10 } },
41+
{
42+
pageParamKey: "page",
43+
initialPageParam: 1,
44+
getNextPageParam: (p) => p.nextCursor,
45+
},
46+
),
47+
);
48+
49+
// Conditional queries with skipToken
50+
useQuery(
51+
tuyau.users.show.queryOptions(
52+
userId ? { params: { id: userId } } : skipToken,
53+
),
54+
);
55+
56+
// Query invalidation
57+
queryClient.invalidateQueries(tuyau.users.pathFilter());
58+
```
59+
60+
Same API as `@tuyau/react-query` — see its documentation for the full reference.

packages/query-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tuyau/query-core",
33
"type": "module",
4-
"version": "1.0.0",
4+
"version": "1.1.0",
55
"description": "Shared utilities for Tuyau Tanstack Query integrations",
66
"author": "Julien Ripouteau <julien@ripouteau.com>",
77
"license": "MIT",

packages/react-query/CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,81 @@
11
# @tuyau/react-query
22

3+
## 1.1.0
4+
5+
### Minor Changes
6+
7+
- 665cd5e: Extract shared utilities into `@tuyau/query-core` and add `@tuyau/vue-query` adapter for TanStack Vue Query.
8+
- `@tuyau/query-core`: New package with framework-agnostic utilities (`buildKey`, `extractKyOptions`, `invoke`, shared types) extracted from `@tuyau/react-query`.
9+
- `@tuyau/react-query`: Refactored to use `@tuyau/query-core` internally. No breaking changes — all existing exports are preserved.
10+
- `@tuyau/vue-query`: New package providing a Vue adapter for TanStack Query, mirroring the `@tuyau/react-query` API with Vue-specific type adaptations.
11+
12+
## `@tuyau/vue-query`
13+
14+
```bash
15+
pnpm add @tuyau/vue-query @tuyau/core @tanstack/vue-query
16+
```
17+
18+
```ts
19+
import { createTuyau } from "@tuyau/core/client";
20+
import { createTuyauVueQueryClient } from "@tuyau/vue-query";
21+
22+
const client = createTuyau<api>({ baseUrl: "http://localhost:3333" });
23+
const tuyau = createTuyauVueQueryClient({ client });
24+
25+
// Queries
26+
useQuery(tuyau.users.index.queryOptions({ query: { name: "John" } }));
27+
28+
// Reactive queries (use a getter for automatic re-evaluation)
29+
const name = ref("John");
30+
useQuery(() =>
31+
tuyau.users.index.queryOptions({ query: { name: name.value } }),
32+
);
33+
34+
// Mutations
35+
const { mutate } = useMutation(tuyau.users.store.mutationOptions());
36+
37+
// Infinite queries
38+
useInfiniteQuery(
39+
tuyau.articles.index.infiniteQueryOptions(
40+
{ query: { limit: 10 } },
41+
{
42+
pageParamKey: "page",
43+
initialPageParam: 1,
44+
getNextPageParam: (p) => p.nextCursor,
45+
},
46+
),
47+
);
48+
49+
// Conditional queries with skipToken
50+
useQuery(
51+
tuyau.users.show.queryOptions(
52+
userId ? { params: { id: userId } } : skipToken,
53+
),
54+
);
55+
56+
// Query invalidation
57+
queryClient.invalidateQueries(tuyau.users.pathFilter());
58+
```
59+
60+
Same API as `@tuyau/react-query` — see its documentation for the full reference.
61+
62+
### Patch Changes
63+
64+
- 68dec02: Improve end-to-end error type safety for both TanStack Query React and Vue adapters.
65+
66+
`queryOptions()`, `mutationOptions()`, and `infiniteQueryOptions()` now expose typed `TuyauError` instances, so `isStatus()` narrows `error.response` correctly.
67+
68+
```ts
69+
const mutation = useMutation(tuyau.contacts.store.mutationOptions());
70+
71+
if (mutation.error?.isStatus(409)) {
72+
mutation.error.response.existingId;
73+
}
74+
```
75+
76+
- Updated dependencies [665cd5e]
77+
- @tuyau/query-core@1.1.0
78+
379
## 1.0.0
480

581
### Major Changes

packages/react-query/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tuyau/react-query",
33
"type": "module",
4-
"version": "1.0.0",
4+
"version": "1.1.0",
55
"description": "Tanstack Query integration for Tuyau",
66
"author": "Julien Ripouteau <julien@ripouteau.com>",
77
"license": "MIT",

packages/vue-query/CHANGELOG.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# @tuyau/vue-query
2+
3+
## 1.1.0
4+
5+
### Minor Changes
6+
7+
- 665cd5e: Extract shared utilities into `@tuyau/query-core` and add `@tuyau/vue-query` adapter for TanStack Vue Query.
8+
- `@tuyau/query-core`: New package with framework-agnostic utilities (`buildKey`, `extractKyOptions`, `invoke`, shared types) extracted from `@tuyau/react-query`.
9+
- `@tuyau/react-query`: Refactored to use `@tuyau/query-core` internally. No breaking changes — all existing exports are preserved.
10+
- `@tuyau/vue-query`: New package providing a Vue adapter for TanStack Query, mirroring the `@tuyau/react-query` API with Vue-specific type adaptations.
11+
12+
## `@tuyau/vue-query`
13+
14+
```bash
15+
pnpm add @tuyau/vue-query @tuyau/core @tanstack/vue-query
16+
```
17+
18+
```ts
19+
import { createTuyau } from "@tuyau/core/client";
20+
import { createTuyauVueQueryClient } from "@tuyau/vue-query";
21+
22+
const client = createTuyau<api>({ baseUrl: "http://localhost:3333" });
23+
const tuyau = createTuyauVueQueryClient({ client });
24+
25+
// Queries
26+
useQuery(tuyau.users.index.queryOptions({ query: { name: "John" } }));
27+
28+
// Reactive queries (use a getter for automatic re-evaluation)
29+
const name = ref("John");
30+
useQuery(() =>
31+
tuyau.users.index.queryOptions({ query: { name: name.value } }),
32+
);
33+
34+
// Mutations
35+
const { mutate } = useMutation(tuyau.users.store.mutationOptions());
36+
37+
// Infinite queries
38+
useInfiniteQuery(
39+
tuyau.articles.index.infiniteQueryOptions(
40+
{ query: { limit: 10 } },
41+
{
42+
pageParamKey: "page",
43+
initialPageParam: 1,
44+
getNextPageParam: (p) => p.nextCursor,
45+
},
46+
),
47+
);
48+
49+
// Conditional queries with skipToken
50+
useQuery(
51+
tuyau.users.show.queryOptions(
52+
userId ? { params: { id: userId } } : skipToken,
53+
),
54+
);
55+
56+
// Query invalidation
57+
queryClient.invalidateQueries(tuyau.users.pathFilter());
58+
```
59+
60+
Same API as `@tuyau/react-query` — see its documentation for the full reference.
61+
62+
### Patch Changes
63+
64+
- 68dec02: Improve end-to-end error type safety for both TanStack Query React and Vue adapters.
65+
66+
`queryOptions()`, `mutationOptions()`, and `infiniteQueryOptions()` now expose typed `TuyauError` instances, so `isStatus()` narrows `error.response` correctly.
67+
68+
```ts
69+
const mutation = useMutation(tuyau.contacts.store.mutationOptions());
70+
71+
if (mutation.error?.isStatus(409)) {
72+
mutation.error.response.existingId;
73+
}
74+
```
75+
76+
- Updated dependencies [665cd5e]
77+
- @tuyau/query-core@1.1.0

0 commit comments

Comments
 (0)