Closed
Description
Description
NomProvider
currently only updates package.json. However, it is common practice to check both package.json and package-lock.json into git / scm, thus both files should be updated simultaneously.
Possible Solution
Using NpmProvider
should by default update both package.json and package-lock.json, with the option of skipping package-lock.json.
Another option would be to have JsonProvider
update multiple files using with a unique JSON expression per file. This would allow developers to implement on their own. Configuration could look something like:
[tool.commitizen]
version_provider = "json"
version_files = [
"package.json:.version",
"package-lock.json:.version",
"package-lock.json:.package.''.version"
]
Additional context
See issue #659
Additional context
No response
UPDATED: Fixed the JSON expressions to match what should really be matched.