docs: add FAQ entry for dependency version conflict with version_files#1910
Open
sedat4ras wants to merge 1 commit intocommitizen-tools:masterfrom
Open
docs: add FAQ entry for dependency version conflict with version_files#1910sedat4ras wants to merge 1 commit intocommitizen-tools:masterfrom
sedat4ras wants to merge 1 commit intocommitizen-tools:masterfrom
Conversation
Closes commitizen-tools#819 When a dependency shares the same version as the project, Commitizen's version_files replacement will match both. Add a FAQ section explaining: - Option 1: anchor the version_files pattern with ^ to match line starts - Option 2 (recommended): use version_provider to avoid regex matching entirely Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new FAQ entry addressing a common pain point: when a dependency in
pyproject.tomlhas the same version number as the project itself, Commitizen'sversion_filesregex replacement can accidentally update the dependency version too.The fix was already documented in issue #496 and the maintainer (@Lee-W who opened this issue) suggested adding it to the FAQ.
Closes #819
Documentation Changes
Added a new section to
docs/faq.md:version_filespattern with^to only match lines starting withversionversion_providerinstead ofversion_filesto avoid text-replacement altogetherChecklist
Generated-by: Claude following the guidelines
Documentation Changes
uv run poe doclocally — documentation-only change with standard Markdown, no new links that could breakExpected Behavior
Users searching the FAQ for dependency version conflicts will find clear, actionable guidance.
Additional Context
The answer was originally written by @woile in #496 and @Lee-W (the issue author) confirmed it should be in the FAQ.