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

commitplease

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commitplease - npm Package Compare versions

Comparing version 2.7.8 to 2.7.9

13

index.js

@@ -120,3 +120,16 @@ var fs = require('fs')

if (error) {
if (/Not a git repository/.test(error.message)) {
console.log(error.message)
process.exit(0)
}
if (/does not have any commits yet/.test(error.message)) {
console.log(error.message)
process.exit(0)
}
console.error(error)
process.exit(1)

@@ -123,0 +136,0 @@ }

2

package.json
{
"name": "commitplease",
"version": "2.7.8",
"version": "2.7.9",
"description": "Validates strings as commit messages",

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

@@ -18,3 +18,14 @@ #!/usr/bin/env node

// Date.now() - mtime.getTime() is milliseconds, convert to seconds
if ((Date.now() - mtime.getTime()) / 1000 < oldMessageSeconds) {
var fresh = (Date.now() - mtime.getTime()) / 1000 < oldMessageSeconds
// There are many scenarios that trigger the prepare-commit-msg hook
// These scenarios pass different console parameters, see here:
// https://www.kernel.org/pub/software/scm/git/docs/githooks.html
//
// A plain `git commit` is the only scenario that passes 3 entries
// For all other scenarios (like `git commit -m`, squash or merge)
// just delete oldMessagePath, do not actually suggest it to user
var plain = process.argv === 3
if (plain && fresh) {
fs.writeFileSync(process.argv[2], fs.readFileSync(oldMessagePath))

@@ -21,0 +32,0 @@ }

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