Releases: modiimedia/arri
v0.76.0
Full Changelog: v0.75.0...v0.76.0
Typescript
Breaking Change
When using compiled validators the .compiledCode
property is now undefined
by default. From my tests this reduces unnecessary memory usage by 65% for small schemas and by 73% for larger schemas. Results will vary from schema to schema but overall there should be a large reduction in memory allocations. Basically now the large function body strings are no longer being stored by default so we save in memory usage.
const User = a.object("User", {
id: a.string(),
name: a.string(),
email: a.nullable(a.string()),
});
const $$User = a.compile(User);
$$User.compiledCode // this is `undefined`
Since the majority of people do not use the properties available in .compiledCode
this will not be a breaking change for most. If you need to access the generated function bodies for use in something like code-generation, you now need to explicitly enable the feature like so:
const User = a.object("User", {
id: a.string(),
name: a.string(),
email: a.nullable(a.string()),
});
const $$User = a.compile(User, true) // passing true as the second parameter makes `.compiledCode` available
$$User.compiledCode // this is no longer undefined
// so we can access the generated function bodies
console.log($$User.compiledCode.validate)
console.log($$User.compiledCode.parse)
console.log($$User.compiledCode.serialize)
v0.75.0
What's Changed
Commits
- feature: empty object support for arri generators by @joshmossas in #149
- chore: update dependencies by @joshmossas in #150
Dart
- [dart-codegen]: empty object type definitions now output valid dart code
Go
- [go-server]: go server no longer panics when creating type definitions for empty structs
Kotlin
- [kotlin-codegen]: empty object type definitions now output valid kotlin code
Rust
- [rust-codegen]: empty object type definitions now output valid rust code
Swift
- [swift-client]: update
async-http-client
to v1.25.1 - [swift-codegen]: empty object type definitions now output valid swift code
Typescript
- [ts-codegen]: empty object type definitions now output valid typescript code
- [ts-server]: update
esbuild
to v0.25.0
Full Changelog: v0.74.1...v0.75.0
v0.74.1
What's Changed
Dart
- dart-codegen - bugfix - prefix enums that use reserved keywords such as
default
by @joshmossas in #147
Full Changelog: v0.74.0...v0.74.1
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.

@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
v0.73.0
What's Changed
- bugfix: fix codgen bugs when using
typePrefix
option in dart, kotlin, swift, and rust by @joshmossas in #137 - chore: update libs by @joshmossas in #139
- Bugfix: fix type prefix codegen issues with rust and kotlin by @joshmossas in #140
Full Changelog: v0.72.0...v0.73.0
Dart
- [BREAKING] dart-codegen -
modelPrefix
option has been renamed totypePrefix
for consistency with other client generators - dart-codegen - fix issues where
typePrefix
option sometimes results in invalid Dart code
Rust
- rust-codegen - fix issue where
typePrefix
option sometimes results in invalid Rust code
Swift
- swift-codegen - fix issue where
typePrefix
options results in invalid Swift code
Typescript
- @arrirpc/server - remove reliance on
pathe
dependency when runningarri build
Miscellaneous
- update dev dependencies
v0.72.0
Upgrade with arri use latest
What's Changed
CLI
Typescript
- bugfix:
@arrirpc/typebox-adapter
fix type inference issues by @joshmossas in #131
Dart
- bugfix: make dart enum codegen respect the
modelPrefix
option by @joshmossas in #134
New Contributors
Full Changelog: v0.71.1...v0.72.0
v0.71.1
What's Changed
Typescript
- Fix bug where compiled validators don't properly pass errors to standard-schema
Full Changelog: v0.71.0...v0.71.1
v0.71.0
What's Changed
Typescript
- Feature: add support for standard-schema by @joshmossas in #130
- Bugfix: fix bug where non-compiled validators will pass objects with missing keys
Dart
- Remove unnecessary logs of response body
Misc
- Update dev dependencies
Full Changelog: v0.70.1...v0.71.0
v0.70.1
What's Changed
If a particular language isn't mentioned then no change occurred.
Go
Breaking Changes
EncodeJSON
now acceptEncodingOptions
as one of it's parametersDecodeJSON
now acceptsEncodingOptions
as one of it's parametersFromUrlQuery
has been renamed toDecodeQueryParams
FromUrlQuery
now acceptsEncodingOptions
as one of it's parametersContext
interface has been renamed toEvent
to prevent confusion withcontext
from the STDEncodeJSON
in theArriModel
interface now acceptsEncodingOptions
as its parameter- When encoding enums the first specified enum value will be used as a fallback during serialization
- When encoding discriminated unions the first specified subtype will be used as a fallback during serialization
Non-Breaking Changes
- Initial support for RPC middleware has been added
Len()
method has been added toOrderedMap
Entries()
method has been added toOrderedMap
Keys()
method has been added toOrderedMap
- Add documentation for helper types
Tooling
Breaking Changes
json-schema-to-jtd
package has been deprecated and replaced withjson-schema-to-atd
@arrirpc/jtd-utils
package has been deprecated and replaced with@arrirpc/type-defs
Non-Breaking Changes
json-schema-to-atd
now supports converting "string" with "date-time" format totimestamp
type
Other
- Update dev dependencies
- Move all ts server and client libraries to
languages/ts
for consistency
Full Changelog: v0.69.2...v0.70.1
v0.69.2
What's Changed
- feature: add support for dictionary types when converting from JSON schema to ATD by @joshmossas in #120
Full Changelog: v0.69.1...v0.69.2