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

simple-git-hooks

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-git-hooks - npm Package Compare versions

Comparing version 2.7.0 to 2.8.0

4

cli.js
#!/usr/bin/env node
/**
* A CLI tool to change the git hooks to commands from config
*/
const {setHooksFromConfig} = require('./simple-git-hooks')

@@ -4,0 +8,0 @@

3

package.json
{
"name": "simple-git-hooks",
"version": "2.7.0",
"version": "2.8.0",
"description": "A simple, zero dependency tool for setting up git hooks for small projects",

@@ -9,3 +9,2 @@ "author": "Mikhail Gorbunov <toplenboren@gmail.com> (toplenboren.github.io)",

"scripts": {
"publish": "clean-publish --without-publish",
"postinstall": "node ./postinstall.js",

@@ -12,0 +11,0 @@ "uninstall": "node ./uninstall.js"

@@ -183,7 +183,6 @@ const fs = require('fs')

function _getCustomConfigPath(argv=[]) {
const cmdIdx = argv.findIndex(val => val === 'simple-git-hooks')
if (cmdIdx === -1) return ''
return argv[cmdIdx + 1] || ''
// We'll run as one of the following:
// npx simple-git-hooks ./config.js
// node path/to/simple-git-hooks/cli.js ./config.js
return argv[2] || ''
}

@@ -227,3 +226,4 @@

const {packageJsonContent} = _getPackageJson(projectRootPath)
return packageJsonContent['simple-git-hooks']
const config = packageJsonContent['simple-git-hooks'];
return typeof config === 'string' ? _getConfig(config) : packageJsonContent['simple-git-hooks']
}

@@ -241,3 +241,5 @@

try {
const filePath = path.normalize(projectRootPath + '/' + fileName)
const filePath = path.isAbsolute(fileName)
? fileName
: path.normalize(projectRootPath + '/' + fileName)
if (filePath === __filename) {

@@ -244,0 +246,0 @@ return undefined

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