v0.74.0
What's Changed
- bugfix: fix failing kotlin integration tests against go server by @joshmossas in #142
- [ts-schema] refactor: no longer throws by default by @joshmossas in #143
- [ts-schema] feature: ability to compile coerce fn by @joshmossas in #145
Full Changelog: v0.73.0...v0.74.0
Typescript
Since we are pre-1.0 I thought now was a good time to do a major refactor to change the default behavior of the TS schema validation library. Now all parsing and serialization functions will never not throw errors by default. Instead they return a Result<T>
.
@arrirpc/schema
- [BREAKING]
parse
,coerce
, andserialize
no longer throw aValidationError
they instead return aResult<T>
- [BREAKING]
parseSafe
andcoerceSafe
have been removed as not throwing is now the default behavior parseUnsafe
,coerceUnsafe
, andserializeUnsafe
have been added.- [BREAKING]
ValidationError
has been renamed toValidationException
a.compile()
now also compiles a highly optimizedcoerce
function. When running on my Macbook the compile version of coerce is 25x faster than the non-compiled versions.
![image](https://private-user-images.githubusercontent.com/31548851/408099763-db892c3d-dc42-44df-a0f4-50f5a6a978ba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzkyODIsIm5iZiI6MTczODk3ODk4MiwicGF0aCI6Ii8zMTU0ODg1MS80MDgwOTk3NjMtZGI4OTJjM2QtZGM0Mi00NGRmLWEwZjQtNTBmNWE2YTk3OGJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAxNDMwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlhYTc0Yjk4ZDBiNGYwN2I1YWQ4ZjNkM2Q3Njk3ZmVkZWM1MDZmMTExYTM4MDdjYjMzNzRhZWIxNzA5ODRjZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-ELVpunS3U-72y2s7jK4mPcXv0mGbbI9GB8rRYxbZyc)
@arrirpc/server
- RPCs registered using the GET HTTP method now use the compiled version of
coerce()
when parsing URL query params.
Swift
- update
async-http-client
to version 1.24.2