@semantic-release/commit-analyzer
Advanced tools
Comparing version 12.0.0 to 13.0.0-beta.1
24
index.js
import { isUndefined } from "lodash-es"; | ||
import { sync as parser } from "conventional-commits-parser"; | ||
import filter from "conventional-commits-filter"; | ||
import { CommitParser } from "conventional-commits-parser"; | ||
import { filterRevertedCommitsSync } from "conventional-commits-filter"; | ||
import debugFactory from "debug"; | ||
@@ -34,3 +34,4 @@ import loadParserConfig from "./lib/load-parser-config.js"; | ||
filter( | ||
const parser = new CommitParser(config) | ||
const filteredCommits = filterRevertedCommitsSync( | ||
commits | ||
@@ -45,5 +46,11 @@ .filter(({ message, hash }) => { | ||
}) | ||
.map(({ message, ...commitProps }) => ({ rawMsg: message, message, ...commitProps, ...parser(message, config) })) | ||
).every(({ rawMsg, ...commit }) => { | ||
logger.log(`Analyzing commit: %s`, rawMsg); | ||
.map((rawCommit) => ({ | ||
...rawCommit, | ||
...parser.parse(rawCommit.message) | ||
})) | ||
); | ||
for (const { message, ...commit } of filteredCommits) { | ||
console.log(`Analyzing commit: %s`, message) | ||
logger.log(`Analyzing commit: %s`, message); | ||
let commitReleaseType; | ||
@@ -76,7 +83,6 @@ | ||
if (releaseType === RELEASE_TYPES[0]) { | ||
return false; | ||
break; | ||
} | ||
} | ||
return true; | ||
}); | ||
logger.log("Analysis of %s commits complete: %s release", commits.length, releaseType || "no"); | ||
@@ -83,0 +89,0 @@ |
@@ -33,3 +33,3 @@ import { dirname } from "node:path"; | ||
return { ...loadedConfig.parserOpts, ...parserOpts }; | ||
return { ...loadedConfig.parser, ...parserOpts }; | ||
}; |
{ | ||
"name": "@semantic-release/commit-analyzer", | ||
"description": "semantic-release plugin to analyze commits with conventional-changelog", | ||
"version": "12.0.0", | ||
"version": "13.0.0-beta.1", | ||
"type": "module", | ||
@@ -18,8 +18,10 @@ "author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)", | ||
"Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)", | ||
"Gregor Martynus (https://twitter.com/gr2m)" | ||
"Gregor Martynus (https://twitter.com/gr2m)", | ||
"Matt Travi <npm@travi.org> (https://matt.travi.org/)" | ||
], | ||
"dependencies": { | ||
"conventional-changelog-angular": "^7.0.0", | ||
"conventional-commits-filter": "^4.0.0", | ||
"conventional-commits-parser": "^5.0.0", | ||
"conventional-changelog-angular": "^8.0.0", | ||
"conventional-changelog-writer": "^8.0.0", | ||
"conventional-commits-filter": "^5.0.0", | ||
"conventional-commits-parser": "^6.0.0", | ||
"debug": "^4.0.0", | ||
@@ -31,17 +33,17 @@ "import-from-esm": "^1.0.3", | ||
"devDependencies": { | ||
"ava": "6.1.2", | ||
"ava": "6.1.3", | ||
"c8": "9.1.0", | ||
"conventional-changelog-atom": "4.0.0", | ||
"conventional-changelog-conventionalcommits": "7.0.2", | ||
"conventional-changelog-ember": "4.0.0", | ||
"conventional-changelog-eslint": "5.0.0", | ||
"conventional-changelog-express": "4.0.0", | ||
"conventional-changelog-jshint": "4.0.0", | ||
"conventional-changelog-atom": "5.0.0", | ||
"conventional-changelog-conventionalcommits": "8.0.0", | ||
"conventional-changelog-ember": "5.0.0", | ||
"conventional-changelog-eslint": "6.0.0", | ||
"conventional-changelog-express": "5.0.0", | ||
"conventional-changelog-jshint": "5.0.0", | ||
"lockfile-lint": "4.13.2", | ||
"ls-engines": "0.9.1", | ||
"npm-run-all2": "6.1.2", | ||
"npm-run-all2": "6.2.0", | ||
"prettier": "3.2.5", | ||
"publint": "0.2.7", | ||
"semantic-release": "23.0.2", | ||
"sinon": "17.0.1" | ||
"publint": "0.2.8", | ||
"semantic-release": "23.1.1", | ||
"sinon": "18.0.0" | ||
}, | ||
@@ -119,3 +121,3 @@ "engines": { | ||
}, | ||
"packageManager": "npm@10.5.0+sha256.17ca6e08e7633b624e8f870db81a78f46afe119de62bcaf0a7407574139198fc" | ||
"packageManager": "npm@10.8.0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34903
247
9
1
- Removed@semantic-release/commit-analyzer@13.0.0(transitive)
- RemovedJSONStream@1.3.5(transitive)
- Removedconventional-changelog-angular@7.0.0(transitive)
- Removedconventional-commits-filter@4.0.0(transitive)
- Removedconventional-commits-parser@5.0.0(transitive)
- Removedis-text-path@2.0.0(transitive)
- Removedjsonparse@1.3.1(transitive)
- Removedmeow@12.1.1(transitive)
- Removedsplit2@4.2.0(transitive)
- Removedtext-extensions@2.4.0(transitive)
- Removedthrough@2.3.8(transitive)