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

@commitlint/rules

Package Overview
Dependencies
Maintainers
4
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/rules - npm Package Compare versions

Comparing version 19.0.3 to 19.4.1

2

lib/header-full-stop.js

@@ -5,3 +5,3 @@ import message from '@commitlint/message';

const negated = when === 'never';
const hasStop = (header === null || header === void 0 ? void 0 : header[header.length - 1]) === value;
const hasStop = header?.[header.length - 1] === value;
return [

@@ -8,0 +8,0 @@ negated ? !hasStop : hasStop,

import { maxLength } from '@commitlint/ensure';
export const headerMaxLength = (parsed, _when = undefined, value = 0) => {
var _a;
return [
maxLength(parsed.header, value),
`header must not be longer than ${value} characters, current length is ${(_a = parsed.header) === null || _a === void 0 ? void 0 : _a.length}`,
`header must not be longer than ${value} characters, current length is ${parsed.header?.length}`,
];
};
//# sourceMappingURL=header-max-length.js.map
import { minLength } from '@commitlint/ensure';
export const headerMinLength = (parsed, _when = undefined, value = 0) => {
var _a;
return [
minLength(parsed.header, value),
`header must not be shorter than ${value} characters, current length is ${(_a = parsed.header) === null || _a === void 0 ? void 0 : _a.length}`,
`header must not be shorter than ${value} characters, current length is ${parsed.header?.length}`,
];
};
//# sourceMappingURL=header-min-length.js.map

@@ -11,3 +11,5 @@ import message from '@commitlint/message';

const negated = when === 'never';
const hasSignedOffBy = last.startsWith(value);
const hasSignedOffBy =
// empty commit message
last ? last.startsWith(value) : false;
return [

@@ -14,0 +16,0 @@ negated ? !hasSignedOffBy : hasSignedOffBy,

import message from '@commitlint/message';
export const subjectFullStop = (parsed, when = 'always', value = '.') => {
var _a;
const colonIndex = ((_a = parsed.header) === null || _a === void 0 ? void 0 : _a.indexOf(':')) || 0;
const colonIndex = parsed.header?.indexOf(':') || 0;
if (colonIndex > 0 && colonIndex === parsed.header.length - 1) {

@@ -10,4 +9,4 @@ return [true];

const negated = when === 'never';
let hasStop = (input === null || input === void 0 ? void 0 : input[input.length - 1]) === value;
if ((input === null || input === void 0 ? void 0 : input.slice(-3)) === '...') {
let hasStop = input?.[input.length - 1] === value;
if (input?.slice(-3) === '...') {
hasStop = false;

@@ -14,0 +13,0 @@ }

{
"name": "@commitlint/rules",
"type": "module",
"version": "19.0.3",
"version": "19.4.1",
"description": "Lint your commit messages",

@@ -52,3 +52,3 @@ "main": "lib/index.js",

},
"gitHead": "9b4ac34069e06cd327760ce37adbde8d537d8e3e"
"gitHead": "249e6a2767a757094776bda5f8d8f596b20e83c8"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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