Gathering detailed insights and metrics for conventional-commits-filter
Gathering detailed insights and metrics for conventional-commits-filter
Gathering detailed insights and metrics for conventional-commits-filter
Gathering detailed insights and metrics for conventional-commits-filter
Generate changelogs and release notes from a project's commit messages and metadata.
npm install conventional-commits-filter
Typescript
Module System
Min. Node Version
Node Version
NPM Version
git-client: v1.0.1
Published on 06 May 2024
conventional-changelog: v6.0.0
Published on 03 May 2024
conventional-changelog-core: v8.0.0
Published on 03 May 2024
conventional-changelog-conventionalcommits: v8.0.0
Published on 03 May 2024
git-semver-tags: v8.0.0
Published on 03 May 2024
conventional-changelog-preset-loader: v5.0.0
Published on 03 May 2024
TypeScript (56.7%)
JavaScript (40.52%)
Handlebars (2.78%)
Total Downloads
734,162,926
Last Day
774,153
Last Week
3,616,887
Last Month
16,309,689
Last Year
200,696,128
7,954 Stars
1,722 Commits
719 Forks
56 Watching
28 Branches
148 Contributors
Latest Version
5.0.0
Package Id
conventional-commits-filter@5.0.0
Unpacked Size
18.57 kB
Size
5.81 kB
File Count
18
NPM Version
10.5.0
Node Version
18.20.2
Publised On
03 May 2024
Cumulative downloads
Total Downloads
Last day
-7.1%
774,153
Compared to previous day
Last week
-14.7%
3,616,887
Compared to previous week
Last month
2.8%
16,309,689
Compared to previous month
Last year
28.3%
200,696,128
Compared to previous year
No dependencies detected.
Filter out reverted commits parsed by conventional-commits-parser.
1# pnpm 2pnpm add conventional-commits-filter 3# yarn 4yarn add conventional-commits-filter 5# npm 6npm i conventional-commits-filter
1import { 2 filterRevertedCommitsSync, 3 filterRevertedCommits, 4 filterRevertedCommitsStream 5} from 'conventional-commits-filter' 6import { pipeline } from 'stream/promises' 7import { Readable } from 'stream' 8 9const commits = [{ 10 type: 'revert', 11 scope: null, 12 subject: 'feat(): amazing new module', 13 header: 'revert: feat(): amazing new module\n', 14 body: 'This reverts commit 56185b7356766d2b30cfa2406b257080272e0b7a.\n', 15 footer: null, 16 notes: [], 17 references: [], 18 revert: { 19 header: 'feat(): amazing new module', 20 hash: '56185b7356766d2b30cfa2406b257080272e0b7a', 21 body: null 22 }, 23 hash: '789d898b5f8422d7f65cc25135af2c1a95a125ac\n', 24 raw: { 25 type: 'revert', 26 scope: null, 27 subject: 'feat(): amazing new module', 28 header: 'revert: feat(): amazing new module\n', 29 body: 'This reverts commit 56185b7356766d2b30cfa2406b257080272e0b7a.\n', 30 footer: null, 31 notes: [], 32 references: [], 33 revert: { 34 header: 'feat(): amazing new module', 35 hash: '56185b7356766d2b30cfa2406b257080272e0b7a', 36 body: null 37 }, 38 hash: '789d898b5f8422d7f65cc25135af2c1a95a125ac\n' 39 } 40}, { 41 type: 'Features', 42 scope: null, 43 subject: 'wow', 44 header: 'amazing new module\n', 45 body: null, 46 footer: 'BREAKING CHANGE: Not backward compatible.\n', 47 notes: [], 48 references: [], 49 revert: null, 50 hash: '56185b', 51 raw: { 52 type: 'feat', 53 scope: null, 54 subject: 'amazing new module', 55 header: 'feat(): amazing new module\n', 56 body: null, 57 footer: 'BREAKING CHANGE: Not backward compatible.\n', 58 notes: [], 59 references: [], 60 revert: null, 61 hash: '56185b7356766d2b30cfa2406b257080272e0b7a\n' 62 } 63}, { 64 type: 'What', 65 scope: null, 66 subject: 'new feature', 67 header: 'feat(): new feature\n', 68 body: null, 69 footer: null, 70 notes: [], 71 references: [], 72 revert: null, 73 hash: '815a3f0', 74 raw: { 75 type: 'feat', 76 scope: null, 77 subject: 'new feature', 78 header: 'feat(): new feature\n', 79 body: null, 80 footer: null, 81 notes: [], 82 references: [], 83 revert: null, 84 hash: '815a3f0717bf1dfce007bd076420c609504edcf3\n' 85 } 86}, { 87 type: 'Chores', 88 scope: null, 89 subject: 'first commit', 90 header: 'chore: first commit\n', 91 body: null, 92 footer: null, 93 notes: [], 94 references: [], 95 revert: null, 96 hash: '74a3e4d6d25', 97 raw: { 98 type: 'chore', 99 scope: null, 100 subject: 'first commit', 101 header: 'chore: first commit\n', 102 body: null, 103 footer: null, 104 notes: [], 105 references: [], 106 revert: null, 107 hash: '74a3e4d6d25dee2c0d6483a0a3887417728cbe0a\n' 108 } 109}]; 110 111// to filter reverted commits syncronously: 112for (const commit of filterRevertedCommitsSync(commits)) { 113 console.log(commit) 114} 115 116// to filter reverted commits in async iterables: 117await pipeline( 118 commits, 119 filterRevertedCommits, 120 async function* (filteredCommits) { 121 for await (const commit of filteredCommits) { 122 console.log(commit) 123 } 124 } 125) 126 127// to filter reverted commits in streams: 128Readable.from(commits) 129 .pipe(filterRevertedCommitsStream()) 130 .on('data', commit => console.log(commit))
Output:
1{ 2 type: 'What', 3 scope: null, 4 subject: 'new feature', 5 header: 'feat(): new feature\n', 6 body: null, 7 footer: null, 8 notes: [], 9 references: [], 10 revert: null, 11 hash: '815a3f0', 12 raw: { 13 type: 'feat', 14 scope: null, 15 subject: 'new feature', 16 header: 'feat(): new feature\n', 17 body: null, 18 footer: null, 19 notes: [], 20 references: [], 21 revert: null, 22 hash: '815a3f0717bf1dfce007bd076420c609504edcf3\n' 23 } 24} 25{ 26 type: 'Chores', 27 scope: null, 28 subject: 'first commit', 29 header: 'chore: first commit\n', 30 body: null, 31 footer: null, 32 notes: [], 33 references: [], 34 revert: null, 35 hash: '74a3e4d6d25', 36 raw: { 37 type: 'chore', 38 scope: null, 39 subject: 'first commit', 40 header: 'chore: first commit\n', 41 body: null, 42 footer: null, 43 notes: [], 44 references: [], 45 revert: null, 46 hash: '74a3e4d6d25dee2c0d6483a0a3887417728cbe0a\n' 47 } 48}
MIT © Steve Mao
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
26 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 9/13 approved changesets -- score normalized to 6
Reason
5 existing vulnerabilities detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More