diff --git a/.changeset/dry-jeans-ring.md b/.changeset/dry-jeans-ring.md deleted file mode 100644 index 13638cde5..000000000 --- a/.changeset/dry-jeans-ring.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hey-api/openapi-ts': patch ---- - -feat: support multiple configurations diff --git a/.changeset/pretty-deers-change.md b/.changeset/pretty-deers-change.md deleted file mode 100644 index 2302687b3..000000000 --- a/.changeset/pretty-deers-change.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@hey-api/openapi-ts': minor ---- - -refactor(config): replace 'off' with null to disable options - -### Updated `output` options - -We made the `output` configuration more consistent by using `null` to represent disabled options. [This change](https://heyapi.dev/openapi-ts/migrating#updated-output-options) does not affect boolean options. - -```js -export default { - input: 'hey-api/backend', // sign up at app.heyapi.dev - output: { - format: null, - lint: null, - path: 'src/client', - tsConfigPath: null, - }, -}; -``` diff --git a/.changeset/red-bats-eat.md b/.changeset/red-bats-eat.md deleted file mode 100644 index 1932da46d..000000000 --- a/.changeset/red-bats-eat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hey-api/openapi-ts': patch ---- - -feat(config): add `output.importFileExtension` option diff --git a/.changeset/refactor-pinia-colada-query.md b/.changeset/refactor-pinia-colada-query.md deleted file mode 100644 index 8c231d0f8..000000000 --- a/.changeset/refactor-pinia-colada-query.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -"@hey-api/openapi-ts": patch ---- - -feat(pinia-colada): query options use `defineQueryOptions` - -### Updated Pinia Colada query options - -Pinia Colada query options now use `defineQueryOptions` to improve reactivity support. Instead of calling the query options function, you can use one of the [following approaches](https://heyapi.dev/openapi-ts/migrating#updated-pinia-colada-query-options). - -#### No params - -```ts -useQuery(getPetsQuery); -``` - -#### Constant - -```ts -useQuery(getPetByIdQuery, () => ({ - path: { - petId: 1, - }, -})); -``` - -#### Reactive - -```ts -const petId = ref(1); - -useQuery(getPetByIdQuery, () => ({ - path: { - petId: petId.value, - }, -})); -``` - -#### Properties - -```ts -const petId = ref(1); - -useQuery(() => ({ - ...getPetByIdQuery({ - path: { petId: petId.value as number }, - }), - enabled: () => petId.value != null, -})); -``` diff --git a/packages/openapi-ts/CHANGELOG.md b/packages/openapi-ts/CHANGELOG.md index d4b1b327c..ca559f708 100644 --- a/packages/openapi-ts/CHANGELOG.md +++ b/packages/openapi-ts/CHANGELOG.md @@ -1,5 +1,80 @@ # @hey-api/openapi-ts +## 0.85.0 + +### Minor Changes + +- refactor(config): replace 'off' with null to disable options ([#2718](https://github.com/hey-api/openapi-ts/pull/2718)) ([`fcdd73b`](https://github.com/hey-api/openapi-ts/commit/fcdd73b816d74babf47e6a1f46032f5b8ebb4b48)) by [@mrlubos](https://github.com/mrlubos) + +### Updated `output` options + +We made the `output` configuration more consistent by using `null` to represent disabled options. [This change](https://heyapi.dev/openapi-ts/migrating#updated-output-options) does not affect boolean options. + +```js +export default { + input: 'hey-api/backend', // sign up at app.heyapi.dev + output: { + format: null, + lint: null, + path: 'src/client', + tsConfigPath: null, + }, +}; +``` + +### Patch Changes + +- feat: support multiple configurations ([#2602](https://github.com/hey-api/openapi-ts/pull/2602)) ([`c84f10e`](https://github.com/hey-api/openapi-ts/commit/c84f10e5a1b7c54320e3ef5edfc9d2fffe5183e9)) by [@carson2222](https://github.com/carson2222) + +- feat(config): add `output.importFileExtension` option ([#2718](https://github.com/hey-api/openapi-ts/pull/2718)) ([`fcdd73b`](https://github.com/hey-api/openapi-ts/commit/fcdd73b816d74babf47e6a1f46032f5b8ebb4b48)) by [@mrlubos](https://github.com/mrlubos) + +- feat(pinia-colada): query options use `defineQueryOptions` ([#2610](https://github.com/hey-api/openapi-ts/pull/2610)) ([`33e6b31`](https://github.com/hey-api/openapi-ts/commit/33e6b31fa2ab840dd4e6e2e3e0fbc6e207ccdf7e)) by [@brolnickij](https://github.com/brolnickij) + +### Updated Pinia Colada query options + +Pinia Colada query options now use `defineQueryOptions` to improve reactivity support. Instead of calling the query options function, you can use one of the [following approaches](https://heyapi.dev/openapi-ts/migrating#updated-pinia-colada-query-options). + +#### No params + +```ts +useQuery(getPetsQuery); +``` + +#### Constant + +```ts +useQuery(getPetByIdQuery, () => ({ + path: { + petId: 1, + }, +})); +``` + +#### Reactive + +```ts +const petId = ref(1); + +useQuery(getPetByIdQuery, () => ({ + path: { + petId: petId.value, + }, +})); +``` + +#### Properties + +```ts +const petId = ref(1); + +useQuery(() => ({ + ...getPetByIdQuery({ + path: { petId: petId.value as number }, + }), + enabled: () => petId.value != null, +})); +``` + ## 0.84.4 ### Patch Changes @@ -95,7 +170,8 @@ export default { - fix(axios): remove duplicate `baseURL` when using relative values ([#2624](https://github.com/hey-api/openapi-ts/pull/2624)) ([`8ffceec`](https://github.com/hey-api/openapi-ts/commit/8ffceec89fe471d4e14df17a172f3d5a254eb819)) by [@Ben-Pfirsich](https://github.com/Ben-Pfirsich) ### Updated Dependencies: - - @hey-api/codegen-core@0.2.0 + +- @hey-api/codegen-core@0.2.0 ## 0.83.1 diff --git a/packages/openapi-ts/package.json b/packages/openapi-ts/package.json index bb2b88780..08f688134 100644 --- a/packages/openapi-ts/package.json +++ b/packages/openapi-ts/package.json @@ -1,6 +1,6 @@ { "name": "@hey-api/openapi-ts", - "version": "0.84.4", + "version": "0.85.0", "description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.", "homepage": "https://heyapi.dev/", "repository": {