Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ghooks

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghooks - npm Package Compare versions

Comparing version 0.2.2 to 0.2.4

test/hook.template.raw.test.js

2

lib/install.js

@@ -6,3 +6,3 @@ module.exports = installHooks;

var resolve = require('path').resolve;
var projectRoot = resolve(cwd.replace(/node_modules\/.*/, ''));
var projectRoot = resolve(cwd.replace(/node_modules\/.*|node_modules\\.*/, ''));
var hooksDir = resolve(projectRoot, '.git/hooks');

@@ -9,0 +9,0 @@ var template = require('./hook.template');

{
"name" : "ghooks",
"description" : "Simple git hooks",
"version" : "0.2.2",
"version" : "0.2.4",
"main" : "./lib/runner.js",

@@ -22,3 +22,3 @@ "keywords" : [ "git", "hooks", "hook" ],

"test" : "make test",
"install" : "./bin/install"
"install" : "node ./bin/install"
},

@@ -31,12 +31,12 @@

"devDependencies" : {
"mocha" : "^1.18.2",
"chai" : "^1.9.1",
"sinon" : "^1.9.1",
"sinon-chai" : "^2.5.0",
"proxyquire" : "^1.0.1",
"mock-fs" : "^2.2.0",
"mocha-cov-reporter" : "^1.1.0",
"mocha" : "^2.0.1",
"chai" : "^1.10.0",
"sinon" : "^1.12.1",
"sinon-chai" : "^2.6.0",
"proxyquire" : "^1.1.0",
"mock-fs" : "^2.3.2",
"mocha-cov-reporter" : "^1.1.1",
"blanket" : "^1.1.6",
"jshint-stylish" : "^1.0.0",
"jshint" : "^2.5.0",
"jshint" : "^2.5.10",
"ghooks" : "*"

@@ -43,0 +43,0 @@ },

@@ -7,9 +7,8 @@ require('./setup')();

it('warns when the target is not a git project', function () {
it('warns when the target is not a git project', sinon.test(function () {
fsStub({});
console.warn = function (message) {
expect(message).to.match(/this does not seem to be a git project/i);
};
var warn = this.stub(console, 'warn');
install();
});
expect(warn).to.have.been.calledWithMatch(/this does not seem to be a git project/i);
}));

@@ -16,0 +15,0 @@ it('creates hooks directory', function () {

@@ -5,7 +5,8 @@ var chai = require('chai');

global.expect = chai.expect;
global.stub = require('sinon').stub;
global.spy = require('sinon').spy;
global.sinon = require('sinon');
global.stub = sinon.stub;
global.spy = sinon.spy;
global.fsStub = require('mock-fs');
global.fs = require('fs');
global.proxyquire = require('proxyquire');
global.proxyquire = require('proxyquire').noCallThru();

@@ -12,0 +13,0 @@ global.fileContent = function (file) {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc