Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build(deps): bump ts-rs from 7.0.0 to 8.1.0 #1743

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 22, 2024

Bumps ts-rs from 7.0.0 to 8.1.0.

Release notes

Sourced from ts-rs's releases.

v8.1.0 is a mostly a small follow-up to v8.0.0, fixing a couple of rough edges.

We expect v8.1.0 to be fully compatible to v8.0.0.

Additionally, we've added support for serde_json behind the serde-json-impl cargo feature.
This might seem like a small change, but a lot of work over the past months has now paid off and made cleanly supporting serde_json::Value possible.

Features

  • Add #[ts(crate = "..")] to allow usage of #[derive(TS)] from other proc-macro crates (#274)
  • Add support types from serde_json behind cargo feature serde-json-impl (#276)
  • HashMap and similar types are now represented as { [key: K]: V } instead of Record<K, V> (#277)

Fixes

  • Macro expansion for types with generic parameters now works without the TS trait in scope (#281)
  • Fix flattening a struct that contains a flattened enum (#282)

Full Changelog: Aleph-Alpha/ts-rs@v8.0.0...v8.1.0

v8.0.0

After a lot of work and quite some time, we're happy to announce v8.0.0 of ts-rs. 🥳

Migration from 7.x.x

While this is a major release, we do expect that it's drop-in upgrade for most usecases.
However, if your setup is more involved (e.g interacting with the TS trait directly, doing post-processing on the output, etc.), some changes might be necessary.

If you're having any trouble migrating, please feel free to open a discussion or issue, we're happy to help.

Highlights

  • Automatic export of dependencies If a struct or enum is annotated with #[ts(export)], all of its dependencies will be exported automatically, even if they are not annotated with #[ts(export)]. This behaviour is more convenient and always results in correct import statements. More importantly, this enables the use of ts-rs within libraries. Consumers of such a library will automatically get a copy of the types their types depend on.
  • New handling of generic types Handling of generic types has been massively improved in this release. Not only is it way more robust than before, but we're also able to support all the edge-cases we couldn't before. For example, structs with trait bounds, generic type aliases and structs containing associated types are all supported now!
  • Improved handling for enums Support for enums and their different representations (internally tagged, externally tagged, untagged) has been massively improved in this release, thanks to @​escritorio-gustavo! In all these cases, ts-rs's behaviour matches more or less exactly with that of serde.
  • Easier exports Exporting types is now much easier than before. For one, running cargo test now exports all dependencies of types annotated with #[ts(export)]. The output directory can now be customized by setting the TS_RS_EXPORT_DIR environment variable. For more complicated setups, where #[ts(export)] is not sufficient, we've reworked the API for exporting types from code.

Acknowledgements

We've had a lot of new contributors since the last release!
I'm also excited to welcome @​escritorio-gustavo as a new maintainer, who has been instrumental in making 8.0.0 happen!

Breaking changes

  • Export types as type instead of ìnterface (#203)
  • Automatically export all dependencies when using #[ts(export)], add TS::dependency_types() (#221)

... (truncated)

Changelog

Sourced from ts-rs's changelog.

8.1.0

Breaking

Features

  • Add #[ts(crate = "..")] to allow usage of #[derive(TS)] from other proc-macro crates (#274)
  • Add support types from serde_json behind cargo feature serde-json-impl (#276)

Fixes

  • Macro expansion for types with generic parameters now works without the TS trait in scope (#281)
  • Fix enum flattening a struct that contains a flattened enum (#282)

v8.0.0

Breaking

  • Export types as type instead of ìnterface (#203)
  • Automatically export all dependencies when using #[ts(export)], add TS::dependency_types() (#221)
  • Remove support for "skip_serializing", "skip_serializing_if" and "skip_deserializing". (#204)
    • Initially supporting these by skipping a field was a mistake. If a user wishes to skip a field, they can still annotate it with #[ts(skip)]
  • Added TS::dependency_types() (#221)
  • Added TS::generics() (#241)
  • Added TS::WithoutGenerics (#241)
  • Removed TS::transparent() (#243)
  • Handling of output paths (#247, #250, #256)
    • All paths specified using #[ts(export_to = "...")] are now relative to TS_RS_EXPORT_DIR, which defaults to ./bindings/
  • Replace TS::export with TS::export, TS::export_all and TS::export_to_all (#263)

Features

  • Implement #[ts(as = "..")] (#174)
  • For small arrays, generate tuples instead of Array<T> (#209)
  • Implement #[ts(optional = nullable)] (#213)
  • Allow inlining of fields with generic types (#212, #215, #216)
  • Allow flattening enum fields (#206)
  • Add semver-impl cargo feature with support for the semver crate (#176)
  • Support HashMap with custom hashers (#173)
  • Add import-esm cargo feature to import files with a .js extension (#192)
  • Implement #[ts(...)] equivalents for #[serde(tag = "...")], #[serde(tag = "...", content = "...")] and #[serde(untagged)] (#227)
  • Support #[serde(untagged)] on individual enum variants (#226)
  • Support for #[serde(rename_all_fields = "...")] (#225)
  • Export Rust doc comments/attributes on structs/enums as TSDoc strings (#187)
  • Result, Option, HashMap and Vec had their implementations of TS changed (#241)
  • Implement #[ts(...)] equivalent for #[serde(tag = "...")] being used on a struct with named fields (#244)
  • Implement #[ts(concrete(..))] to specify a concrete type for a generic parameter (#264)

Fixes

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ts-rs](https://github.com/Aleph-Alpha/ts-rs) from 7.0.0 to 8.1.0.
- [Release notes](https://github.com/Aleph-Alpha/ts-rs/releases)
- [Changelog](https://github.com/Aleph-Alpha/ts-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Aleph-Alpha/ts-rs/commits/v8.1.0)

---
updated-dependencies:
- dependency-name: ts-rs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Mar 22, 2024
@dependabot dependabot bot requested a review from jhelwig March 22, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant