Skip to content

docs: add FAQ entry for dependency version conflict with version_files#1910

Open
sedat4ras wants to merge 1 commit intocommitizen-tools:masterfrom
sedat4ras:docs/faq-version-conflict
Open

docs: add FAQ entry for dependency version conflict with version_files#1910
sedat4ras wants to merge 1 commit intocommitizen-tools:masterfrom
sedat4ras:docs/faq-version-conflict

Conversation

@sedat4ras
Copy link

Description

Adds a new FAQ entry addressing a common pain point: when a dependency in pyproject.toml has the same version number as the project itself, Commitizen's version_files regex 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:

  • Option 1: Anchor the version_files pattern with ^ to only match lines starting with version
  • Option 2 (recommended): Use version_provider instead of version_files to avoid text-replacement altogether

Checklist

  • I have read the contributing guidelines
  • Yes, generative AI tooling (Claude) was used to co-author this PR

Generated-by: Claude following the guidelines

Documentation Changes

  • Update the documentation for the changes
  • Run uv run poe doc locally — documentation-only change with standard Markdown, no new links that could break

Expected 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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new FAQ for describing how to handle the case that some dependency happens to have the same version as the project version

1 participant