diff --git a/.changeset/pre.json b/.changeset/pre.json index d506993af..37ecebd45 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -51,6 +51,7 @@ "client-templates-copy-real-files", "consolidate-jsx-renderer", "consolidate-tanstack-query-clones", + "consolidate-url-template-into-kubb-kit", "consume-ast-utils", "curly-areas-sit", "cypress-quote-non-identifier-query-params", @@ -164,6 +165,7 @@ "rare-birds-beg", "react-query-suspense-no-enabled", "react-query-value-or-getter-params", + "react-query-vue-query-hookless-variant-files", "redoc-template-options-unknown", "reduce-generator-type-casts", "refresh-package-descriptions", diff --git a/packages/plugin-cypress/CHANGELOG.md b/packages/plugin-cypress/CHANGELOG.md index 92d66d92b..06d78100e 100644 --- a/packages/plugin-cypress/CHANGELOG.md +++ b/packages/plugin-cypress/CHANGELOG.md @@ -1,5 +1,11 @@ # @kubb/plugin-cypress +## 5.0.0-beta.100 + +### Patch Changes + +- [#692](https://github.com/kubb-labs/plugins/pull/692) [`3d6f94b`](https://github.com/kubb-labs/plugins/commit/3d6f94b08174be0f39175bd6f641bea00c9459b0) Thanks [@stijnvanhulle](https://github.com/stijnvanhulle)! - Consume the `Url` path-template helper from `kubb/kit` instead of a locally duplicated copy in `@internals/utils`, now that kubb core exposes `Url.toSafeTemplate` and `Url.toGroupedTemplateString` alongside its existing `toPath`/`toTemplateString`/`toObject`. Requires `kubb`/`@kubb/kit` 5.0.0-beta.98 or later. + ## 5.0.0-beta.99 ### Minor Changes diff --git a/packages/plugin-cypress/package.json b/packages/plugin-cypress/package.json index 59d12d834..ba567501e 100644 --- a/packages/plugin-cypress/package.json +++ b/packages/plugin-cypress/package.json @@ -1,6 +1,6 @@ { "name": "@kubb/plugin-cypress", - "version": "5.0.0-beta.99", + "version": "5.0.0-beta.100", "description": "Generate Cypress request commands and e2e test fixtures with Kubb for automated API testing.", "keywords": [ "code-generation", diff --git a/packages/plugin-msw/CHANGELOG.md b/packages/plugin-msw/CHANGELOG.md index 49949e7dc..68c288960 100644 --- a/packages/plugin-msw/CHANGELOG.md +++ b/packages/plugin-msw/CHANGELOG.md @@ -1,5 +1,11 @@ # @kubb/plugin-msw +## 5.0.0-beta.100 + +### Patch Changes + +- [#692](https://github.com/kubb-labs/plugins/pull/692) [`3d6f94b`](https://github.com/kubb-labs/plugins/commit/3d6f94b08174be0f39175bd6f641bea00c9459b0) Thanks [@stijnvanhulle](https://github.com/stijnvanhulle)! - Consume the `Url` path-template helper from `kubb/kit` instead of a locally duplicated copy in `@internals/utils`, now that kubb core exposes `Url.toSafeTemplate` and `Url.toGroupedTemplateString` alongside its existing `toPath`/`toTemplateString`/`toObject`. Requires `kubb`/`@kubb/kit` 5.0.0-beta.98 or later. + ## 5.0.0-beta.99 ### Patch Changes diff --git a/packages/plugin-msw/package.json b/packages/plugin-msw/package.json index 8bfff92a1..06f1b3c48 100644 --- a/packages/plugin-msw/package.json +++ b/packages/plugin-msw/package.json @@ -1,6 +1,6 @@ { "name": "@kubb/plugin-msw", - "version": "5.0.0-beta.99", + "version": "5.0.0-beta.100", "description": "Generate Mock Service Worker (MSW) request handlers with Kubb. Intercept HTTP requests in the browser or Node.js for frontend development and testing.", "keywords": [ "api-mocking", diff --git a/packages/plugin-react-query/CHANGELOG.md b/packages/plugin-react-query/CHANGELOG.md index 49702b179..3e1f403ab 100644 --- a/packages/plugin-react-query/CHANGELOG.md +++ b/packages/plugin-react-query/CHANGELOG.md @@ -1,5 +1,20 @@ # @kubb/plugin-react-query +## 5.0.0-beta.100 + +### Major Changes + +- [#697](https://github.com/kubb-labs/plugins/pull/697) [`21e9408`](https://github.com/kubb-labs/plugins/commit/21e9408b20b69bfb9db099bc6d40b710d724e05c) Thanks [@stijnvanhulle](https://github.com/stijnvanhulle)! - Skip suspense and infinite query files entirely when `hooks` is `false`, and default `pluginReactQuery`'s `suspense` option to `false`. + + With `hooks: false` (the default), the suspense and infinite generators still resolved and wrote a file. They only skipped the `use*` hook body, so every query operation got a `Suspense`/`Infinite`-suffixed `queryOptions`/`queryKey` pair with no way to call the hook it was named for. The generators now check `hooks` before resolving a file at all, the same guard `hookOptionsGenerator` already used, so those files stop generating unless you opt into hooks. + + `pluginReactQuery`'s `suspense` option now defaults to `false` instead of `{}`, matching `infinite`'s existing off-by-default convention. Combined with the fix above, this also clears the suspense boilerplate for anyone who left `suspense` unset. + + **Breaking change:** + + - `pluginReactQuery({ suspense: {} })` is required to opt back into suspense query generation; unset `suspense` no longer generates anything. + - Any config with `suspense`, `infinite`, or both set while leaving `hooks` at its default (`false`) stops emitting `SuspenseQueryOptions`, `SuspenseInfiniteQueryOptions`, and `InfiniteQueryOptions` (and their matching query key exports). Set `hooks: true` to keep generating them. + ## 5.0.0-beta.99 ### Minor Changes diff --git a/packages/plugin-react-query/package.json b/packages/plugin-react-query/package.json index ac0aa7a56..a15e4a0ab 100644 --- a/packages/plugin-react-query/package.json +++ b/packages/plugin-react-query/package.json @@ -1,6 +1,6 @@ { "name": "@kubb/plugin-react-query", - "version": "5.0.0-beta.99", + "version": "5.0.0-beta.100", "description": "Generate type-safe TanStack Query (React Query) hooks with Kubb. Covers useQuery, useMutation, useInfiniteQuery, and queryOptions with full TypeScript support.", "keywords": [ "code-generation", diff --git a/packages/plugin-vue-query/CHANGELOG.md b/packages/plugin-vue-query/CHANGELOG.md index b2cc2c259..e31cbbdcc 100644 --- a/packages/plugin-vue-query/CHANGELOG.md +++ b/packages/plugin-vue-query/CHANGELOG.md @@ -1,5 +1,20 @@ # @kubb/plugin-vue-query +## 5.0.0-beta.100 + +### Major Changes + +- [#697](https://github.com/kubb-labs/plugins/pull/697) [`21e9408`](https://github.com/kubb-labs/plugins/commit/21e9408b20b69bfb9db099bc6d40b710d724e05c) Thanks [@stijnvanhulle](https://github.com/stijnvanhulle)! - Skip suspense and infinite query files entirely when `hooks` is `false`, and default `pluginReactQuery`'s `suspense` option to `false`. + + With `hooks: false` (the default), the suspense and infinite generators still resolved and wrote a file. They only skipped the `use*` hook body, so every query operation got a `Suspense`/`Infinite`-suffixed `queryOptions`/`queryKey` pair with no way to call the hook it was named for. The generators now check `hooks` before resolving a file at all, the same guard `hookOptionsGenerator` already used, so those files stop generating unless you opt into hooks. + + `pluginReactQuery`'s `suspense` option now defaults to `false` instead of `{}`, matching `infinite`'s existing off-by-default convention. Combined with the fix above, this also clears the suspense boilerplate for anyone who left `suspense` unset. + + **Breaking change:** + + - `pluginReactQuery({ suspense: {} })` is required to opt back into suspense query generation; unset `suspense` no longer generates anything. + - Any config with `suspense`, `infinite`, or both set while leaving `hooks` at its default (`false`) stops emitting `SuspenseQueryOptions`, `SuspenseInfiniteQueryOptions`, and `InfiniteQueryOptions` (and their matching query key exports). Set `hooks: true` to keep generating them. + ## 5.0.0-beta.99 ### Minor Changes diff --git a/packages/plugin-vue-query/package.json b/packages/plugin-vue-query/package.json index 15dc0fd3e..7fb84edc5 100644 --- a/packages/plugin-vue-query/package.json +++ b/packages/plugin-vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@kubb/plugin-vue-query", - "version": "5.0.0-beta.99", + "version": "5.0.0-beta.100", "description": "Generate type-safe TanStack Query (Vue Query) composables with Kubb. Covers useQuery, useMutation, useInfiniteQuery, and queryOptions with Vue 3 Composition API support.", "keywords": [ "code-generation", diff --git a/tests/3.0.x/CHANGELOG.md b/tests/3.0.x/CHANGELOG.md index 7965fca2a..92300b5f8 100644 --- a/tests/3.0.x/CHANGELOG.md +++ b/tests/3.0.x/CHANGELOG.md @@ -1,5 +1,15 @@ # tests-3.0.x +## 0.0.1-beta.41 + +### Patch Changes + +- Updated dependencies [[`3d6f94b`](https://github.com/kubb-labs/plugins/commit/3d6f94b08174be0f39175bd6f641bea00c9459b0), [`21e9408`](https://github.com/kubb-labs/plugins/commit/21e9408b20b69bfb9db099bc6d40b710d724e05c)]: + - @kubb/plugin-cypress@5.0.0-beta.100 + - @kubb/plugin-msw@5.0.0-beta.100 + - @kubb/plugin-react-query@5.0.0-beta.100 + - @kubb/plugin-vue-query@5.0.0-beta.100 + ## 0.0.1-beta.40 ### Patch Changes diff --git a/tests/3.0.x/package.json b/tests/3.0.x/package.json index 31635b98e..1ef6d3d49 100644 --- a/tests/3.0.x/package.json +++ b/tests/3.0.x/package.json @@ -1,6 +1,6 @@ { "name": "tests-3.0.x", - "version": "0.0.1-beta.40", + "version": "0.0.1-beta.41", "private": true, "description": "Integration tests for OpenAPI 3.0.x", "license": "MIT", diff --git a/tests/e2e/CHANGELOG.md b/tests/e2e/CHANGELOG.md index 5e7bb0d7f..8b58a0360 100644 --- a/tests/e2e/CHANGELOG.md +++ b/tests/e2e/CHANGELOG.md @@ -1,5 +1,14 @@ # e2e +## 0.0.1-beta.34 + +### Patch Changes + +- Updated dependencies [[`3d6f94b`](https://github.com/kubb-labs/plugins/commit/3d6f94b08174be0f39175bd6f641bea00c9459b0), [`21e9408`](https://github.com/kubb-labs/plugins/commit/21e9408b20b69bfb9db099bc6d40b710d724e05c)]: + - @kubb/plugin-cypress@5.0.0-beta.100 + - @kubb/plugin-msw@5.0.0-beta.100 + - @kubb/plugin-react-query@5.0.0-beta.100 + ## 0.0.1-beta.33 ### Patch Changes diff --git a/tests/e2e/package.json b/tests/e2e/package.json index 88ccfdbae..f2745b458 100644 --- a/tests/e2e/package.json +++ b/tests/e2e/package.json @@ -1,6 +1,6 @@ { "name": "e2e", - "version": "0.0.1-beta.33", + "version": "0.0.1-beta.34", "private": true, "description": "", "license": "MIT",