You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+32
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,37 @@
1
1
# Changelog
2
2
3
+
## v0.0.46
4
+
5
+
This version has 3 breaking changes:
6
+
7
+
1. (Only impacts TypeScript users) The 'Service' naming suffix has been removed from the generated TypeScript types for services. Given the following proto:
8
+
9
+
```proto
10
+
service Haberdasher {
11
+
rpc MakeHat(Size) returns (Hat);
12
+
}
13
+
```
14
+
15
+
The generated service type will now be `Haberdasher` instead of `HaberdasherService`. This enables better out of the box compatibility with [buf](https://buf.build/) which expects all service names to end with `Service`. Following this recommendation would generate TwirpScript types with 'ServiceService' suffixes.
16
+
17
+
`<Service>Service => <Service>`
18
+
19
+
2. The 'Handler' suffix has been removed from the generated `create<Service>Handler` helper.
20
+
21
+
Given the proto above, the generated helper is now `createHaberdasher` instead of `createHaberdasherHandler`.
22
+
23
+
`create<Service>Handler=> create<Service>`
24
+
25
+
3. (Only impacts TypeScript users) `optional` types now accept `null` and `undefined`. This enables better compatibility with other tools that may type optionals as `some type | null`
26
+
27
+
Changes:
28
+
29
+
- remove naming suffixes by @tatethurston in https://github.com/tatethurston/TwirpScript/pull/125
30
+
- add exclude option to twirp.json by @tatethurston in https://github.com/tatethurston/TwirpScript/pull/127
31
+
- add null to optional ts types by @tatethurston in https://github.com/tatethurston/TwirpScript/pull/128
0 commit comments