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

git-validate

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-validate - npm Package Compare versions

Comparing version 2.0.3 to 2.0.5

LICENSE

10

lib/utils.js

@@ -110,6 +110,10 @@ var Fs = require('fs');

var sourceStream = Fs.createReadStream(source);
var targetStream = Fs.createWriteStream(target, { flag: 'w', mode: mode });
var sourceContent = '';
try {
sourceContent = Fs.readFileSync(source);
} catch (e) {
/* no source to copy */
}
sourceStream.pipe(targetStream);
Fs.writeFileSync(target, sourceContent, { flag: 'w', mode: mode });
};

@@ -116,0 +120,0 @@

{
"name": "git-validate",
"version": "2.0.3",
"version": "2.0.5",
"description": "the extensible core of precommit-hook",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -52,2 +52,4 @@ var ChildProcess = require('child_process');

internals.createFile('project4', 'this', 'is', 'too', 'deep', 'to', 'find', 'package.json');
internals.mkdir('project5', '.git');
internals.createFile('project5', 'package.json');
done();

@@ -213,3 +215,3 @@ };

expect(projects).to.be.an.array();
expect(projects).to.have.length(4);
expect(projects).to.have.length(5);
expect(projects).to.contain(Path.dirname(__dirname));

@@ -236,2 +238,9 @@ expect(projects).to.contain(Path.join(internals.fixturePath, 'project1'));

it('can install a hook to a .git directory without hooks subdir', function (done) {
Utils.installHooks('pre-commit', Path.join(internals.fixturePath, 'project5'));
expect(Fs.existsSync(Path.join(internals.fixturePath, 'project5', '.git', 'hooks', 'pre-commit'))).to.be.true();
done();
});
it('can install multiple hooks at once', function (done) {

@@ -238,0 +247,0 @@

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