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

uncommitted

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

uncommitted

Checks if a git repository has uncommitted changes.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

uncommitted

A super lightweight way to check if a git repository has uncommitted changes.

Installation

npm install uncommitted --save-dev

Using with npm

Check your repo from within npm with a package.json like so. If there are any uncommitted changes, an error will stop any further scripts from running.

{
  "name": "uncommitted-example",
  "version": "1.0.0",
  "scripts": {
    "prepublish": "uncommitted"
  },
  "devDependencies": {
    "uncommitted": "1.0.0"
  }
}

API

var uncommitted = require('uncommitted');
var util = require('util');

uncommitted(function(err, result) {
  if (err) {
    return console.error(err.message);
  }
  console.log(util.format('There are %d uncommitted file%s.', 
    result.total, 
    result.total === 1 ? '' : 's'));
});

Keywords

git

FAQs

Package last updated on 10 Mar 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