Skip to content

Commit 8abb656

Browse files
authored
Merge branch 'main' into renovate/pnpm-action-setup-6.x
2 parents 7dc011a + e3063e7 commit 8abb656

2,047 files changed

Lines changed: 589758 additions & 202328 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/popular-years-tickle.md

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

.changeset/weak-avocados-tap.md

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

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,17 @@ jobs:
101101
if: steps.changesets.outputs.published == 'true'
102102
run: pnpm changelog:assemble
103103

104+
- name: Delete spotlight
105+
if: steps.changesets.outputs.published == 'true'
106+
run: rm -f .release/spotlight.md
107+
104108
- name: Commit changelog
105109
if: steps.changesets.outputs.published == 'true'
106110
uses: stefanzweifel/git-auto-commit-action@v7.1.0
107111
with:
108112
branch: ${{ env.CURRENT_BRANCH }}
109113
commit_message: 'chore: sync changelog [skip ci]'
110-
file_pattern: CHANGELOG.md
114+
file_pattern: CHANGELOG.md .release/spotlight.md
111115

112116
- name: Update lock file
113117
if: env.CURRENT_BRANCH == 'changeset-release/main'

.release/.gitkeep

Whitespace-only changes.

CHANGELOG.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,108 @@
11
# Changelog
22

3+
# 2026-04-28
4+
5+
## @hey-api/openapi-ts 0.97.0
6+
7+
### ⚠️ Breaking
8+
9+
This release has 15 breaking changes. Please review the release notes carefully before upgrading.
10+
11+
### Updates
12+
13+
- cli: print file count and generator speed ([#3828](https://github.com/hey-api/openapi-ts/pull/3828))
14+
- **⚠️ Breaking:** client: resolve `runtimeConfigPath` relative to the output folder ([#3770](https://github.com/hey-api/openapi-ts/pull/3770))
15+
16+
### Changed `runtimeConfigPath` behavior
17+
18+
This was a known, long-standing issue confusing first-time users. Before, defining client `runtimeConfigPath` value would paste it verbatim to the generated output. This release changes the behavior to resolve relative to the current working directory the same way output path works.
19+
- config: remove `--apply` flag from Biome post-processor commands ([#3812](https://github.com/hey-api/openapi-ts/pull/3812))
20+
21+
### Plugins
22+
23+
#### @hey-api/client-angular
24+
25+
- **⚠️ Breaking:** `request` and `response` objects might be undefined ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
26+
- **⚠️ Breaking:** respect `throwOnError` when request validation fails ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
27+
28+
#### @hey-api/client-fetch
29+
30+
- **⚠️ Breaking:** pass previous result to error interceptors ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
31+
- **⚠️ Breaking:** `request` and `response` objects might be undefined ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
32+
- **⚠️ Breaking:** respect `throwOnError` when request validation fails ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
33+
34+
#### @hey-api/client-ky
35+
36+
- **⚠️ Breaking:** pass previous result to error interceptors ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
37+
- **⚠️ Breaking:** `request` and `response` objects might be undefined ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
38+
- **⚠️ Breaking:** respect `throwOnError` when request validation fails ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
39+
- **⚠️ Breaking:** respect ky instance defaults ([#3806](https://github.com/hey-api/openapi-ts/pull/3806))
40+
41+
### Changed Ky client behavior
42+
43+
The Ky client was updated to be more intuitive. Some Ky options now need to be passed via the `kyOptions` field and you need to pass `undefined` to unset an option.
44+
45+
#### @hey-api/client-next
46+
47+
- **⚠️ Breaking:** `request` and `response` objects might be undefined ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
48+
- **⚠️ Breaking:** pass previous result to error interceptors ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
49+
- **⚠️ Breaking:** respect `throwOnError` when request validation fails ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
50+
51+
#### @hey-api/client-ofetch
52+
53+
- **⚠️ Breaking:** `request` and `response` objects might be undefined ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
54+
- **⚠️ Breaking:** respect `throwOnError` when request validation fails ([#3814](https://github.com/hey-api/openapi-ts/pull/3814))
55+
56+
#### @tanstack/angular-query-experimental
57+
58+
- add `setQueryData` option ([#3824](https://github.com/hey-api/openapi-ts/pull/3824))
59+
60+
#### @tanstack/preact-query
61+
62+
- add `useSetQueryData` option ([#3824](https://github.com/hey-api/openapi-ts/pull/3824))
63+
- add `setQueryData` option ([#3824](https://github.com/hey-api/openapi-ts/pull/3824))
64+
65+
#### @tanstack/react-query
66+
67+
- add `useSetQueryData` option ([#3824](https://github.com/hey-api/openapi-ts/pull/3824))
68+
- add `setQueryData` option ([#3824](https://github.com/hey-api/openapi-ts/pull/3824))
69+
70+
#### @tanstack/solid-query
71+
72+
- add `setQueryData` option ([#3824](https://github.com/hey-api/openapi-ts/pull/3824))
73+
74+
#### @tanstack/svelte-query
75+
76+
- add `setQueryData` option ([#3824](https://github.com/hey-api/openapi-ts/pull/3824))
77+
78+
#### @tanstack/vue-query
79+
80+
- add `setQueryData` option ([#3824](https://github.com/hey-api/openapi-ts/pull/3824))
81+
82+
#### zod
83+
84+
- fallback `.discriminatedUnion` to `.union` if members contain intersection ([#3813](https://github.com/hey-api/openapi-ts/pull/3813))
85+
86+
---
87+
88+
## @hey-api/codegen-core 0.8.1
89+
90+
### Updates
91+
92+
- planner: speed up identifier conflict detector ([#3823](https://github.com/hey-api/openapi-ts/pull/3823))
93+
- symbol: speed up symbol registry cache ([#3823](https://github.com/hey-api/openapi-ts/pull/3823))
94+
95+
---
96+
97+
## @hey-api/shared 0.4.2
98+
99+
### Updates
100+
101+
- graph: speed up graph builder ([#3823](https://github.com/hey-api/openapi-ts/pull/3823))
102+
- utils: speed up deep equality check ([#3823](https://github.com/hey-api/openapi-ts/pull/3823))
103+
104+
---
105+
3106
# 2026-04-20
4107

5108
## @hey-api/openapi-ts 0.96.1

dev/inputs.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const specsPath = path.join(__dirname, '..', 'specs');
44

55
export const inputs = {
66
circular: path.resolve(specsPath, '3.0.x', 'circular.yaml'),
7+
clerk: path.resolve(specsPath, '3.0.x', 'clerk-2025-11-10.yaml'),
8+
cloudflare: path.resolve(specsPath, '3.0.x', 'cloudflare-v4.json'),
79
full: path.resolve(specsPath, '3.1.x', 'full.yaml'),
810
local: 'http://localhost:8000/openapi.json',
911
opencode: path.resolve(specsPath, '3.1.x', 'opencode.yaml'),

docs/openapi-ts/migrating.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@ description: Migrating to @hey-api/openapi-ts.
77

88
While we try to avoid breaking changes, sometimes it's unavoidable in order to offer you the latest features. This page lists changes that require updates to your code. If you run into a problem with migration, please [open an issue](https://github.com/hey-api/openapi-ts/issues).
99

10+
## v0.97.0
11+
12+
### Changed `runtimeConfigPath` behavior
13+
14+
This was a known, long-standing issue confusing first-time users. Before, defining client `runtimeConfigPath` value would paste it verbatim to the generated output. This release changes the behavior to resolve relative to the output folder.
15+
16+
### Changed Ky client behavior
17+
18+
The Ky client was updated to be more intuitive. Some Ky options now need to be passed via the `kyOptions` field and you need to pass `undefined` to unset an option.
19+
20+
### Changed error interceptors behavior
21+
22+
Error interceptors now receive the result of the previous error interceptor. This aligns their behavior with request and response interceptors. This change only affects you if you use multiple interceptors.
23+
24+
### Optional client request and response
25+
26+
The returned request and response objects are now typed as optional. This aligns the types with the actual runtime behavior, which remains unchanged.
27+
28+
### Respect `throwOnError` option
29+
30+
Previously, there were instances where setting `throwOnError` to `false` would still throw an error. This most commonly happened when request validation failed. With this change, `throwOnError` is now truly respected.
31+
1032
## v0.96.0
1133

1234
### Removed Node 20 support

examples/openapi-ts-angular-common/src/client/client/client.gen.ts

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const createClient = (config: Config = {}): Client => {
8787
opts.headers.delete('Content-Type');
8888
}
8989

90-
const url = buildUrl(opts as any);
90+
const url = buildUrl(opts as Config & RequestOptions);
9191

9292
const req = new HttpRequest<unknown>(opts.method ?? 'GET', url, getValidRequestBody(opts), {
9393
redirect: 'follow',
@@ -122,34 +122,39 @@ export const createClient = (config: Config = {}): Client => {
122122
};
123123

124124
const request: Client['request'] = async (options) => {
125-
const { opts, req: initialReq } = await beforeRequest(options);
126-
127-
let req = initialReq;
128-
129-
for (const fn of interceptors.request.fns) {
130-
if (fn) {
131-
req = await fn(req, opts as any);
132-
}
133-
}
125+
const throwOnError = options.throwOnError ?? _config.throwOnError;
126+
const responseStyle = options.responseStyle ?? _config.responseStyle;
134127

135128
const result: {
136-
request: HttpRequest<unknown>;
137-
response: any;
129+
request?: HttpRequest<unknown>;
130+
response?: any;
138131
} = {
139-
request: req,
140-
response: null,
132+
request: undefined,
133+
response: undefined,
141134
};
142135

143136
try {
144-
result.response = (await firstValueFrom(
137+
const { opts, req: initialReq } = await beforeRequest(options);
138+
139+
let req = initialReq;
140+
result.request = req;
141+
142+
for (const fn of interceptors.request.fns) {
143+
if (fn) {
144+
req = await fn(req, opts as ResolvedRequestOptions);
145+
result.request = req;
146+
}
147+
}
148+
149+
result.response = await firstValueFrom(
145150
opts
146151
.httpClient!.request(req)
147152
.pipe(filter((event) => event.type === HttpEventType.Response)),
148-
)) as HttpResponse<unknown>;
153+
);
149154

150155
for (const fn of interceptors.response.fns) {
151156
if (fn) {
152-
result.response = await fn(result.response, req, opts as any);
157+
result.response = await fn(result.response, req, opts as ResolvedRequestOptions);
153158
}
154159
}
155160

@@ -173,15 +178,20 @@ export const createClient = (config: Config = {}): Client => {
173178

174179
for (const fn of interceptors.error.fns) {
175180
if (fn) {
176-
finalError = (await fn(finalError, result.response as any, req, opts as any)) as string;
181+
finalError = await fn(
182+
finalError,
183+
result.response,
184+
result.request,
185+
options as ResolvedRequestOptions,
186+
);
177187
}
178188
}
179189

180-
if (opts.throwOnError) {
190+
if (throwOnError) {
181191
throw finalError;
182192
}
183193

184-
return opts.responseStyle === 'data'
194+
return responseStyle === 'data'
185195
? undefined
186196
: {
187197
error: finalError,

examples/openapi-ts-angular-common/src/client/client/types.gen.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ export type RequestResult<
129129
| {
130130
data: undefined;
131131
error: TError[keyof TError];
132-
request: HttpRequest<unknown>;
133-
response: HttpErrorResponse & {
132+
/** request may be undefined, because error may be from building the request object itself */
133+
request?: HttpRequest<unknown>;
134+
/** response may be undefined, because error may be from building the request object itself or from a network error */
135+
response?: HttpErrorResponse & {
134136
error: TError[keyof TError] | null;
135137
};
136138
}

examples/openapi-ts-angular-common/src/client/client/utils.gen.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,10 @@ export const mergeHeaders = (
311311

312312
type ErrInterceptor<Err, Res, Req, Options> = (
313313
error: Err,
314-
response: Res,
315-
request: Req,
314+
/** response may be undefined due to a network error where no response object is produced */
315+
response: Res | undefined,
316+
/** request may be undefined, because error may be from building the request object itself */
317+
request: Req | undefined,
316318
options: Options,
317319
) => Err | Promise<Err>;
318320

0 commit comments

Comments
 (0)