Skip to content

feat: add support for Rust (Cargo) dependencies#119

Merged
silverwind merged 2 commits intosilverwind:masterfrom
bircni:feature/rust-dependencies
Mar 17, 2026
Merged

feat: add support for Rust (Cargo) dependencies#119
silverwind merged 2 commits intosilverwind:masterfrom
bircni:feature/rust-dependencies

Conversation

@bircni
Copy link
Contributor

@bircni bircni commented Mar 14, 2026

No description provided.

- Add cargo mode for Cargo.toml (dependencies, dev-dependencies, build-dependencies)
- Fetch versions from crates.io API, filter yanked, normalize to npm-shaped data
- updateCargoToml() for simple and inline-table version replacement
- ModeContext.cratesIoUrl, cargoTypes, -M cargo default, --cargoapi for tests
- Fixtures and test; User-Agent fix for crates.io 403

Made-with: Cursor
@silverwind
Copy link
Owner

Nice, definitely makes sense to support this. I will review later.

- Add cargo to findNewVersion version extraction (was empty, worked by
  accident via dist-tags fallback, broke --greatest/--patch/--minor)
- Add workspace.dependencies to cargoTypes
- Use getProperty for cargo dep access to support dotted paths
- Add extended table syntax support in updateCargoToml ([deps.name])
- Derive regex section alternatives from cargoTypes constant
- Expand test fixture with inline table, git/path deps, dev-deps,
  extended table syntax

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind
Copy link
Owner

This comment was written by Claude.

Pushed fixes to the cargo mode:

  • findNewVersion in shared.ts was missing a cargo branch — versions array stayed empty, working only by accident via dist-tags.latest fallback. Broke --greatest/--patch/--minor flags.
  • Added workspace.dependencies support via getProperty for dotted dep type paths.
  • Added extended table syntax ([dependencies.name]) support in updateCargoToml.
  • Derived regex section alternatives from cargoTypes constant instead of hardcoding.
  • Expanded test fixture with inline table, git/path deps (skip), dev-dependencies, and extended table.

@silverwind silverwind merged commit 20cd3ba into silverwind:master Mar 17, 2026
16 checks passed
silverwind added a commit that referenced this pull request Mar 17, 2026
* update deps (silverwind)
* simplify files table (silverwind)
* feat: add support for Rust (Cargo) dependencies (#119) (bircni)
@bircni bircni deleted the feature/rust-dependencies branch March 17, 2026 19:24
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.

2 participants