Skip to content

Releases: 1Password/typeshare

Version 1.7.0

11 Aug 23:28
bcfa2c3
Compare
Choose a tag to compare

Release Notes

This release brings support for more rust primitive types (slices and chars), as well as support for manually overriding the output type in the #[typeshare] annotations

  • Added support for the Rust slice type, which is treated as a sequence. #131
  • Added support for the Rust char type, which is treated as a string. #128
  • Better error messages when there's an error reading a file. #117
  • It is now possible to manually override the output type for specific fields using the #[typeshare] annotation. #119, #118
  • Fixed: in Swift, apply generic constraints to enums, in addition to structs. #122
  • In an effort to ensure we don't accidentally break compatibility with our Minimum Supported Rust Version, we added a rust-toolchain.toml to the rust crates, forcing builds and tests to use that version of rust. #129, #135. This change should have no effect on end users.

Community contributors

Thank you to the following community contributors for your work on this release:

Install typeshare-cli 1.7.0

Install prebuilt binaries via shell script

# WARNING: this installer is experimental
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/1Password/typeshare/releases/download/v1.7.0/typeshare-cli-v1.7.0-installer.sh | sh

Install prebuilt binaries via powershell script

# WARNING: this installer is experimental
irm https://github.com/1Password/typeshare/releases/download/v1.7.0/typeshare-cli-v1.7.0-installer.ps1 | iex

Download typeshare-cli 1.7.0

target kind download
aarch64-apple-darwin tarball typeshare-cli-v1.7.0-aarch64-apple-darwin.tar.xz
x86_64-apple-darwin tarball typeshare-cli-v1.7.0-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-cli-v1.7.0-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux-gnu tarball typeshare-cli-v1.7.0-x86_64-unknown-linux-gnu.tar.xz

Version 1.6.0

12 May 22:46
Compare
Choose a tag to compare

Release Notes

This release brings support for more architectures for Nix and configurable generic constraints in Swift

  • The Nix flake now supports all default Nix platforms, rather than only x86_64-linux. #113
  • typeshare-core
    • It is now possible to add your own set of generic constraints to Swift generics. This is done with a field called default_generic_constraints under [swift] in typeshare.toml. #95

Install typeshare-cli 1.6.0

Install prebuilt binaries via shell script

# WARNING: this installer is experimental
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/1Password/typeshare/releases/download/v1.6.0/typeshare-cli-v1.6.0-installer.sh | sh

Install prebuilt binaries via powershell script

# WARNING: this installer is experimental
irm https://github.com/1Password/typeshare/releases/download/v1.6.0/typeshare-cli-v1.6.0-installer.ps1 | iex

Download typeshare-cli 1.6.0

target kind download
aarch64-apple-darwin tarball typeshare-cli-v1.6.0-aarch64-apple-darwin.tar.xz
x86_64-apple-darwin tarball typeshare-cli-v1.6.0-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-cli-v1.6.0-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux-gnu tarball typeshare-cli-v1.6.0-x86_64-unknown-linux-gnu.tar.xz

Version 1.5.1

04 May 20:19
Compare
Choose a tag to compare

Release Notes

This release brings support for standalone installations into Nix, as well as corrections for certain unusual edge case behaviors.

  • Added a Nix flake, which allows for installing typeshare outside of NixPkgs
  • typeshare-core
    • Now supports types in inline modules. [#109]
    • Now throws an error if #[serde(flatten)] is used, instead of silently generating incorrect types [#108]
    • When generating the CodableVoid type in swift, we now always include the Codable decorator, even if it's omitted from the list of default_decorators in typeshare.toml [#107]

Community contributors

Thank you to the following community contributors for your work on this release:

Install typeshare-cli 1.5.1

Install prebuilt binaries via shell script

# WARNING: this installer is experimental
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/1Password/typeshare/releases/download/v1.5.1/typeshare-cli-v1.5.1-installer.sh | sh

Install prebuilt binaries via powershell script

# WARNING: this installer is experimental
irm https://github.com/1Password/typeshare/releases/download/v1.5.1/typeshare-cli-v1.5.1-installer.ps1 | iex

Download typeshare-cli 1.5.1

target kind download
aarch64-apple-darwin tarball typeshare-cli-v1.5.1-aarch64-apple-darwin.tar.xz
x86_64-apple-darwin tarball typeshare-cli-v1.5.1-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-cli-v1.5.1-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux-gnu tarball typeshare-cli-v1.5.1-x86_64-unknown-linux-gnu.tar.xz

Version 1.5.0

13 Apr 18:53
Compare
Choose a tag to compare

Release Notes

This release brings support for fixed-length arrays and fixes some premature changes made in 1.4.0 involving the
representation of unit types and enum variants in Typescript.

  • typeshare-core
    • Fixed-length arrays in the form of [T; N] are now supported.
    • Reverted changes made to the representation of unit types in Typescript.1

1 We apologize for the premature changes to the representation of unit types. This was done to improve
correctness and compatibility with various JSON libraries, however it ended up causing a regression by invalidating
certain usages. For now, we've reverted the changes so your projects can get back on track, and we are working to bring
these improvements while mitigating the issues discovered. Thank you for bringing this to our attention.

Community contributors

Thank you to the following community contributors for your work on this release:

Install typeshare-cli 1.5.0

Install prebuilt binaries via shell script

# WARNING: this installer is experimental
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/1Password/typeshare/releases/download/v1.5.0/typeshare-cli-v1.5.0-installer.sh | sh

Install prebuilt binaries via powershell script

# WARNING: this installer is experimental
irm https://github.com/1Password/typeshare/releases/download/v1.5.0/typeshare-cli-v1.5.0-installer.ps1 | iex

Download typeshare-cli 1.5.0

target kind download
aarch64-apple-darwin tarball typeshare-cli-v1.5.0-aarch64-apple-darwin.tar.xz
x86_64-apple-darwin tarball typeshare-cli-v1.5.0-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-cli-v1.5.0-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux-gnu tarball typeshare-cli-v1.5.0-x86_64-unknown-linux-gnu.tar.xz

Version 1.4.0

30 Mar 21:21
Compare
Choose a tag to compare

Release Notes

This release brings topological sorting of types based on dependencies to generated files, as well as fixes several bugs.

  • typeshare-core
    • Types are now outputted in order of dependency - types depending on others will be written after those without dependencies.
    • Unit types are now represented as null in Typescript
    • Deserialization for optional associated types in enum variants has been fixed.

Community contributors

Thank you to the following community contributors for your work on this release:

Install typeshare-cli 1.4.0

Install prebuilt binaries via shell script

# WARNING: this installer is experimental
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/1Password/typeshare/releases/download/v1.4.0/typeshare-cli-v1.4.0-installer.sh | sh

Install prebuilt binaries via powershell script

# WARNING: this installer is experimental
irm https://github.com/1Password/typeshare/releases/download/v1.4.0/typeshare-cli-v1.4.0-installer.ps1 | iex

Download typeshare-cli 1.4.0

target kind download
aarch64-apple-darwin tarball typeshare-cli-v1.4.0-aarch64-apple-darwin.tar.xz
x86_64-apple-darwin tarball typeshare-cli-v1.4.0-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-cli-v1.4.0-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux-gnu tarball typeshare-cli-v1.4.0-x86_64-unknown-linux-gnu.tar.xz

Version 1.3.0

23 Mar 19:35
Compare
Choose a tag to compare

Release Notes

This release brings minor changes to snapshot testing by adding an additional option to remove version headers from generated code. This will make our snapshot tests more robust by preventing test breakage that used to occur when updating our version.

  • typeshare-core
    • Each language implementation now has an additional public variable that can be set to remove version headers from generated code.

Install typeshare-cli 1.3.0

Install prebuilt binaries via shell script

# WARNING: this installer is experimental
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/1Password/typeshare/releases/download/v1.3.0/typeshare-cli-v1.3.0-installer.sh | sh

Install prebuilt binaries via powershell script

# WARNING: this installer is experimental
irm https://github.com/1Password/typeshare/releases/download/v1.3.0/typeshare-cli-v1.3.0-installer.ps1 | iex

Download typeshare-cli 1.3.0

target kind download
aarch64-apple-darwin tarball typeshare-cli-v1.3.0-aarch64-apple-darwin.tar.xz
x86_64-apple-darwin tarball typeshare-cli-v1.3.0-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-cli-v1.3.0-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux-gnu tarball typeshare-cli-v1.3.0-x86_64-unknown-linux-gnu.tar.xz

Version 1.2.0

17 Mar 03:17
641299a
Compare
Choose a tag to compare

Release Notes

This release brings Scala functionality to the CLI, support for Apple Silicon as a pre-built binary, and refactors how
we handle language variants internally to be more type-safe.

  • typeshare-cli
    • Scala is now a language generation target! Try it out with typeshare --lang=scala --scala-package=com.your.package.here some/file.rs
    • Future releases (including this one) now support aarch64-apple-darwin as an additional architecture.
  • typeshare-core
    • Language variants are now represented as enums instead of strings.

Community contributors

Thank you to the following community contributors for your work on this release:

Install typeshare-cli 1.2.0

Install prebuilt binaries via shell script

# WARNING: this installer is experimental
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/1Password/typeshare/releases/download/v1.2.0/typeshare-cli-v1.2.0-installer.sh | sh

Install prebuilt binaries via powershell script

# WARNING: this installer is experimental
irm https://github.com/1Password/typeshare/releases/download/v1.2.0/typeshare-cli-v1.2.0-installer.ps1 | iex

Download typeshare-cli 1.2.0

target kind download
aarch64-apple-darwin tarball typeshare-cli-v1.2.0-aarch64-apple-darwin.tar.xz
x86_64-apple-darwin tarball typeshare-cli-v1.2.0-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-cli-v1.2.0-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux-gnu tarball typeshare-cli-v1.2.0-x86_64-unknown-linux-gnu.tar.xz

Version 1.1.0

03 Mar 02:50
5b590df
Compare
Choose a tag to compare

Download

target kind download
x86_64-unknown-linux-gnu tarball typeshare-v1.1.0-x86_64-unknown-linux-gnu.tar.xz
x86_64-apple-darwin tarball typeshare-v1.1.0-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-v1.1.0-x86_64-pc-windows-msvc.zip
x86_64-pc-windows-msvc symbols typeshare-v1.1.0-x86_64-pc-windows-msvc.pdb

Release Notes

This release brings major new additions, the largest of which is support for Scala as a language generation target.
Additionally, the code generation API has been expanded/revised, and many bugs have been fixed.

  • typeshare-cli

    • Kotlin now uses val consistently for defining fields.
    • Some issues with the command line options have been corrected.
    • Unit structs that don't use bracket syntax are now supported.
    • Typescript can now handle type aliases of optional types.
    • Empty structs are now represented as objects in Kotlin.
    • You can now define read-only Typescript properties with #[typeshare(typescript(readonly))].
    • Doubly-nested option types (Option<Option<T>>) are now supported in Typescript.
    • Default protocols for generated Swift types can now be specified in typeshare.toml with swift.default_decorators.
  • typeshare-core

    • The Language trait now takes self mutably for more flexibility in implementations.
    • Scala is now a supported language for code generation, though the CLI does not use it yet.
    • The attribute parser has been reworked to be more robust and flexible for future additions.
  • Miscellaneous

    • We now have a proper release system and prebuilt binaries for anyone to download 🎉
    • Releases will be weekly on every Thursday.

Community Contributors

Thank you to the following community contributors for your work on this release:

exoego, Czocher, ccouzens,
McAJBen, adriangb, kareid,
nihaals, ChrisMcKenzie, justintime4tea,
prestontw, and julienfouilhe!

v1.1.0-prerelease02

26 Feb 00:46
fb9d78a
Compare
Choose a tag to compare
v1.1.0-prerelease02 Pre-release
Pre-release

Download

target kind download
x86_64-unknown-linux-gnu tarball typeshare-v1.1.0-prerelease02-x86_64-unknown-linux-gnu.tar.xz
x86_64-apple-darwin tarball typeshare-v1.1.0-prerelease02-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-v1.1.0-prerelease02-x86_64-pc-windows-msvc.zip
x86_64-pc-windows-msvc symbols typeshare-v1.1.0-prerelease02-x86_64-pc-windows-msvc.pdb

v1.1.0-prerelease01

25 Feb 23:50
3c24838
Compare
Choose a tag to compare
v1.1.0-prerelease01 Pre-release
Pre-release

Download

target kind download
x86_64-unknown-linux-gnu tarball typeshare-v1.1.0-prerelease01-x86_64-unknown-linux-gnu.tar.xz
x86_64-apple-darwin tarball typeshare-v1.1.0-prerelease01-x86_64-apple-darwin.tar.xz
x86_64-pc-windows-msvc tarball typeshare-v1.1.0-prerelease01-x86_64-pc-windows-msvc.zip
x86_64-pc-windows-msvc symbols typeshare-v1.1.0-prerelease01-x86_64-pc-windows-msvc.pdb