0.3.3 • Published 5 years ago
yarn-lock-sync v0.3.3
Based on https://github.com/ganimomer/check-yarn-lock
Enforce committing yarn.lock when changing dependencies
This executable is meant to be executed as a git pre-commit hook for npm projects using yarn.
Whenever changes are made to one of package.json
's dependency
properties, if no change is staged in yarn.lock
as well, this program emits an error message.
Usage
To use a commit hook, add an execution check-yarn-lock
to your repository's pre-commit hook.
This can be made easier using husky
.
Options
--avoid-wildcards Throw an Error if package.json have a dependency without locked version
--fix-wildcards Install and lock to latest version based on dependency wildcard version range
--avoid-wildcards
- will be throw a error for any version unlocked version:
typescript@^2.0.1
typescript@~2.8.1
typescript@>2.0.1
typescript@2.*.*
--fix-wildcards
- will be increased to the latest stable range version based on npm API:
typescript@^2.0.1
→2.9.2
typescript@~2.8.1
→2.8.4
typescript@>2.0.1
→3.4.5
(latest on 2019-04-26)