Skip to content

Commit c3a81e8

Browse files
committed
docs: add changelog
1 parent 5898775 commit c3a81e8

File tree

5 files changed

+67
-2
lines changed

5 files changed

+67
-2
lines changed

.changeset/clean-apes-divide.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
'@hey-api/openapi-ts': patch
3+
---
4+
5+
**output**: add `nameConflictResolver` option
6+
7+
## Name Conflicts
8+
9+
As your project grows, the chances of name conflicts increase. We use a simple conflict resolver that appends numeric suffixes to duplicate identifiers. If you prefer a different strategy, you can provide your own `nameConflictResolver` function.
10+
11+
```js
12+
export default {
13+
input: 'hey-api/backend', // sign up at app.heyapi.dev
14+
output: {
15+
nameConflictResolver({ attempt, baseName }) {
16+
return attempt === 0 ? baseName : `${baseName}_N${attempt + 1}`;
17+
},
18+
path: 'src/client',
19+
},
20+
};
21+
```
22+
23+
Example output:
24+
25+
```ts
26+
export type ChatCompletion = string;
27+
28+
export type ChatCompletion_N2 = number;
29+
```

.changeset/eight-rabbits-unite.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@hey-api/openapi-ts': minor
3+
---
4+
5+
**output**: add `preferExportAll` option
6+
7+
### Prefer named exports
8+
9+
This release changes the default for `index.ts` to prefer named exports. Named exports may lead to better IDE and bundler performance compared to asterisk (`*`) as your tooling doesn't have to inspect the underlying module to discover exports.
10+
11+
While this change is merely cosmetic, you can set `output.preferExportAll` to `true` if you prefer to use the asterisk.
12+
13+
```js
14+
export default {
15+
input: 'hey-api/backend', // sign up at app.heyapi.dev
16+
output: {
17+
path: 'src/client',
18+
preferExportAll: true,
19+
},
20+
};
21+
```

.changeset/gentle-spoons-kneel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@hey-api/codegen-core': minor
3+
---
4+
5+
**symbols**: remove `placeholder` property

.changeset/plenty-walls-repeat.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@hey-api/openapi-ts': minor
3+
---
4+
5+
**parser**: removed `symbol:setValue:*` events
6+
7+
### Removed `symbol:setValue:*` events
8+
9+
These events have been removed in favor of `node:set:*` events.

docs/openapi-ts/configuration/output.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,19 @@ As your project grows, the chances of name conflicts increase. We use a simple c
264264

265265
::: code-group
266266

267+
<!-- prettier-ignore-start -->
267268
```js [config]
268269
export default {
269270
input: 'hey-api/backend', // sign up at app.heyapi.dev
270271
output: {
271-
nameConflictResolver({ attempt, baseName }) {
272-
// [!code ++]
272+
nameConflictResolver({ attempt, baseName }) { // [!code ++]
273273
return attempt === 0 ? baseName : `${baseName}_N${attempt + 1}`; // [!code ++]
274274
}, // [!code ++]
275275
path: 'src/client',
276276
},
277277
};
278278
```
279+
<!-- prettier-ignore-end -->
279280

280281
```ts [example]
281282
export type ChatCompletion = string;

0 commit comments

Comments
 (0)