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

conventional-commits-filter

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conventional-commits-filter - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

dist/filters.d.ts

38

package.json
{
"name": "conventional-commits-filter",
"version": "4.0.0",
"description": "Filter out reverted commits parsed by conventional-commits-parser",
"bugs": {
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
"type": "module",
"version": "5.0.0",
"description": "Filter out reverted commits parsed by conventional-commits-parser.",
"author": {
"name": "Steve Mao",
"email": "maochenyan@gmail.com",
"url": "https://github.com/stevemao"
},
"license": "MIT",
"homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-filter#readme",
"repository": {
"type": "git",
"url": "https://github.com/conventional-changelog/conventional-changelog.git"
"url": "https://github.com/conventional-changelog/conventional-changelog.git",
"directory": "packages/conventional-commits-filter"
},
"author": {
"name": "Steve Mao",
"email": "maochenyan@gmail.com",
"url": "https://github.com/stevemao"
"bugs": {
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
},
"engines": {
"node": ">=16"
},
"files": [
"index.js"
],
"keywords": [

@@ -30,3 +27,12 @@ "filter",

],
"license": "MIT"
"engines": {
"node": ">=18"
},
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"files": [
"dist"
]
}

@@ -1,18 +0,57 @@

# conventional-commits-filter [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coverage-image]][coverage-url]
> Filter out reverted commits parsed by conventional-commits-parser
# conventional-commits-filter
[![ESM-only package][package]][package-url]
[![NPM version][npm]][npm-url]
[![Node version][node]][node-url]
[![Dependencies status][deps]][deps-url]
[![Install size][size]][size-url]
[![Build status][build]][build-url]
[![Coverage status][coverage]][coverage-url]
[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg
[package-url]: https://nodejs.org/api/esm.html
[npm]: https://img.shields.io/npm/v/conventional-commits-filter.svg
[npm-url]: https://npmjs.com/package/conventional-commits-filter
[node]: https://img.shields.io/node/v/conventional-commits-filter.svg
[node-url]: https://nodejs.org
[deps]: https://img.shields.io/librariesio/release/npm/conventional-commits-filter
[deps-url]: https://libraries.io/npm/conventional-commits-filter/tree
[size]: https://packagephobia.com/badge?p=conventional-commits-filter
[size-url]: https://packagephobia.com/result?p=conventional-commits-filter
[build]: https://img.shields.io/github/actions/workflow/status/conventional-changelog/conventional-changelog/tests.yaml?branch=master
[build-url]: https://github.com/conventional-changelog/conventional-changelog/actions
[coverage]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master
Filter out reverted commits parsed by conventional-commits-parser.
## Install
```sh
$ npm install --save conventional-commits-filter
```bash
# pnpm
pnpm add conventional-commits-filter
# yarn
yarn add conventional-commits-filter
# npm
npm i conventional-commits-filter
```
## Usage
```js
var conventionalCommitsFilter = require('conventional-commits-filter');
import {
filterRevertedCommitsSync,
filterRevertedCommits,
filterRevertedCommitsStream
} from 'conventional-commits-filter'
import { pipeline } from 'stream/promises'
import { Readable } from 'stream'
var commits = [{
const commits = [{
type: 'revert',

@@ -119,6 +158,28 @@ scope: null,

commits = conventionalCommitsFilter(commits);
console.log(commits);
/*=>
[{
// to filter reverted commits syncronously:
for (const commit of filterRevertedCommitsSync(commits)) {
console.log(commit)
}
// to filter reverted commits in async iterables:
await pipeline(
commits,
filterRevertedCommits,
async function* (filteredCommits) {
for await (const commit of filteredCommits) {
console.log(commit)
}
}
)
// to filter reverted commits in streams:
Readable.from(commits)
.pipe(filterRevertedCommitsStream())
.on('data', commit => console.log(commit))
```
Output:
```js
{
type: 'What',

@@ -146,3 +207,4 @@ scope: null,

}
}, {
}
{
type: 'Chores',

@@ -170,4 +232,3 @@ scope: null,

}
}]
*/
}
```

@@ -177,12 +238,2 @@

MIT © [Steve Mao]()
[npm-image]: https://badge.fury.io/js/conventional-commits-filter.svg
[npm-url]: https://npmjs.org/package/conventional-commits-filter
[travis-image]: https://travis-ci.org/stevemao/conventional-commits-filter.svg?branch=master
[travis-url]: https://travis-ci.org/stevemao/conventional-commits-filter
[daviddm-image]: https://david-dm.org/stevemao/conventional-commits-filter.svg
[daviddm-url]: https://david-dm.org/stevemao/conventional-commits-filter
[coverage-image]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master
MIT © [Steve Mao](https://github.com/stevemao)
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