The current implementation is a quick and dirty regex lookup. As a result some care has to be taken with package names. For example, if a short (and common) pattern like "cli" is given then a Cargo.lock might have multiple crates that could be matched and incorrectly replaced.
My strategy this far has been to carefully name packages and manually ensure that dependencies don't get bumped. This isn't ideal and I think it'd be a good idea to try to add support for different types of files. In the config there could be a replacement-type with values such as cargo-toml, cargo-lock, and regex.
The current implementation is a quick and dirty regex lookup. As a result some care has to be taken with package names. For example, if a short (and common) pattern like
"cli"is given then aCargo.lockmight have multiple crates that could be matched and incorrectly replaced.My strategy this far has been to carefully name packages and manually ensure that dependencies don't get bumped. This isn't ideal and I think it'd be a good idea to try to add support for different types of files. In the config there could be a
replacement-typewith values such ascargo-toml,cargo-lock, andregex.