Skip to content

Commit

Permalink
Merge pull request #485 from stepchowfun/field
Browse files Browse the repository at this point in the history
Don't require specifying `field` when serializing choices
  • Loading branch information
stepchowfun authored Jun 19, 2024
2 parents 6ebd0d4 + bcdffe9 commit 8962be4
Show file tree
Hide file tree
Showing 10 changed files with 6,155 additions and 4,261 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.12.0] - 2024-06-19

### Changed
- Typical no longer requires specifying `$field` when serializing choices.

## [0.11.0] - 2024-06-18

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "typical"
version = "0.11.0"
version = "0.12.0"
authors = ["Stephan Boyer <[email protected]>"]
edition = "2021"
description = "Data interchange with algebraic data types."
Expand Down
21 changes: 5 additions & 16 deletions benchmarks/typescript/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ benchmark(
f: new Uint8Array([0, 42, 255]).buffer,
g: 'Hello, World!',
h: { x: 'Hello, World!' },
i: { $field: 'x' as const, x: 'Hello, World!' },
i: { x: 'Hello, World!' },
j: [null, null, null],
k: f64TestValues,
l: u64TestValues,
Expand All @@ -174,11 +174,7 @@ benchmark(
],
p: ['', '=8 bytes', 'Hello, World!'],
q: [{ x: 'Hello, World!' }, { x: 'Hello, World!' }, { x: 'Hello, World!' }],
r: [
{ $field: 'x' as const, x: 'Hello, World!' },
{ $field: 'x' as const, x: 'Hello, World!' },
{ $field: 'x' as const, x: 'Hello, World!' },
],
r: [{ x: 'Hello, World!' }, { x: 'Hello, World!' }, { x: 'Hello, World!' }],
s: [[], [null], [null, null], [null, null, null]],
t: [
[],
Expand Down Expand Up @@ -209,16 +205,9 @@ benchmark(
],
aa: [
[],
[{ $field: 'x' as const, x: 'Hello, World!' }],
[
{ $field: 'x' as const, x: 'Hello, World!' },
{ $field: 'x' as const, x: 'Hello, World!' },
],
[
{ $field: 'x' as const, x: 'Hello, World!' },
{ $field: 'x' as const, x: 'Hello, World!' },
{ $field: 'x' as const, x: 'Hello, World!' },
],
[{ x: 'Hello, World!' }],
[{ x: 'Hello, World!' }, { x: 'Hello, World!' }],
[{ x: 'Hello, World!' }, { x: 'Hello, World!' }, { x: 'Hello, World!' }],
],
},
pathologicalIterations,
Expand Down
Loading

0 comments on commit 8962be4

Please sign in to comment.