4.0.0 • Published 8 months ago

conventional-commits-filter v4.0.0

Weekly downloads
2,026,877
License
MIT
Repository
github
Last release
8 months ago

conventional-commits-filter NPM version Build Status Dependency Status Coverage percentage

Filter out reverted commits parsed by conventional-commits-parser

Install

$ npm install --save conventional-commits-filter

Usage

var conventionalCommitsFilter = require('conventional-commits-filter');

var commits = [{
  type: 'revert',
  scope: null,
  subject: 'feat(): amazing new module',
  header: 'revert: feat(): amazing new module\n',
  body: 'This reverts commit 56185b7356766d2b30cfa2406b257080272e0b7a.\n',
  footer: null,
  notes: [],
  references: [],
  revert: {
    header: 'feat(): amazing new module',
    hash: '56185b7356766d2b30cfa2406b257080272e0b7a',
    body: null
  },
  hash: '789d898b5f8422d7f65cc25135af2c1a95a125ac\n',
  raw: {
    type: 'revert',
    scope: null,
    subject: 'feat(): amazing new module',
    header: 'revert: feat(): amazing new module\n',
    body: 'This reverts commit 56185b7356766d2b30cfa2406b257080272e0b7a.\n',
    footer: null,
    notes: [],
    references: [],
    revert: {
      header: 'feat(): amazing new module',
      hash: '56185b7356766d2b30cfa2406b257080272e0b7a',
      body: null
    },
    hash: '789d898b5f8422d7f65cc25135af2c1a95a125ac\n'
  }
}, {
  type: 'Features',
  scope: null,
  subject: 'wow',
  header: 'amazing new module\n',
  body: null,
  footer: 'BREAKING CHANGE: Not backward compatible.\n',
  notes: [],
  references: [],
  revert: null,
  hash: '56185b',
  raw: {
    type: 'feat',
    scope: null,
    subject: 'amazing new module',
    header: 'feat(): amazing new module\n',
    body: null,
    footer: 'BREAKING CHANGE: Not backward compatible.\n',
    notes: [],
    references: [],
    revert: null,
    hash: '56185b7356766d2b30cfa2406b257080272e0b7a\n'
  }
}, {
  type: 'What',
  scope: null,
  subject: 'new feature',
  header: 'feat(): new feature\n',
  body: null,
  footer: null,
  notes: [],
  references: [],
  revert: null,
  hash: '815a3f0',
  raw: {
    type: 'feat',
    scope: null,
    subject: 'new feature',
    header: 'feat(): new feature\n',
    body: null,
    footer: null,
    notes: [],
    references: [],
    revert: null,
    hash: '815a3f0717bf1dfce007bd076420c609504edcf3\n'
  }
}, {
  type: 'Chores',
  scope: null,
  subject: 'first commit',
  header: 'chore: first commit\n',
  body: null,
  footer: null,
  notes: [],
  references: [],
  revert: null,
  hash: '74a3e4d6d25',
  raw: {
    type: 'chore',
    scope: null,
    subject: 'first commit',
    header: 'chore: first commit\n',
    body: null,
    footer: null,
    notes: [],
    references: [],
    revert: null,
    hash: '74a3e4d6d25dee2c0d6483a0a3887417728cbe0a\n'
  }
}];

commits = conventionalCommitsFilter(commits);
console.log(commits);
/*=>
[{
  type: 'What',
  scope: null,
  subject: 'new feature',
  header: 'feat(): new feature\n',
  body: null,
  footer: null,
  notes: [],
  references: [],
  revert: null,
  hash: '815a3f0',
  raw: {
    type: 'feat',
    scope: null,
    subject: 'new feature',
    header: 'feat(): new feature\n',
    body: null,
    footer: null,
    notes: [],
    references: [],
    revert: null,
    hash: '815a3f0717bf1dfce007bd076420c609504edcf3\n'
  }
}, {
  type: 'Chores',
  scope: null,
  subject: 'first commit',
  header: 'chore: first commit\n',
  body: null,
  footer: null,
  notes: [],
  references: [],
  revert: null,
  hash: '74a3e4d6d25',
  raw: {
    type: 'chore',
    scope: null,
    subject: 'first commit',
    header: 'chore: first commit\n',
    body: null,
    footer: null,
    notes: [],
    references: [],
    revert: null,
    hash: '74a3e4d6d25dee2c0d6483a0a3887417728cbe0a\n'
  }
}]
*/

License

MIT © Steve Mao

conventional-changelog-writerconventional-recommended-bumparchetype-libraryeasy-select-rnreact-native-bluetooth2killi8n-react-native-fast-imageairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfdeneme323112@ntt_app/react-native-custom-notificationreact-native-covid-sdk@jttechnic/interpreterreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutils@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-test@infinitebrahmanuniverse/nolb-conv@mestery/release-pleaseluminos-ui-core@everything-registry/sub-chunk-1377jawwy-sdkjawwy_gamification_releasemock-changelogreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkg@rabailriaz/hisaab-web-portalreact-native-jawwy_sampleeasyplayer-my@oiti/rn-liveness2d@semantic-release/commit-analyzer@semantic-release/release-notes-generatorweb-yii2@phpboyscout/scoped-release-notes-generator@phpboyscout/semantic-release-commit-analyzer@phong95/react-native-multiple-image-picker@positionex/position-sdk@praella/localisationist@seculum/vue-dev-clone@sephriot/react-native-persistable-urivision-camera-base64-resizedvision-camera-plugin-face-detectorvision-camera-plugin-scan-facesnpm_qwerty@npmcli/release-please@npm_fluentco/adflow-react-native-sdknpm_one_12_34_1_npm_one_1_2_3npm_one_2_2vue-dev-clone@opn-ooo/eslint-config-opnmiracle-webpack-tree-shakingvcloudcam-playkit-js-hls@pz-mxu/release-please@react-18-pdf/rootwinx-form-winxpayutesting@ramk-exp/commit-analyzer@status-im/react-native-transparent-video@spscommerce/slasherplaykit-js-hls-sondqdotex-plugin@saad27/react-native-bottom-tab-tourdogandev-simple-toast@safely-project/safely-tsdotenv-core@robbertc/release-notes-generator-filtered@superewaldo/release-notes-generator@sportheroes/bk-conventional-recommended-bumpwifi_configuration_package@react-native-ui-design/button@owngames/release-notes-generatorvue-v3-yandex-metrika@parallelnft/web3modalnative-google-loginnative-modal-damage-vehiclenative-kakao-login@teamcodafication/commit-analyzer@sidghimire/react-native-mapbox-navigation@pvm/plugin-conventional-changelogwhatbumppnm-yph-react-native-custom-componentsproject-wajs-dv@taingo97/react-native-expo-rsa@taingo97/react-native-generate-key-rsa@taingo97/react-native-key-rsa@taingo97/react-native-print-xprinter@taingo97/react-native-rsa@taingo97/react-native-rsa-expo@taingo97/react-native-sunmi-printer@taingo97/react-native-awesome-module@taingo97/react-native-bluetooth-xprinter@taingo97/react-native-expo-key-rsa-kt@taingo97/react-native-telpo-printer
4.0.0

8 months ago

3.0.0

11 months ago

2.0.7

3 years ago

2.0.6

4 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

8 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago