Socket
Socket
Sign inDemoInstall

cz-conventional-changelog

Package Overview
Dependencies
143
Maintainers
5
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.1 to 3.3.0

10

engine.js

@@ -24,5 +24,5 @@ 'format cjs';

var filterSubject = function(subject) {
var filterSubject = function(subject, disableSubjectLowerCase) {
subject = subject.trim();
if (subject.charAt(0).toLowerCase() !== subject.charAt(0)) {
if (!disableSubjectLowerCase && subject.charAt(0).toLowerCase() !== subject.charAt(0)) {
subject =

@@ -103,3 +103,3 @@ subject.charAt(0).toLowerCase() + subject.slice(1, subject.length);

validate: function(subject, answers) {
var filteredSubject = filterSubject(subject);
var filteredSubject = filterSubject(subject, options.disableSubjectLowerCase);
return filteredSubject.length == 0

@@ -116,3 +116,3 @@ ? 'subject is required'

transformer: function(subject, answers) {
var filteredSubject = filterSubject(subject);
var filteredSubject = filterSubject(subject, options.disableSubjectLowerCase);
var color =

@@ -125,3 +125,3 @@ filteredSubject.length <= maxSummaryLength(options, answers)

filter: function(subject) {
return filterSubject(subject);
return filterSubject(subject, options.disableSubjectLowerCase);
}

@@ -128,0 +128,0 @@ },

@@ -104,2 +104,19 @@ var chai = require('chai');

});
it('header and body w/ uppercase subject', function() {
var upperCaseSubject = subject.toLocaleUpperCase();
expect(
commitMessage(
{
type,
scope,
subject: upperCaseSubject,
body
},
{
...defaultOptions,
disableSubjectLowerCase: true
}
)
).to.equal(`${type}(${scope}): ${upperCaseSubject}\n\n${body}`);
});
it('header, body and issues w/ out scope', function() {

@@ -321,2 +338,5 @@ expect(

});
it('disableSubjectLowerCase default', function() {
expect(questionDefault('disableSubjectLowerCase')).to.be.undefined;
});
});

@@ -323,0 +343,0 @@

@@ -17,2 +17,4 @@ 'format cjs';

process.env.DISABLE_SCOPE_LOWERCASE || config.disableScopeLowerCase,
disableSubjectLowerCase:
process.env.DISABLE_SUBJECT_LOWERCASE || config.disableSubjectLowerCase,
maxHeaderWidth:

@@ -19,0 +21,0 @@ (process.env.CZ_MAX_HEADER_WIDTH &&

{
"name": "cz-conventional-changelog",
"version": "3.2.1",
"version": "3.3.0",
"description": "Commitizen adapter following the conventional-changelog format.",

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

@@ -24,2 +24,4 @@ # cz-conventional-changelog

"path": "./node_modules/cz-conventional-changelog",
"disableScopeLowerCase": false,
"disableSubjectLowerCase": false,
"maxHeaderWidth": 100,

@@ -45,2 +47,3 @@ "maxLineWidth": 100,

```
### Environment variables

@@ -60,2 +63,1 @@

If using the [commitlint](https://github.com/conventional-changelog/commitlint) js library, the "maxHeaderWidth" configuration property will default to the configuration of the "header-max-length" rule instead of the hard coded value of 100. This can be ovewritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc