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.1.1 to 1.2.0

8

lib/validate.js

@@ -5,4 +5,4 @@ var merge = require( "mout/object/merge" ),

limits: {
subject: 50,
other: 72
subject: 72,
other: 80
}

@@ -35,2 +35,6 @@ };

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

@@ -37,0 +41,0 @@ line.length + " characters, only " + options.limits.other +

{
"name": "commitplease",
"version": "1.1.1",
"version": "1.2.0",
"description": "Validates strings as commit messages",

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

@@ -23,5 +23,5 @@ # Commitplease

var validate = require('commitplease/lib/validate');
var errors = commitplease(commit.message);
var errors = validate(commit.message);
if (errors.length) {
postComment('This commit has ' errors.length + ' problems!');
postComment('This commit has ' + errors.length + ' problems!');
}

@@ -28,0 +28,0 @@ ```

@@ -32,3 +32,9 @@ var validate = require( "./lib/validate" );

}
}
},
{
msg: "Component: short message\n" +
"\n" +
"# Long comment that has to be ignored line too long beyond 72 chars line too long beyond" +
"line too long line too long line too long"
},
];

@@ -38,4 +44,4 @@

{
msg: "Component: short message but actually over default limit",
expected: [ "First line (subject) must be no longer than 50 characters" ]
msg: "Component: short message but actually a little bit over default character limit",
expected: [ "First line (subject) must be no longer than 72 characters" ]
},

@@ -55,5 +61,5 @@ {

{
msg: "component: bla\n\nline too long beyond 72 chars line too long beyond" +
msg: "component: bla\n\nline too long beyond 80 chars line too long beyond" +
"line too long line too long line too long",
expected: [ "Commit message line 3 too long: 91 characters, only 72 allowed. Was: line too long beyond[...]" ]
expected: [ "Commit message line 3 too long: 91 characters, only 80 allowed. Was: line too long beyond[...]" ]
}

@@ -60,0 +66,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