# @codeeshop/keep-a-changelog-whatsnew

> Keep-a-changelog-whatsnew plugin for release-it

Latest version **4.0.1** (published 2023-10-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @codeeshop/keep-a-changelog-whatsnew
pnpm add @codeeshop/keep-a-changelog-whatsnew
yarn add @codeeshop/keep-a-changelog-whatsnew
bun add @codeeshop/keep-a-changelog-whatsnew
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2023-10-12 |
| First published | 2023-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=16 |
| Dependencies | 2 |
| Unpacked size | 27.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lars Kappert |
| Maintainers | codeeshop |
| Keywords | release, release-it, release-it-plugin, keep-a-changelog-whatsnew, changelog, changes, unreleased |

## Links

- npm: https://www.npmjs.com/package/@codeeshop/keep-a-changelog-whatsnew
- Repository: https://github.com/codeeshop/keep-a-changelog-whatsnew
- Homepage: https://github.com/codeeshop/keep-a-changelog-whatsnew#readme
- Issues: https://github.com/codeeshop/keep-a-changelog-whatsnew/issues
- npm.io page: https://npm.io/package/@codeeshop/keep-a-changelog-whatsnew

## Dependencies (2)

- [detect-newline](https://npm.io/package/detect-newline.md) ^4.0.0
- [string-template](https://npm.io/package/string-template.md) ^1.0.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 4.0.1 (latest) — 2023-10-12
- 4.0.0 — 2023-10-12

## README

# Keep-a-changelog plugin for release-it

This [release-it plugin](https://github.com/release-it/release-it/blob/master/docs/plugins.md) maintains your
CHANGELOG.md file according to the [Keep A Changelog](https://keepachangelog.com/) standards.

The idea and initial implementation comes [from @eMarek](https://github.com/release-it/release-it/issues/662).

```
npm install --save-dev @codeeshop/keep-a-changelog-whatsnew

yarn add @codeeshop/keep-a-changelog-whatsnew
```

In [release-it](https://github.com/release-it/release-it) config:

```json
"plugins": {
  "@codeeshop/keep-a-changelog-whatsnew": {
    "filename": "CHANGELOG.md"
  }
}
```

## Options

| option            | default value    | description                                                                                                                                      |
| ----------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| whatsnew          | `'whatsnew/whatsnew-en-US'` | File with whatsnew.                                                                                                                            |
| filename          | `'CHANGELOG.md'` | File with changelogs.                                                                                                                            |
| strictLatest      | `true`           | Entry of latest version must be present in order to get correct changelog. Set this option to `false` if you expect latest version without logs. |
| addUnreleased     | `false`          | It leaves "Unreleased" title row if set to `true`.                                                                                               |
| keepUnreleased    | `false`          | It leaves "Unreleased" title row unchanged if set to `true`.                                                                                     |
| addVersionUrl     | `false`          | Links the version to the according changeset. Uses GitHub-compatible URLs by default, see other options to configure the URL format.             |
| versionUrlFormats | See below.       | Determines the version URL format when `addVersionUrl` is set to `true`. Uses GitHub-compatible URLs by default.                                 |
| head              | `'HEAD'`         | The git revision the new version tag is compared to in the Unreleased URL.                                                                       |

### versionUrlFormats

The URL formats used when `addVersionUrl` is set to `true`. Example configuration for a repository in Azure DevOps:

```json
"plugins": {
  "@release-it/keep-a-changelog": {
    "filename": "CHANGELOG.md",
    "head": "main",
    "addVersionUrl": true,
    "versionUrlFormats": {
      "repositoryUrl": "https://dev.azure.com/...",
      "unreleasedUrl": "{repositoryUrl}/branchCompare?baseVersion=GT{tagName}&targetVersion=GB{head}",
      "versionUrl": "{repositoryUrl}/branchCompare?baseVersion=GT{previousTag}&targetVersion=GT{tagName}",
      "firstVersionUrl": "{repositoryUrl}?version=GT{tagName}"
    }
  }
}
```

| option          | default value                                         | description                                                                                 |
| --------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| repositoryUrl   | `'https://{host}/{repository}'`                       | The format of the repository URL.                                                           |
| unreleasedUrl   | `'{repositoryUrl}/compare/{tagName}...{head}'`        | The format of the `[unreleased]` section URL.                                               |
| versionUrl      | `'{repositoryUrl}/compare/{previousTag}...{tagName}'` | The format of a release version URL.                                                        |
| firstVersionUrl | `'{repositoryUrl}/releases/tag/{tagName}'`            | The format of the first release version URL, i.e. when no previous tags have been released. |

---
_Source: https://npm.io/package/@codeeshop/keep-a-changelog-whatsnew · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
