Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 26, 2026

Bumps ts-rs from 10.1.0 to 11.1.0.

Release notes

Sourced from ts-rs's releases.

v11.1.0

Today, we're happy to publish a small follow-up to v11.0.1!

This release fixes a nasty build failure when using the format feature. Note: For those that use the format feature, this release bumps the MSRV to 1.88. We'd have preferred to do this in a major release, but felt this was acceptable since the build was broken by one of the dependencies anyway.

New features

TypeScript enums with #[ts(repr(enum))

#[ts(repr(enum)) instructs ts-rs to generate an enum, instead of a type for your rust enum.

#[derive(TS)]
#[ts(repr(enum))]
enum Role {
    User,
    Admin,
}
// will generate `export enum Role { "User", "Admin" }`

Discriminants are preserved, and you can use the variant's name as discriminant instead using #[ts(repr(enum = name))]

#[ts(optional_fields)] in enums

The #[ts(optional_fields)] attribute can now be applied directly to enums, or even to individual enum variants.

Control over file extensions in imports

Normally, we generate import { Type } from "file" statements. In some scenarios though, it might be necessary to use a .ts or even .js extension instead.
This is now possible by setting the TS_RS_IMPORT_EXTENSION environment variable.

Note: With the introduction of this feature, we deprecate the import-esm cargo feature. It will be removed in a future major release.

Full changelog

New Contributors

v11.0.0

We are excited to announce v11.0.0!

Upgrading from v10.x.x

  • With the serde-compat feature enabled (default), fields annotated with both #[serde(skip_serializing(_if))] and #[serde(default)] are now turned into optional properties.
    See "Improved serde compatibility" under "New features" below
  • The API of the ts_rs::TS trait has slightly changed.
    Some trivial adjustments to your code might be necessary, though only if you interact with ts_rs::TS directly.
    Most users should not be affected by this.

... (truncated)

Changelog

Sourced from ts-rs's changelog.

11.1.0

Features

  • Add #[ts(repr(enum))] attribute (#425)
  • Add support for #[ts(optional_fields)] in enums and enum variants (#432)
  • Deprecate import-esm cargo feature in favour of RS_RS_IMPORT_EXTENSION (#423)

Fixes

  • Fix bindings for chrono::Duration (#434)

11.0.1

Fixes

  • Fix usage of #[ts(optional)] together with #[ts(type)]. (#416)

11.0.0

Breaking

  • #[serde(skip_serializing)] and #[serde(skip_serializing_if = ..)] are no longer ignored when used together with #[serde(default)]. (#393)
  • Changed return type of TS::output_path() from Option<&'static Path> to Option<PathBuf>. This will only break your code if you manually implement TS or directly interact with the TS trait.
  • Replaced TS::DOCS with TS::docs(). This will only break your code if you manually implement TS or directly interact with the TS trait.
  • Added OptionInnerType associated type to the TS trait. If you manually implement TS, you must set this associated type to Self in all of your implementations.
  • Raised MSRV to 1.78.0 due to use of #[diagnostic::on_unimplemented] and let ... else { ... }

Features

  • Add support for #[serde(skip_serializing)] and #[serde(skip_serializing_if = ..)] when used together with #[serde(default)]. Since these fields might be absent(#393)
  • Add support for arbitrary expressions in doc attributes, e.g #[doc = concat!("defined in ", file!())]. This would result both in a rustdoc and JSDoc comment.
  • The #[ts(rename)] attribute on structs, enums and variants now accepts any expression. This makes it possible to, for example, rename a struct to the name of a module it is contained in using #[ts(rename = module_path!().rsplit_once("::").unwrap().1)]
  • The #[ts(export_to)] attribute on structs and enums now accepts any expression.
  • Added #[ts(optional_fields)] and #[ts(optional_fields = nullable)] attribute to structs, this attribute is equivalent to using the corresponding #[ts(optional)] or #[ts(optional = nullable)] on every field of the struct. (#366)

Fixes

  • Fix #[ts(optional)] error when using a type alias for Option or fully qualifying it as core::option::Option (#366)
  • Fix missing import statements when using #[ts(as = "...")] at the top level of a struct/enum (#385)
  • Fix missing inline_flattened implementation for HashMap
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 10.1.0 to 11.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](Aleph-Alpha/ts-rs@v10.1.0...v11.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 26, 2026

Labels

The following labels could not be found: dependencies, rust. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant