renovate/lib/modules/manager/cargo
2023-11-07 15:50:29 +00:00
..
__fixtures__ feat(manager/cargo): support for cargo repository source replacement (#23956) 2023-08-25 09:41:15 +00:00
__snapshots__ feat(cargo): support private crate (#24704) 2023-10-03 12:52:55 +00:00
artifacts.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
artifacts.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
extract.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
extract.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
index.ts feat!: categories (#16534) 2023-07-04 19:21:52 +02:00
range.spec.ts fix(cargo): widen not bump when value includes less-than (#22790) 2023-06-15 19:41:37 +00:00
range.ts fix(cargo): widen not bump when value includes less-than (#22790) 2023-06-15 19:41:37 +00:00
readme.md feat(cargo): support private crate (#24704) 2023-10-03 12:52:55 +00:00
types.ts feat(manager/cargo): support for cargo repository source replacement (#23956) 2023-08-25 09:41:15 +00:00
utils.ts feat(manager/cargo): support for cargo repository source replacement (#23956) 2023-08-25 09:41:15 +00:00

Extracts dependencies from Cargo.toml files, and also updates Cargo.lock files too if found.

When using the default rangeStrategy=auto:

  • If a "less than" instruction is found (e.g. <2) then rangeStrategy=widen will be selected,
  • Otherwise, rangeStrategy=bump will be selected.

Private Modules Authentication

Before running the cargo commands to update the cargo.lock, Renovate exports git insteadOf directives in environment variables.

Renovate uses this logic before it updates any "artifacts":

The token from the hostRules entry matching hostType=github and matchHost=api.github.com is added as the default authentication for github.com. For those running against github.com, this token will be the default platform token.

Next, all hostRules with both a token or username/password and matchHost will be fetched, except for any github.com one from above.

Rules from this list are converted to environment variable directives if they match any of these characteristics:

  • No hostType is defined, or
  • hostType is cargo, or
  • hostType is a platform (github, gitlab, azure, etc.)