Socket
Socket
Sign inDemoInstall

@semantic-release/commit-analyzer

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-release/commit-analyzer - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

11

package.json
{
"name": "@semantic-release/commit-analyzer",
"description": "Customizable commit-analyzer plugin for semantic-release",
"version": "5.0.1",
"version": "5.0.2",
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",

@@ -26,3 +26,3 @@ "bugs": {

"devDependencies": {
"ava": "^0.24.0",
"ava": "^0.25.0",
"codecov": "^3.0.0",

@@ -32,3 +32,3 @@ "commitizen": "^2.9.6",

"conventional-changelog-ember": "^0.3.0",
"conventional-changelog-eslint": "^0.3.0",
"conventional-changelog-eslint": "^1.0.0",
"conventional-changelog-express": "^0.3.0",

@@ -47,3 +47,3 @@ "conventional-changelog-jshint": "^0.3.0",

"engines": {
"node": ">=4"
"node": ">=8.3"
},

@@ -86,3 +86,4 @@ "files": [

"publishConfig": {
"access": "public"
"access": "public",
"tag": "next"
},

@@ -89,0 +90,0 @@ "repository": {

@@ -9,5 +9,8 @@ # **commit-analyzer**

[![npm latest version](https://img.shields.io/npm/v/@semantic-release/commit-analyzer/latest.svg)](https://www.npmjs.com/package/@semantic-release/commit-analyzer)
[![npm next version](https://img.shields.io/npm/v/@semantic-release/commit-analyzer/next.svg)](https://www.npmjs.com/package/@semantic-release/commit-analyzer)
## Options
By default `commit-analyzer` uses the `angular` format described in [Angular convention](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/convention.md) and the [default rules](lib/default-release-rules.js) for release.
By default `commit-analyzer` uses the `angular` format described in [Angular convention](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular) and the [default rules](lib/default-release-rules.js) for release.

@@ -34,8 +37,8 @@ Additional options can be set within the plugin definition in `package.json` to use a different commit format and to customize it:

| Option | Description | Default |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| `preset` | [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset (possible values: `angular`, `atom`, `codemirror`, `ember`, `eslint`, `express`, `jquery`, `jscs`, `jshint`). | `angular` |
| `config` | NPM package name of a custom [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset. | - |
| `releaseRules` | An external module, a path to a module or an `Array` of rules. See [Release rules](#release-rules). | See [Release rules](#release-rules) |
| `parserOpts` | Additional [conventional-commits-parser](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser#conventionalcommitsparseroptions) options that will extends ones loaded by `preset` or `config`. See [Parser options](#parser-options). | - |
| Option | Description | Default |
|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| `preset` | [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset (possible values: `angular`, `atom`, `codemirror`, `ember`, `eslint`, `express`, `jquery`, `jscs`, `jshint`). | `angular` |
| `config` | NPM package name of a custom [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) preset. | - |
| `releaseRules` | An external module, a path to a module or an `Array` of rules. See [Release rules](#release-rules). | See [Release rules](#release-rules) |
| `parserOpts` | Additional [conventional-commits-parser](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser#conventionalcommitsparseroptions) options that will extends ones loaded by `preset` or `config`. See [Parser options](#parser-options). | - |

@@ -46,2 +49,4 @@ **NOTE:** `config` will be overwritten by the values of `preset`. You should use either `preset` or `config`, but not both. Individual properties of `parserOpts` will overwrite ones loaded with `preset` or `config`.

Release rules are used when deciding if the commits since the last release warrant a new release. If you define custom release rules the default rules will be used if nothing matched. Those rules will be matched against the commit objects resulting of [conventional-commits-parser](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser) parsing.
Release rules are used when deciding if the commits since the last release warrant a new release. If you define custom release rules the [default rules](lib/default-release-rules.js) will be used if nothing matched.

@@ -72,5 +77,5 @@

With the previous example:
* Commits with `type` 'docs' and `scope` 'README' will be associated with a `patch` release.
* Commits with `type` 'refactor' and `scope` starting with 'core-' (i.e. 'core-ui', 'core-rules', ...) will be associated with a `minor` release.
* Other commits with `type` 'refactor' (without `scope` or with a `scope` not matching the regexp `/core-.*/`) will be associated with a `patch` release.
- Commits with `type` 'docs' and `scope` 'README' will be associated with a `patch` release.
- Commits with `type` 'refactor' and `scope` starting with 'core-' (i.e. 'core-ui', 'core-rules', ...) will be associated with a `minor` release.
- Other commits with `type` 'refactor' (without `scope` or with a `scope` not matching the regexp `/core-.*/`) will be associated with a `patch` release.

@@ -82,6 +87,6 @@ #### Default rules matching

With the previous example:
* Commits with a breaking change will be associated with a `minor` release.
* Commits with `type` 'feat' will be associated with a `minor` release.
* Commits with `type` 'fix' will be associated with a `patch` release.
* Commits with `type` 'perf' will be associated with a `patch` release.
- Commits with a breaking change will be associated with a `minor` release.
- Commits with `type` 'feat' will be associated with a `minor` release.
- Commits with `type` 'fix' will be associated with a `patch` release.
- Commits with `type` 'perf' will be associated with a `patch` release.

@@ -93,5 +98,5 @@ #### No rules matching

With the previous example:
* Commits with `type` 'style' will not be associated with a release type.
* Commits with `type` 'test' will not be associated with a release type.
* Commits with `type` 'chore' will not be associated with a release type.
- Commits with `type` 'style' will not be associated with a release type.
- Commits with `type` 'test' will not be associated with a release type.
- Commits with `type` 'chore' will not be associated with a release type.

@@ -103,4 +108,4 @@ #### Multiple commits

Considering the following commits:
* `docs(README): Add more details to the API docs`
* `feat(API): Add a new method to the public API`
- `docs(README): Add more details to the API docs`
- `feat(API): Add a new method to the public API`

@@ -128,9 +133,9 @@ With the previous example the release type determine by the plugin will be `minor`.

With this configuration:
* Commits with `tag` 'Docs', that contains 'README' in their header message will be associated with a `patch` release.
* Commits with `tag` 'New' will be associated with a `patch` release.
* Commits with `tag` 'Breaking' will be associated with a `major` release (per [default release rules](lib/default-release-rules.js)).
* Commits with `tag` 'Fix' will be associated with a `patch` release (per [default release rules](lib/default-release-rules.js)).
* Commits with `tag` 'Update' will be associated with a `minor` release (per [default release rules](lib/default-release-rules.js)).
* Commits with `tag` 'New' will be associated with a `minor` release (per [default release rules](lib/default-release-rules.js)).
* All other commits will not be associated with a release type.
- Commits with `tag` 'Docs', that contains 'README' in their header message will be associated with a `patch` release.
- Commits with `tag` 'New' will be associated with a `patch` release.
- Commits with `tag` 'Breaking' will be associated with a `major` release (per [default release rules](lib/default-release-rules.js)).
- Commits with `tag` 'Fix' will be associated with a `patch` release (per [default release rules](lib/default-release-rules.js)).
- Commits with `tag` 'Update' will be associated with a `minor` release (per [default release rules](lib/default-release-rules.js)).
- Commits with `tag` 'New' will be associated with a `minor` release (per [default release rules](lib/default-release-rules.js)).
- All other commits will not be associated with a release type.

@@ -163,3 +168,4 @@ #### External package / file

The following example uses [Angular convention](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/convention.md) but will consider a commit to be a breaking change if it's body contains `BREAKING CHANGE`, `BREAKING CHANGES` or `BREAKING`. By default the [preset](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/index.js#L14) checks only for `BREAKING CHANGE` and `BREAKING CHANGES`.
The following example uses [Angular convention](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/convention.md) but will consider a commit to be a breaking change if [conventional-commits-parser](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser) detects a valid `BREAKING CHANGE`, `BREAKING CHANGES` or `BREAKING` section in the commit body. By default the [preset](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/index.js#L14) checks only for `BREAKING CHANGE` and `BREAKING CHANGES`.
```json

@@ -177,1 +183,5 @@ {

```
## Usage
The plugin is used by default by [semantic-release](https://github.com/semantic-release/semantic-release) so installing it is not necessary and all configuration are optionals.
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