Socket
Socket
Sign inDemoInstall

@semantic-release/changelog

Package Overview
Dependencies
Maintainers
5
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-release/changelog - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

4

lib/resolve-config.js

@@ -1,6 +0,6 @@

const {isUndefined} = require('lodash');
const {isNil} = require('lodash');
module.exports = ({changelogFile, changelogTitle}) => ({
changelogFile: isUndefined(changelogFile) ? 'CHANGELOG.md' : changelogFile,
changelogFile: isNil(changelogFile) ? 'CHANGELOG.md' : changelogFile,
changelogTitle,
});

@@ -1,2 +0,2 @@

const {isString, isUndefined} = require('lodash');
const {isString, isNil} = require('lodash');
const AggregateError = require('aggregate-error');

@@ -18,3 +18,3 @@ const getError = require('./get-error');

(errors, [option, value]) =>
!isUndefined(value) && value !== false && !VALIDATORS[option](value)
!isNil(value) && !VALIDATORS[option](value)
? [...errors, getError(`EINVALID${option.toUpperCase()}`, {[option]: value})]

@@ -21,0 +21,0 @@ : errors,

{
"name": "@semantic-release/changelog",
"description": "Set of semantic-release plugins for creating or updating a changelog file",
"version": "3.0.0",
"description": "semantic-release plugin to create or update a changelog file",
"version": "3.0.1",
"author": "Pierre Vanduynslager (https://github.com/pvdlg)",

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

"codecov": "^3.0.0",
"commitizen": "^2.9.6",
"commitizen": "^3.0.0",
"cz-conventional-changelog": "^2.0.0",

@@ -35,3 +35,3 @@ "nyc": "^12.0.1",

"tempy": "^0.2.1",
"xo": "^0.21.0"
"xo": "^0.23.0"
},

@@ -38,0 +38,0 @@ "engines": {

# @semantic-release/changelog
Set of [semantic-release](https://github.com/semantic-release/semantic-release) plugins for creating or updating a changelog file.
[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to create or update a changelog file.

@@ -12,52 +12,55 @@ [![Travis](https://img.shields.io/travis/semantic-release/changelog.svg)](https://travis-ci.org/semantic-release/changelog)

## verifyConditions
| Step | Description |
|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `verifyConditions` | Verify the `changelogFile` and `changelogTitle` options configuration. |
| `prepare` | Create or update a changelog file in the local project directory with the changelog content created in the [generate notes step](https://github.com/semantic-release/semantic-release#release-steps). |
Verify the `changelogFile` option configuration.
## Install
## prepare
```bash
$ npm install @semantic-release/changelog -D
```
Create or update the changelog file in the local project repository.
## Usage
## Configuration
The plugin can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#configuration):
### Options
| Options | Description | Default |
|------------------|-----------------------------|----------------|
| `changelogFile` | File path of the changelog. | `CHANGELOG.md` |
| `changelogTitle` | Title in the changelog. | None |
**Note**: If you use a [shareable configuration](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/shareable-configurations.md#shareable-configurations) that defines one of these options you can set it to `false` in your [**semantic-release** configuration](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#configuration) in order to use the default value.
### Usage
Options can be set within the plugin definition in the `semantic-release` configuration file:
```json
{
"release": {
"prepare": [
{
"path": "@semantic-release/changelog",
"changelogFile": "docs/changelog.md",
},
"@semantic-release/git"
]
}
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "docs/CHANGELOG.md",
}],
"@semantic-release/git",
]
}
```
**It's recommended to use this plugin with the [git](https://github.com/semantic-release/git) plugin, so the changelog file will be committed to the Git repository and available on subsequent builds in order to be updated.**
With this example, for each release, a `docs/CHANGELOG.md` will be created or updated.
**When using with the [npm](https://github.com/semantic-release/npm) plugin and/or the [git](https://github.com/semantic-release/git) plugin the `changelog` plugin must be called first in order to create or update the changelog file, so it can be included in the npm package and committed to the Git repository.**
## Configuration
To use with the [npm](https://github.com/semantic-release/npm) and [git](https://github.com/semantic-release/git) plugins:
### Options
| Options | Description | Default |
|------------------|-------------------------------------------------------|----------------|
| `changelogFile` | File path of the changelog. | `CHANGELOG.md` |
| `changelogTitle` | Title of the changelog file (first line of the file). | - |
### Examples
When used with the [@semantic-release/git](https://github.com/semantic-release/git) or [@semantic-release/npm](https://github.com/semantic-release/npm) plugins the `@semantic-release/changelog` plugin must be called first in order to update the changelog file so the [@semantic-release/git](https://github.com/semantic-release/git) and [@semantic-release/npm](https://github.com/semantic-release/npm) plugins can include it in the release.
```json
{
"release": {
"verifyConditions": ["@semantic-release/changelog", "@semantic-release/npm", "@semantic-release/git"],
"prepare": ["@semantic-release/changelog", "@semantic-release/npm", "@semantic-release/git"]
}
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git"
],
}
```
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