🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

check-yarn-lock

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-yarn-lock - npm Package Compare versions

Comparing version

to
0.2.1

6

package.json
{
"name": "check-yarn-lock",
"version": "0.2.0",
"version": "0.2.1",
"description": "A check that any commit that stages package.json dependency changes also changes yarn.lock",

@@ -11,2 +11,6 @@ "main": "index.js",

},
"repository": {
"type": "git",
"url": "https://github.com/ganimomer/check-yarn-lock.git"
},
"bin": "./index.js",

@@ -13,0 +17,0 @@ "keywords": [],

8

README.md

@@ -8,8 +8,2 @@ # Enforce committing yarn.lock when changing dependencies

To use a commit hook, add an execution `check-yarn-lock` to your repository's [pre-commit hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks).
This can be made easier using [`husky`](https://github.com/typicode/husky).
### Caveats
The current implementation of this module is meant to cover all common cases, but it is not 100% fool-proof as it does not check internal `yarn.lock` structure:
- If `package.json` was changed and __did not trigger changes to `yarn.lock`__ (e.g. removing a caret from the latest available version of a dependency), this check might fail when it should pass.
- In this case, you can run `git commit --no-verify` to commit anyway.
This can be made easier using [`husky`](https://github.com/typicode/husky).