パッケージの詳細

changelog-updater

nikolajevp14.8kMIT2.0.3

Update [Unreleased] in CHANGELOG.md to current package version.

readme

changelog-updater

npm package GitHub license Dependencies Build Status Coverage Status code style: prettier

Update [Unreleased] in CHANGELOG.md to current package version.

Expects the changelog to follow keepachangelog.com v1.0.0 guidelines.

Usage

  1. Install with npm:
$ npm i -D changelog-updater
  1. Add script version to package.json:
{
  "scripts": {
    "version": "changelog-updater && git add CHANGELOG.md"
  }
}

Options

--init

Creates a new changelog if it does not exist.

Set repository in package.json:

{
  "repository": {
    "url": "https://github.com/username/repository.git"
  }
}

Use in the root of your new project:

$ npx changelog-updater --init

--check

Fails if the changelog does not have any changes under [Unreleased], otherwise exits normally without updating the changelog.

Use as a pre-commit hook or in testing pipelines:

$ npx changelog-updater --check

Or, use as a preversion script:

{
  "scripts": {
    "preversion": "changelog-updater --check",
    "version": "changelog-updater && git add CHANGELOG.md"
  }
}

更新履歴

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

2.0.3 - 2022-10-26

Updated

  • upgrade dependencies to reduce security risk

Changed

  • replaced process.exit(0) with simple return, otherwise package can't be used as dependency (since it exists the whole process, while control should stay at callee)

2.0.2 - 2020-10-05

Changed

  • Changed --check error message to describe that headings under [Unreleased] should be at level 3 (###)

Fixed

  • Allow --init to identify SSH links and URLs with scheme containing + in repository.url

2.0.1 - 2020-09-24

Fixed

  • Allow --init to identify URL in repository.url with any scheme, any domain name (e.g. www. or without), and with suffix .git or without

2.0.0 - 2020-09-23

Added

  • Command-line option --init to create a new changelog if it does not exist.
  • Command-line option --check to check if changelog has any changes under [Unreleased].

Removed

  • [BREAKING CHANGE] Removed support for Node versions <= 8

1.1.0 - 2018-01-02

Added

  • Support for BitBucket

1.0.0 - 2017-12-12

Added

  • Unit tests
  • Eslint

0.1.0 - 2017-12-09

Added

  • Initial commit