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

conventional-changelog-sprucelabs

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conventional-changelog-sprucelabs - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

58

conventional-recommended-bump.js

@@ -6,28 +6,40 @@ 'use strict'

module.exports = {
parserOpts,
parserOpts,
whatBump: (commits) => {
let level = 2
let breakings = 0
let features = 0
whatBump: commits => {
// level 0 = major
// level 0 = minor
// level 2 = patch
commits.forEach(commit => {
if (commit.notes.length > 0) {
breakings += commit.notes.length
level = 0
} else if (commit.type === `feat`) {
features += 1
if (level === 2) {
level = 1
}
}
})
let level = 2
let patch = 0
let minor = 0
let major = 0
return {
level: level,
reason: breakings === 1
? `There is ${breakings} BREAKING CHANGE and ${features} features`
: `There are ${breakings} BREAKING CHANGES and ${features} features`
}
}
commits.forEach(commit => {
switch (commit.type) {
case 'BREAKING':
case 'breaking':
major += 1
level = 0
break
case 'major':
case 'minor':
case 'feat':
minor += 1
if (level === 2) {
level = 1
}
break
default:
patch += 1
break
}
})
return {
level: level,
reason: `Major: ${major} | Minor: ${minor} | Patch: ${patch}`
}
}
}
{
"name": "conventional-changelog-sprucelabs",
"version": "1.0.0",
"version": "1.1.0",
"description": "conventional-changelog for sprucelabs based on angular preset",

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

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