Socket
Book a DemoInstallSign in
Socket

yarnhook

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yarnhook

`yarnhook` keeps your `node_modules` up-to-date when your `yarn.lock` or `package-lock.json` changes due to git operations like `checkout`, `merge`, `rebase`, `pull` etc.

Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

yarnhook npm version

yarnhook keeps your node_modules up-to-date when your yarn.lock or package-lock.json changes due to git operations like checkout, merge, rebase, pull etc.

Installation

This package should be used with husky.

yarn add --dev yarnhook husky
# or
npm install --save-dev yarnhook husky

Usage

You should let yarnhook handle git hooks that change the dependencies. Example package.json is as follows:

{
  "scripts": {
    "postmerge": "yarnhook",
    "postcheckout": "yarnhook",
    "postrewrite": "yarnhook"
  }
}

Flags

Prepend YARNHOOK_BYPASS=true to your git command if you don't want to run yarn install or npm install as a result, YARNHOOK_DEBUG=true to print debug information.

An example:

YARNHOOK_BYPASS=true git checkout feature-branch

FAQs

Package last updated on 28 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts