Skip to content

chore(release): version packages#102

Merged
Julien-R44 merged 1 commit intomainfrom
changeset-release/main
Mar 17, 2026
Merged

chore(release): version packages#102
Julien-R44 merged 1 commit intomainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Mar 16, 2026

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@tuyau/core@1.2.2

Patch Changes

  • 8ce6877: Fix TuyauPromise not being assignable to Promise<T>, which broke TanStack Query type inference.

    TuyauPromise implemented PromiseLike<T> but was missing [Symbol.toStringTag], so TypeScript did not consider it structurally compatible with Promise<T>. When users passed a tuyau call directly to TanStack Query's queryFn, the data type was inferred as TuyauPromise<Response> instead of Response:

    // Before: data was typed as TuyauPromise<User[]> instead of User[]
    const { data } = useQuery({
      queryKey: ["users"],
      queryFn: () => tuyau.request("users.index", {}),
    });

    TuyauPromise now implements the full Promise<T> interface, so it works seamlessly with TanStack Query and any other library expecting Promise<T>.

  • 8a29325: Fix body type not being recognized when using vine.group with .merge() in validators.

    Previously, validators like this would cause tuyau to lose the body type, resulting in 'body' does not exist in type 'BaseRequestOptions':

    const createSessionValidator = vine.create(
      vine
        .object({})
        .merge(
          vine.group([
            vine.group.if((data) => data.password, { password: vine.string() }),
            vine.group.if((data) => data.assertion, {
              assertion: webauthnAssertion,
            }),
          ]),
        ),
    );

    The tuyau client now correctly accepts both variants of the union:

    // Both calls are now properly typed
    await client.session.store({ body: { password: "secret" } });
    await client.session.store({
      body: { assertion: { id: "...", rawId: "..." } },
    });

@github-actions github-actions Bot force-pushed the changeset-release/main branch from eca12bc to 6d00a24 Compare March 17, 2026 09:31
@Julien-R44 Julien-R44 merged commit 8a547b1 into main Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant