parse-commit-message
Advanced tools
Comparing version
@@ -22,3 +22,3 @@ type Result<T> = { | ||
footer?: string | null; | ||
increment?: string | boolean; | ||
increment?: string; | ||
isBreaking?: boolean; | ||
@@ -25,0 +25,0 @@ mentions?: Array<Mention>; |
@@ -76,3 +76,3 @@ // SPDX-License-Identifier: MPL-2.0 | ||
const isBreaking = isBreakingChange(cmt); | ||
let commitIncrement = ""; | ||
let commitIncrement = false; | ||
if (/fix|bugfix|patch/i.test(cmt.header.type)) { | ||
@@ -87,2 +87,5 @@ commitIncrement = "patch"; | ||
} | ||
if (!commitIncrement) { | ||
return {}; | ||
} | ||
return { increment: commitIncrement }; | ||
@@ -89,0 +92,0 @@ } |
{ | ||
"name": "parse-commit-message", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"licenseStart": 2018, | ||
@@ -5,0 +5,0 @@ "license": "MPL-2.0", |
@@ -24,3 +24,3 @@ import type { Commit, Options } from '../types.ts'; | ||
* @param {boolean} options.caseSensitive whether or not to be case sensitive, defaults to `false` | ||
* @returns {Commit} plus `{ increment: 'major' | 'minor' | 'patch' | '' }` | ||
* @returns {Commit} plus `{ increment: 'major' | 'minor' | 'patch' }` | ||
* @public | ||
@@ -31,7 +31,7 @@ */ | ||
options?: Options, | ||
): { increment: 'major' | 'minor' | 'patch' | '' } { | ||
): { increment: 'major' | 'minor' | 'patch' } { | ||
const opts = { normalize: true, ...options }; | ||
const cmt: Commit = opts.normalize ? normalizeCommit(commit, opts) : commit; | ||
const isBreaking = isBreakingChange(cmt); | ||
let commitIncrement: 'major' | 'minor' | 'patch' | '' = ''; | ||
let commitIncrement: 'major' | 'minor' | 'patch' | boolean = false; | ||
@@ -48,3 +48,8 @@ if (/fix|bugfix|patch/i.test(cmt.header.type)) { | ||
if (!commitIncrement) { | ||
// @ts-expect-error bruh.. you're not accepting `void | { obj.. }` in return type while plugins can, so fvck off | ||
return {}; | ||
} | ||
return { increment: commitIncrement }; | ||
} |
@@ -26,3 +26,3 @@ export type Result<T> = { | ||
footer?: string | null; | ||
increment?: string | boolean; | ||
increment?: string; | ||
isBreaking?: boolean; | ||
@@ -29,0 +29,0 @@ mentions?: Array<Mention>; |
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 2 instances in 1 package
124834
0.19%2282
0.44%0
-100%