diff --git a/.changeset/beige-rocks-remain.md b/.changeset/beige-rocks-remain.md deleted file mode 100644 index bda31391ae..0000000000 --- a/.changeset/beige-rocks-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hey-api/openapi-ts': patch ---- - -fix(plugin): every plugin extends Plugin.Hooks interface diff --git a/.changeset/eleven-beans-sort.md b/.changeset/eleven-beans-sort.md deleted file mode 100644 index 8851e045b5..0000000000 --- a/.changeset/eleven-beans-sort.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@hey-api/openapi-ts': patch ---- - -fix(renderer): group and sort imported modules - -### TypeScript renderer - -We ship a dedicated TypeScript renderer for `.ts` files. This release improves the renderer's ability to group and sort imported modules, resulting in a more polished output. diff --git a/.changeset/fix-zod-union-deduplication.md b/.changeset/fix-zod-union-deduplication.md deleted file mode 100644 index a0c4ee6e1c..0000000000 --- a/.changeset/fix-zod-union-deduplication.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hey-api/openapi-ts": patch ---- - -fix(parser): expand schema deduplication by including validation constraints in type ID diff --git a/.changeset/gorgeous-spiders-build.md b/.changeset/gorgeous-spiders-build.md deleted file mode 100644 index 8a1b879901..0000000000 --- a/.changeset/gorgeous-spiders-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hey-api/openapi-ts': patch ---- - -fix(parser): bump support for OpenAPI 3.1.2 diff --git a/.changeset/healthy-experts-grow.md b/.changeset/healthy-experts-grow.md deleted file mode 100644 index 75f73efa48..0000000000 --- a/.changeset/healthy-experts-grow.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -'@hey-api/openapi-ts': patch ---- - -fix(config): add `output.fileName` option - -## File Name - -You can customize the naming and casing pattern for files using the `fileName` option. - -```js -export default { - input: 'hey-api/backend', // sign up at app.heyapi.dev - output: { - fileName: '{{name}}', - path: 'src/client', - }, -}; -``` - -By default, we append every file name with a `.gen` suffix to highlight it's automatically generated. You can customize or disable this suffix using the `fileName.suffix` option. - -```js -export default { - input: 'hey-api/backend', // sign up at app.heyapi.dev - output: { - fileName: { - suffix: '.gen', - }, - path: 'src/client', - }, -}; -``` diff --git a/.changeset/rare-kangaroos-try.md b/.changeset/rare-kangaroos-try.md deleted file mode 100644 index 738b5d72bf..0000000000 --- a/.changeset/rare-kangaroos-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hey-api/openapi-ts": patch ---- - -fix(axios): remove duplicate `baseURL` when using relative values diff --git a/.changeset/selfish-hornets-beg.md b/.changeset/selfish-hornets-beg.md deleted file mode 100644 index f42cc58b6b..0000000000 --- a/.changeset/selfish-hornets-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hey-api/codegen-core': minor ---- - -feat: Symbol API diff --git a/.changeset/two-buses-dance.md b/.changeset/two-buses-dance.md deleted file mode 100644 index 8a2e300a68..0000000000 --- a/.changeset/two-buses-dance.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@hey-api/openapi-ts': minor ---- - -feat: Symbol API - -### Symbol API - -This release improves the Symbol API, which adds the capability to place symbols in arbitrary files. We preserved the previous output structure for all plugins except Angular. - -You can preserve the previous Angular output by writing your own [placement function](https://heyapi.dev/openapi-ts/configuration/parser#hooks-symbols). - -### Removed `output` plugin option - -Due to the Symbol API release, this option has been removed from the Plugin API. diff --git a/packages/codegen-core/CHANGELOG.md b/packages/codegen-core/CHANGELOG.md index eeb500c37f..a2b9aaea7f 100644 --- a/packages/codegen-core/CHANGELOG.md +++ b/packages/codegen-core/CHANGELOG.md @@ -1,5 +1,11 @@ # @hey-api/codegen-core +## 0.2.0 + +### Minor Changes + +- feat: Symbol API ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos) + ## 0.1.0 ### Minor Changes diff --git a/packages/codegen-core/package.json b/packages/codegen-core/package.json index 985202982c..45c6e1c373 100644 --- a/packages/codegen-core/package.json +++ b/packages/codegen-core/package.json @@ -1,6 +1,6 @@ { "name": "@hey-api/codegen-core", - "version": "0.1.0", + "version": "0.2.0", "description": "🧱 TypeScript framework for generating structured, multi-file source code from abstract syntax trees.", "homepage": "https://heyapi.dev/", "repository": { diff --git a/packages/openapi-ts/CHANGELOG.md b/packages/openapi-ts/CHANGELOG.md index c4aa21c90b..19352c6197 100644 --- a/packages/openapi-ts/CHANGELOG.md +++ b/packages/openapi-ts/CHANGELOG.md @@ -1,5 +1,69 @@ # @hey-api/openapi-ts +## 0.84.0 + +### Minor Changes + +- feat: Symbol API + +### Symbol API + +This release improves the Symbol API, which adds the capability to place symbols in arbitrary files. We preserved the previous output structure for all plugins except Angular. + +You can preserve the previous Angular output by writing your own [placement function](https://heyapi.dev/openapi-ts/configuration/parser#hooks-symbols). + +### Removed `output` plugin option + +Due to the Symbol API release, this option has been removed from the Plugin API. ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos) + +### Patch Changes + +- fix(plugin): every plugin extends Plugin.Hooks interface ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos) + +- fix(renderer): group and sort imported modules + +### TypeScript renderer + +We ship a dedicated TypeScript renderer for `.ts` files. This release improves the renderer's ability to group and sort imported modules, resulting in a more polished output. ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos) + +- fix(parser): expand schema deduplication by including validation constraints in type ID ([#2650](https://github.com/hey-api/openapi-ts/pull/2650)) ([`31b3933`](https://github.com/hey-api/openapi-ts/commit/31b3933b2caa1085dbead1ef94695bca4b83d6ac)) by [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent) + +- fix(parser): bump support for OpenAPI 3.1.2 ([#2667](https://github.com/hey-api/openapi-ts/pull/2667)) ([`3511fb8`](https://github.com/hey-api/openapi-ts/commit/3511fb88cbe6b767b631af16336cb6c0722c3ff8)) by [@mrlubos](https://github.com/mrlubos) + +- fix(config): add `output.fileName` option + +## File Name + +You can customize the naming and casing pattern for files using the `fileName` option. + +```js +export default { + input: 'hey-api/backend', // sign up at app.heyapi.dev + output: { + fileName: '{{name}}', + path: 'src/client', + }, +}; +``` + +By default, we append every file name with a `.gen` suffix to highlight it's automatically generated. You can customize or disable this suffix using the `fileName.suffix` option. + +````js +export default { + input: 'hey-api/backend', // sign up at app.heyapi.dev + output: { + fileName: { + suffix: '.gen', + }, + path: 'src/client', + }, +}; +``` ([#2664](https://github.com/hey-api/openapi-ts/pull/2664)) ([`e1ede9c`](https://github.com/hey-api/openapi-ts/commit/e1ede9cabf52b5bbcb9195570deff58db8f43dbb)) by [@mrlubos](https://github.com/mrlubos) + +- 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 + ## 0.83.1 ### Patch Changes @@ -104,7 +168,7 @@ This option has been removed to provide a more consistent API across plugins. We }, }, }; - ``` +```` ### Patch Changes diff --git a/packages/openapi-ts/package.json b/packages/openapi-ts/package.json index e38f8ee0a7..1121395c4d 100644 --- a/packages/openapi-ts/package.json +++ b/packages/openapi-ts/package.json @@ -1,6 +1,6 @@ { "name": "@hey-api/openapi-ts", - "version": "0.83.1", + "version": "0.84.0", "description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.", "homepage": "https://heyapi.dev/", "repository": { @@ -89,7 +89,7 @@ "node": "^18.18.0 || ^20.9.0 || >=22.10.0" }, "dependencies": { - "@hey-api/codegen-core": "workspace:^0.1.0", + "@hey-api/codegen-core": "workspace:^0.2.0", "@hey-api/json-schema-ref-parser": "1.1.0", "ansi-colors": "4.1.3", "c12": "2.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a326b2cec6..d7250f0125 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1174,7 +1174,7 @@ importers: packages/openapi-ts: dependencies: '@hey-api/codegen-core': - specifier: workspace:^0.1.0 + specifier: workspace:^0.2.0 version: link:../codegen-core '@hey-api/json-schema-ref-parser': specifier: 1.1.0 @@ -22250,7 +22250,7 @@ snapshots: eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.17.0(jiti@2.5.1)) @@ -22284,7 +22284,7 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color @@ -22299,7 +22299,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9