-
-
Notifications
You must be signed in to change notification settings - Fork 307
Open
Labels
Description
Description
The uv provider does not normalize package names when matching the project name from pyproject.toml against entries in uv.lock. When a project uses underscores in its name (e.g., my_package), uv normalizes this to hyphens in uv.lock (e.g., my-package). The uv provider performs a direct string comparison, so the match fails silently and uv.lock is not updated.
Steps to reproduce
- Create a project with an underscore in the name:
# pyproject.toml
[project]
name = "my_package"
[tool.commitizen]
version_provider = "uv"
- Run
uv lock— the lockfile will contain name = "my-package" - Create initial commit and run
cz bump - Observe that pyproject.toml is updated but uv.lock still has the old version
Current behavior
On cz bump, pyproject.toml is updated but uv.lock still has the old version.
Desired behavior
Both pyproject.toml and uv.lock should be updated.
Screenshots
No response
Environment
Commitizen Version: 4.11.0
Python Version: 3.14.2 (main, Dec 5 2025, 16:49:16) [Clang 17.0.0 (clang-1700.4.4.1)]
Operating System: Darwin