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

commitplease

Package Overview
Dependencies
Maintainers
1
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 1.3.0 to 1.4.0

10

lib/validate.js

@@ -17,2 +17,6 @@ var merge = require( "mout/object/merge" ),

message.split(/\n/).forEach(function ( line, index ) {
// skip comments
if ( /^#/.test( line ) ) {
return;
}
if ( index === 0 ) {

@@ -40,6 +44,2 @@ // allow tag commits

if ( index > 1 && line.length > options.limits.other ) {
// skip comments
if ( /^#/.test( line ) ) {
return;
}
errors.push( "Commit message line " + ( index + 1 ) + " too long: " +

@@ -53,3 +53,3 @@ line.length + " characters, only " + options.limits.other +

errors.push( "Invalid ticket reference, must be " +
"/(Fixes|Closes) (#|gh-)[0-9]+/, was: " + line );
"/(Fixes|Closes) (.*#|gh-)[0-9]+/, was: " + line );
}

@@ -56,0 +56,0 @@ }

{
"name": "commitplease",
"version": "1.3.0",
"version": "1.4.0",
"description": "Validates strings as commit messages",

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

@@ -5,3 +5,3 @@ # Commitplease

This [node.js](http://nodejs.org/) module validates git commit messages while you commit.
This [node.js](http://nodejs.org/) module validates git commit messages while you commit, according to the rules specified in the [jQuery Commit Guidlines](http://contribute.jquery.org/commits-and-pull-requests/#commit-guidelines). These are pretty generic, so this module should be useful for most projects that care about commit message formats.

@@ -41,9 +41,6 @@ ## Installation

```js
// component in subject is required
component: true,
limits: {
// hard limit of subject
subject: 50,
// hard limit of all other lines
other: 72
subject: 72,
other: 80
}

@@ -50,0 +47,0 @@ ```

@@ -49,2 +49,5 @@ var validate = require( "./lib/validate" );

msg: "0.0.1"
},
{
msg: "Component: Message\n#comment"
}

@@ -77,3 +80,3 @@ ];

msg: "Docs: Fix a typo\n\nCloses: gh-155",
expected: [ "Invalid ticket reference, must be /(Fixes|Closes) (#|gh-)[0-9]+/, was: Closes: gh-155" ]
expected: [ "Invalid ticket reference, must be /(Fixes|Closes) (.*#|gh-)[0-9]+/, was: Closes: gh-155" ]
}

@@ -80,0 +83,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