Skip to content

Commit a4d83f9

Browse files
tatethurstonTate
and
Tate
authored
v0.0.46 (#129)
Co-authored-by: Tate <[email protected]>
1 parent 8d57a00 commit a4d83f9

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Changelog
22

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
32+
33+
**Full Changelog**: https://github.com/tatethurston/TwirpScript/compare/v0.0.45...v0.0.46
34+
335
## v0.0.45
436

537
- no longer generate `_readMessageJSON` for empty messages

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twirpscript",
3-
"version": "0.0.45",
3+
"version": "0.0.46",
44
"description": "A protobuf RPC framework for JavaScript and TypeScript",
55
"license": "MIT",
66
"author": "Tate Thurston <[email protected]>",

0 commit comments

Comments
 (0)