New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sync-modules

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sync-modules

automatically keep node_modules in sync with Git hooks

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

sync-modules

js-standard-style

This package may be interesting to you if you're developing using Node.js and Git.

The Problem

At the beginning of your workday you git pull the latest changes from your coworkers and start working. After a while you notice that some of the tests aren't passing. You back out your changes and the tests still won't pass! How is this possible? You know you've configured GitHub to protect the master branch so it can't be changed without passing tests and this shouldn't happen.

The problem is that you haven't brewed your morning tea yet and you forgot to type npm install after git pull. Your package.json file and node_modules directory are out of sync. Oops!

The Solution

$ npm install --save-dev sync-modules

That's it; no configuration necessary. Installing the sync-modules package installs Git hooks to keep your node_modules directory in sync automatically with package.json when Git changes it.

It won't install if you already have a post-checkout or post-merge Git hook defined. I welcome a pull request if this case is important to you.

Credit

Thanks to David Walsh for the inspiration.

Copyright 2016 David Braun

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Keywords

Git

FAQs

Package last updated on 03 Jun 2016

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