Skip to content

chore(deps): bump rust-i18n from 3.1.5 to 4.1.0 in /src-tauri - #1044

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/src-tauri/rust-i18n-4.1.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/src-tauri/rust-i18n-4.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 16, 2026

Copy link
Copy Markdown
Contributor

Bumps rust-i18n from 3.1.5 to 4.1.0.

Release notes

Sourced from rust-i18n's releases.

v4.1.0

What's Changed

Full Changelog: longbridge/rust-i18n@v4.0.0...v4.1.0

v4.0.0

What's Changed

Breaking Changes

  • Backend trait signature changed to use Cow<'_, str>available_locales() now returns Vec<Cow<'_, str>> instead of Vec<&str>, and translate() now returns Option<Cow<'_, str>> instead of Option<&str>. Custom Backend implementations must be updated accordingly. (#114)
  • SimpleBackend::add_translations() signature changed — Now takes Cow<'static, str> for locale and HashMap<Cow<'static, str>, Cow<'static, str>> for data, instead of &str and &HashMap<&str, &str>. (#133)
  • New required method messages_for_locale on Backend trait — Returns all translation messages for a given locale as Option<Vec<(Cow<'_, str>, Cow<'_, str>)>>.
  • Removed once_cell dependency — Replaced with std::sync::LazyLock from the standard library. The re-export rust_i18n::once_cell is no longer available. This raises the minimum supported Rust version (MSRV) to 1.80.0. (#131)

Performance Improvements

  • Dramatically reduced allocations in the i18n! macro expansion — Previously, the macro generated one HashMap per translation pair; now it generates one HashMap per locale. For large projects, this reduces HashMap creation from thousands to just a handful (e.g., 14,000 → 32). This also fixes stack overflow crashes on Windows for projects with many translations. (#133)
  • Eliminated unnecessary String allocations — By using Cow<'static, str> throughout, static translation strings are no longer cloned into heap-allocated Strings. (#114, #133)

New Features

  • messages_for_locale() method on Backend — Retrieve all translation key-value pairs for a specific locale, useful for inspection and debugging.
  • try_load_locales() function — A fallible alternative to load_locales() in rust-i18n-support that returns Result instead of panicking, with detailed error messages for file lookup, parsing, and I/O failures. (#127)
  • Improved error messages — Parsing failures now include the specific error reason instead of a generic panic message. (#116)

Internal / Maintenance

  • Replaced once_cell::sync::Lazy with std::sync::LazyLock (#131)
  • Added Cargo.lock to version control (#120)
  • Improved CI workflow with concurrency groups and branch filtering
  • Added release workflow
  • Bumped slab from 0.4.10 to 0.4.11 (#122)

Migration Guide

If you have a custom Backend implementation, update it to:

use std::borrow::Cow;
impl Backend for MyBackend {
fn available_locales(&self) -> Vec<Cow<', str>> { /* ... */ }
fn translate(&self, locale: &str, key: &str) -> Option<Cow<', str>> { /* ... / }
fn messages_for_locale(&self, locale: &str) -> Option<Vec<(Cow<', str>, Cow<', str>)>> { / ... */ }
}

... (truncated)

Commits
  • 97cf091 fix: enable codegen feature for rust-i18n-support in dev-dependencies (#141)
  • d2aaa49 docs: Add user cases. (#132)
  • a931914 Version 4.0.0
  • 410adde Reduce allocations create unnecessary HashMaps and Strings (#133)
  • 94a91a7 docs: Update user cases. (#134)
  • 90b8e37 Bump slab from 0.4.10 to 0.4.11 (#122)
  • c58ecb6 Bump v4.0.0-preview1
  • 2d09179 Add messages_for_locale method to get all message for locale to Backend. (#...
  • 1cc7772 Add try_load_locales method to rust-i18n-support. (#127)
  • e6d6170 chore: Remove once_cell, use std::sync::LazyLock. (#131)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 16, 2026
Bumps [rust-i18n](https://github.com/longbridge/rust-i18n) from 3.1.5 to 4.1.0.
- [Release notes](https://github.com/longbridge/rust-i18n/releases)
- [Commits](longbridge/rust-i18n@v3.1.5...v4.1.0)

---
updated-dependencies:
- dependency-name: rust-i18n
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/cargo/src-tauri/rust-i18n-4.1.0 branch from 9d743ee to cec84ff Compare June 26, 2026 14:18
@xiaolai

xiaolai commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Declining for now: major Rust bump with breaking changes and red CI; would need a deliberate migration. Dependabot can re-offer on a future version.

@xiaolai xiaolai closed this Jun 27, 2026
@dependabot @github

dependabot Bot commented on behalf of github Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/cargo/src-tauri/rust-i18n-4.1.0 branch June 27, 2026 01:16
xiaolai added a commit that referenced this pull request Jun 27, 2026
…h, done correctly) (#1062)

* chore(deps): upgrade rust-i18n 3→4, dirs 5→6, toml 0.8→0.9

All three are drop-in for VMark's usage — verified locally with
`cargo check` + 728 passing tests:

- rust-i18n 4: the 3→4 breaking changes are all trait-level (custom Backend
  impls + the dropped once_cell re-export). We use only the i18n!/t! macros
  and set_locale, which are unchanged. MSRV 1.80 is satisfied.
- dirs 6: home_dir() is unchanged (our only call); we never use config_dir,
  so its macOS churn is irrelevant.
- toml 0.9: we parse into toml::Table (not Value, sidestepping the
  FromStr-now-parses-values break) and use to_string_pretty (signature
  unchanged). Resolves to 0.9.10 — the +spec-1.1.0 suffix is build metadata
  on the published 0.9.10, not a separate preview track.

Completes the intent of dependabot #1044 / #1042 / #1043, which failed as
blind bumps, done correctly with verification.

* chore(deps): upgrade JS majors — i18next 26, lucide-react 1, zod 4 (mcp), react-i18next 16.6

Done correctly with the code migrations dependabot's blind bumps couldn't do.
Verified with the full `pnpm check:all` (tsc, lint, sidecar + content-server
tests, build, coverage, size).

- i18next 25 → 26: `initImmediate` was removed; renamed back to `initAsync`
  (same semantics). src/i18n.ts updated. react-i18next bumped 16.5 → 16.6
  (peer `>= 25.10.9` admits i18next 26).
- lucide-react 0.562 → 1.x: v1 removed all brand icons. AboutSettings imported
  the now-removed `Github`, so it ships the GitHub mark as a local inline SVG
  (GithubMark.tsx) matching the lucide render contract. All other 74 icons
  resolve unchanged. Settings-page size limit nudged 94 → 95 kB for the SVG.
- zod 3 → 4 (vmark-mcp-server): single-arg `z.record()` was removed; cli.ts now
  passes an explicit key schema (`z.record(z.string(), z.unknown())`). The MCP
  SDK 1.27.1 peers `^3.25 || ^4.0`, so zod 4 is accepted.

Completes the intent of dependabot #1052 / #1046 / #1037 / #1047.

* chore(deps): dev-tooling majors (vite-plugin-react 5, react-hooks 7, globals 17) + cargo minor/patch group

Verified with full `pnpm check:all` (lint, build, coverage, sidecar,
content-server, size) + `cargo check` + 728 Rust tests.

- @vitejs/plugin-react 4 → 5, globals 16 → 17: drop-in (dev/build only, no
  bundle impact). Replaces #1048, #1054.
- eslint-plugin-react-hooks 5 → 7: v7 folded the React Compiler rule set into
  `recommended`, flagging 67 pre-existing sites (set-state-in-effect, refs,
  manual-memoization, immutability). Adopting those is a deliberate codebase
  refactor, not a version bump — so they're deferred in eslint.config.js
  (documented) to preserve the prior enforcement level, and exhaustive-deps is
  pinned to its historical `warn`. Replaces #1050.
- cargo minor/patch updates within semver (`cargo update`): reproduces the
  cargo-minor-patch group (#1040), which failed as a blind bump against a
  stale base. Compiles clean + all Rust tests pass.

Note: the root npm minor/patch group (#1045) is intentionally NOT swept in
here — it carries a mermaid 11.12→11.16 (+~800 kB lazy chunk) and tiptap
3.18→3.27 growth that trips the size gate and warrants a separate, conscious
decision rather than an automatic limit bump. Left to dependabot.

* chore(deps): npm minor/patch sweep (root + mcp + content-server)

`pnpm update -r` within semver — reproduces the dependabot minor/patch groups
#1045 (root), #1036 (mcp), and #1051 (@eslint/js) as one verified change.
Full `pnpm check:all` green.

- Size growth accepted (approved): mermaid 11.12 → 11.16 (+~800 kB, lazy
  chunk — never in cold start) and tiptap 3.18 → 3.27 (+18 kB eager). Both
  size-limit ceilings bumped with documented reasons in .size-limit.cjs.
- schema.ts: vscode-languageserver-types reached LSP 3.18, which widened
  Diagnostic.message to `string | MarkupContent`; flatten MarkupContent to
  its text via a messageText() helper.

Completes #1045 / #1036 / #1051.

* docs(eslint): link react-hooks-7 rule deferral to tracking issue #1063

* fix(deps): reconcile pnpm-lock with dompurify override so --frozen-lockfile passes

The minor/patch sweep left pnpm-lock.yaml frozen-inconsistent: the direct
dompurify dep (^3.4.11) and the pnpm.overrides entry (>=3.3.2) disagreed in a
way non-frozen install tolerates but CI's --frozen-lockfile rejects
(ERR_PNPM_OUTDATED_LOCKFILE). Plain pnpm install reconciles it. check:all green.

* fix(knip): re-add mermaid + vitepress to website ignore lists

The minor/patch sweep shifted node_modules hoisting enough that knip (on a
clean --frozen-lockfile install, as CI runs) can no longer statically trace
the website's mermaid usage (rendered via vitepress's component system) or
resolve the `vitepress` binary — flagging both as error-level (Unused
devDependencies / Unlisted binaries). Both are genuinely used; the earlier
gate-fix removed these ignore entries as "stale," but they're load-bearing
across hoisting states. Verified with a clean install + full check:all.
xiaolai added a commit that referenced this pull request Aug 12, 2026
…h, done correctly) (#1062)

* chore(deps): upgrade rust-i18n 3→4, dirs 5→6, toml 0.8→0.9

All three are drop-in for VMark's usage — verified locally with
`cargo check` + 728 passing tests:

- rust-i18n 4: the 3→4 breaking changes are all trait-level (custom Backend
  impls + the dropped once_cell re-export). We use only the i18n!/t! macros
  and set_locale, which are unchanged. MSRV 1.80 is satisfied.
- dirs 6: home_dir() is unchanged (our only call); we never use config_dir,
  so its macOS churn is irrelevant.
- toml 0.9: we parse into toml::Table (not Value, sidestepping the
  FromStr-now-parses-values break) and use to_string_pretty (signature
  unchanged). Resolves to 0.9.10 — the +spec-1.1.0 suffix is build metadata
  on the published 0.9.10, not a separate preview track.

Completes the intent of dependabot #1044 / #1042 / #1043, which failed as
blind bumps, done correctly with verification.

* chore(deps): upgrade JS majors — i18next 26, lucide-react 1, zod 4 (mcp), react-i18next 16.6

Done correctly with the code migrations dependabot's blind bumps couldn't do.
Verified with the full `pnpm check:all` (tsc, lint, sidecar + content-server
tests, build, coverage, size).

- i18next 25 → 26: `initImmediate` was removed; renamed back to `initAsync`
  (same semantics). src/i18n.ts updated. react-i18next bumped 16.5 → 16.6
  (peer `>= 25.10.9` admits i18next 26).
- lucide-react 0.562 → 1.x: v1 removed all brand icons. AboutSettings imported
  the now-removed `Github`, so it ships the GitHub mark as a local inline SVG
  (GithubMark.tsx) matching the lucide render contract. All other 74 icons
  resolve unchanged. Settings-page size limit nudged 94 → 95 kB for the SVG.
- zod 3 → 4 (vmark-mcp-server): single-arg `z.record()` was removed; cli.ts now
  passes an explicit key schema (`z.record(z.string(), z.unknown())`). The MCP
  SDK 1.27.1 peers `^3.25 || ^4.0`, so zod 4 is accepted.

Completes the intent of dependabot #1052 / #1046 / #1037 / #1047.

* chore(deps): dev-tooling majors (vite-plugin-react 5, react-hooks 7, globals 17) + cargo minor/patch group

Verified with full `pnpm check:all` (lint, build, coverage, sidecar,
content-server, size) + `cargo check` + 728 Rust tests.

- @vitejs/plugin-react 4 → 5, globals 16 → 17: drop-in (dev/build only, no
  bundle impact). Replaces #1048, #1054.
- eslint-plugin-react-hooks 5 → 7: v7 folded the React Compiler rule set into
  `recommended`, flagging 67 pre-existing sites (set-state-in-effect, refs,
  manual-memoization, immutability). Adopting those is a deliberate codebase
  refactor, not a version bump — so they're deferred in eslint.config.js
  (documented) to preserve the prior enforcement level, and exhaustive-deps is
  pinned to its historical `warn`. Replaces #1050.
- cargo minor/patch updates within semver (`cargo update`): reproduces the
  cargo-minor-patch group (#1040), which failed as a blind bump against a
  stale base. Compiles clean + all Rust tests pass.

Note: the root npm minor/patch group (#1045) is intentionally NOT swept in
here — it carries a mermaid 11.12→11.16 (+~800 kB lazy chunk) and tiptap
3.18→3.27 growth that trips the size gate and warrants a separate, conscious
decision rather than an automatic limit bump. Left to dependabot.

* chore(deps): npm minor/patch sweep (root + mcp + content-server)

`pnpm update -r` within semver — reproduces the dependabot minor/patch groups
#1045 (root), #1036 (mcp), and #1051 (@eslint/js) as one verified change.
Full `pnpm check:all` green.

- Size growth accepted (approved): mermaid 11.12 → 11.16 (+~800 kB, lazy
  chunk — never in cold start) and tiptap 3.18 → 3.27 (+18 kB eager). Both
  size-limit ceilings bumped with documented reasons in .size-limit.cjs.
- schema.ts: vscode-languageserver-types reached LSP 3.18, which widened
  Diagnostic.message to `string | MarkupContent`; flatten MarkupContent to
  its text via a messageText() helper.

Completes #1045 / #1036 / #1051.

* docs(eslint): link react-hooks-7 rule deferral to tracking issue #1063

* fix(deps): reconcile pnpm-lock with dompurify override so --frozen-lockfile passes

The minor/patch sweep left pnpm-lock.yaml frozen-inconsistent: the direct
dompurify dep (^3.4.11) and the pnpm.overrides entry (>=3.3.2) disagreed in a
way non-frozen install tolerates but CI's --frozen-lockfile rejects
(ERR_PNPM_OUTDATED_LOCKFILE). Plain pnpm install reconciles it. check:all green.

* fix(knip): re-add mermaid + vitepress to website ignore lists

The minor/patch sweep shifted node_modules hoisting enough that knip (on a
clean --frozen-lockfile install, as CI runs) can no longer statically trace
the website's mermaid usage (rendered via vitepress's component system) or
resolve the `vitepress` binary — flagging both as error-level (Unused
devDependencies / Unlisted binaries). Both are genuinely used; the earlier
gate-fix removed these ignore entries as "stale," but they're load-bearing
across hoisting states. Verified with a clean install + full check:all.
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