While v10.0.0 is a technically breaking change, we expect it to be a drop-in replacement for almost all users.
Changes to HashMap<K, V> (& friends)
In this release, we've changed how HashMap<K, V> is represented in TypeScript.
Before v10, ts-rs generated { [key: K]: V }. This was never technically correct, resulting in tsc accepting some code which it should not have. Additionally, this resulted in issues when e.g trying to use an enum as key.
With v10, we now generate { [key in K]?: V } instead.
What's New?
Multiple types can be exported to the same file using #[ts(export_to = "..")]
#[ts(as = "..")] and #[ts(type = "..")] now also work on enum variants
Change how HashMap<K, V> is represented in TypeScript. The resulting bindings ({ [key in K]?: V } instead of { [key: K]: V }) are more accurate and flexible.
Features
Allow multile types to have the same #[ts(export_to = "...")] attribute and be exported to the same file (#316)
The bson-uuid-impl feature now supports bson::oid::ObjectId as well (#340)
Add support for types from smol_str behind cargo feature smol_str-impl (#350)
Support #[ts(as = "...")] and #[ts(type = "...")] on enum variants (#384)
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 ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the dependencies group in /core_lib with 3 updates: prost, ts-rs and prost-build.
Updates
prost
from 0.13.2 to 0.13.3Changelog
Sourced from prost's changelog.
Commits
9ed944e
chore: Release version 0.13.3 (#1164)fb977f4
fix(prost-build): Removederived(Copy)
on boxed fields (#1157)8d4cac5
feat(prost-types): Addnormalized
functions (#1158)644c328
build(deps): update pulldown-cmark-to-cmark from 16 to 17 (#1155)4b1b982
style(generated-code): useSelf
inas_str_name
(#1154)9fa3f2e
tests(prost-build): Fix error texts (#1156)7dcd269
tests(prost-build): Validate error texts (#1152)d3fd54c
style:MessageGraph::new()
can't actually fail (#1151)d059d05
style: usePath::display()
when printing a path (#1150)18c4681
docs(prost-build): Usecargo add
in example (#1149)Updates
ts-rs
from 9.0.1 to 10.0.0Release notes
Sourced from ts-rs's releases.
Changelog
Sourced from ts-rs's changelog.
Commits
0d92a2b
release v10.09763ca0
Support#[ts(as = "...")]
and#[ts(type = "...")]
on enum variants (#284)6651d92
Fix smol_str-impl feature name in lib.rsfb47428
Fix smol_str-impl feature name in test61a6d6a
Fix smol_str-impl feature name7577aca
feature: support smol_str (#350)78591a2
Always use forward slash on import paths (#346)5cbc740
feat: Allow multiple types to set#[ts(export_to = "...")]
to the same file...5c3b8c9
Fix error in internally tagged enums with flattened fields (#344)7ee0cbc
Update CHANGELOGUpdates
prost-build
from 0.13.2 to 0.13.3Changelog
Sourced from prost-build's changelog.
Commits
9ed944e
chore: Release version 0.13.3 (#1164)fb977f4
fix(prost-build): Removederived(Copy)
on boxed fields (#1157)8d4cac5
feat(prost-types): Addnormalized
functions (#1158)644c328
build(deps): update pulldown-cmark-to-cmark from 16 to 17 (#1155)4b1b982
style(generated-code): useSelf
inas_str_name
(#1154)9fa3f2e
tests(prost-build): Fix error texts (#1156)7dcd269
tests(prost-build): Validate error texts (#1152)d3fd54c
style:MessageGraph::new()
can't actually fail (#1151)d059d05
style: usePath::display()
when printing a path (#1150)18c4681
docs(prost-build): Usecargo add
in example (#1149)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