# changelord

> cli-based changelog manager

Latest version **0.2.0** (published 2023-05-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install changelord
pnpm add changelord
yarn add changelord
bun add changelord
```

Provides the command `changelord`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-05-18 |
| First published | 2023-05-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 14 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| Author | Yanick Champoux |
| Maintainers | yanick |
| Keywords | changelog |

## Links

- npm: https://www.npmjs.com/package/changelord
- Repository: https://git.babyl.ca/yanick/changelord.js
- Issues: https://git.babyl.ca/yanick/changelord.js/issues
- npm.io page: https://npm.io/package/changelord

## Dependencies (14)

- [ajv](https://npm.io/package/ajv.md) ^8.12.0
- [yaml](https://npm.io/package/yaml.md) ^2.2.2
- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [globby](https://npm.io/package/globby.md) ^13.1.4
- [nanoid](https://npm.io/package/nanoid.md) ^4.0.2
- [remeda](https://npm.io/package/remeda.md) ^1.14.0
- [semver](https://npm.io/package/semver.md) ^7.5.0
- [consola](https://npm.io/package/consola.md) ^3.1.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.1
- [filenamify](https://npm.io/package/filenamify.md) ^6.0.0
- [simple-git](https://npm.io/package/simple-git.md) ^3.18.0
- [markdown-utils](https://npm.io/package/markdown-utils.md) ^1.0.0
- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) ^2.2.1
- [@yanick/updeep-remeda](https://npm.io/package/@yanick/updeep-remeda.md) ^2.2.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

- 0.2.0 (latest) — 2023-05-18
- 0.1.0 — 2023-05-16

## README

# Changelord, registrar of deeds extraordinaire

Changelord is a changelog manager scratching my particular itches.
It's cli-based, and keep its data in a YAML file adhering
to a well-defined schema.

The first iteration of `changelord` was written [in Perl][original]. You can
read its [introductory article][blog] on my blog.

## Installation

    pnpm install changelord

## `changelog-next` directory

If you want to mininize merge conflicts in `CHANGELOG.yml`,
you can set the option `project.next_directory` to a directory (typically
`./changelog-next`) that will hold yaml files containing the
changes for the NEXT release. Each of those files is expected to
have a list of changes.

## CLI commands

### Global options

#### `--help`

Outputs the list of commands and options.

#### `--version`

Outputs the `changelord` version.

#### `--source`

Specifies which source yaml file to use. Defaults to the `CHANGELOG.yml` file
in the current directory.

### `changelord init`

Initializes the changelog source file. The YAML file is made of three
sections.

- `project` -- contains information and configuration about the project itself.
- `releases` -- the entries for the changelog proper.
- `change_types` -- defines all types of changes this project supports.

### `changelord add`

Adds an entry to the `NEXT` release.

If `project.next_directory` is defined, the entry will be added to that
directory instead of directly into `CHANGELOG.yml`.

    $ changelord add --type=maint added a changelog to the project.

#### Options

- `--type` -- type of change.
- `--ticket` -- associated ticket.

### `changelord print`

Renders the changelog as markdown.

#### Options

- `--no-next` -- don't show the `NEXT` section.

### `changelord cut`

Cuts the next release. That is, resolves the `NEXT` version number based on the
latest version and the changes in the `NEXT` section, and sets its date as
today. Modifies the source file with the result.

If the `project.next_directory` option is present,
all the changes in that directory are
merged to `CHANGELOG.yml` and the files themselves are deleted.

#### Options

- `--dry` -- Resolves the next version but only outputs the resulting section
  without changing the source file.

### `changelord schema`

Outputs the JSON schema defining the structure of the source file.

### `changelord upcoming`

Outputs the changes listed in the `NEXT` release.

### `changelord latest-version`

Outputs the latest non-NEXT release.

    $ changelord latest-version
    3.2.0

### `changelord validate`

Validates the changelog source against its json schema.

### `changelord git-gather`

Gathers change entries from git commits. If any are found, they are
added to the changelog.

#### Lower bound of the git log

`git-gather` inspects the git log from the most recent of those
three points:

- The last change in the NEXT release having a `commit` property.
- The last tagged version.
- The beginning of time.

#### Change-like git message

Git messages are compared to the regular expression
configured at `project.commit_regex`. If none is found, it
defaults to

    ^(?<type>[^: ]+):\s*(?<desc>.*?)(\[(?<ticket>[^\]]+)\])?$

The regular expression must capture a `desc` field, and may
capture a `type` and `ticket` as well.

[blog]: https://techblog.babyl.ca/entry/changelord/
[original]: https://metacpan.org/dist/App-Changelord/view/bin/changelord

---
_Source: https://npm.io/package/changelord · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
