Skip to content

Commit c80f833

Browse files
committed
docs: add changesets
1 parent 8c4e726 commit c80f833

4 files changed

Lines changed: 24 additions & 6 deletions

File tree

.changeset/fix-runtime-config-path.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
---
44

55
**BREAKING** **client**: resolve `runtimeConfigPath` relative to the output folder
6+
7+
### Changed `runtimeConfigPath` behavior
8+
9+
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.
10+

.changeset/weak-avocados-tap.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
"@hey-api/openapi-ts": minor
33
---
44

5-
**plugin(@hey-api/client-ky)**: respect ky instance defaults
5+
**BREAKING** **plugin(@hey-api/client-ky)**: respect ky instance defaults
6+
7+
### Changed Ky client behavior
8+
9+
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.

docs/openapi-ts/migrating.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ 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+
1020
## v0.96.0
1121

1222
### Removed Node 20 support

packages/openapi-ts/src/plugins/@hey-api/client-core/client.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ export function resolveRuntimeConfigPath({
1515
outputPath: string;
1616
runtimeConfigPath: string;
1717
}): string {
18-
const isFileSystemPath =
19-
path.isAbsolute(runtimeConfigPath) ||
20-
runtimeConfigPath.startsWith('./') ||
21-
runtimeConfigPath.startsWith('../');
18+
const isAbsolutePath = path.isAbsolute(runtimeConfigPath);
2219

20+
const isFileSystemPath =
21+
isAbsolutePath || runtimeConfigPath.startsWith('./') || runtimeConfigPath.startsWith('../');
2322
if (!isFileSystemPath) {
2423
return runtimeConfigPath;
2524
}
2625

27-
const absoluteInputPath = path.isAbsolute(runtimeConfigPath)
26+
const absoluteInputPath = isAbsolutePath
2827
? runtimeConfigPath
2928
: path.resolve(process.cwd(), runtimeConfigPath);
3029
const relative = path.relative(outputPath, absoluteInputPath).split(path.sep).join('/');

0 commit comments

Comments
 (0)