Changelog fragments

Each pull request that needs a changelog entry adds a file to this folder. After the merge, a workflow moves the entries of the file into [Unreleased] in CHANGELOG.md, and deletes the file. Thus pull requests do not conflict with each other in CHANGELOG.md.

Add an entry

Add a Markdown file with a unique name, for example .changelog/vite-full-reload.md:

### Fixed

- Prevent `@tailwindcss/vite` from doing a full page reload for external files (e.g. `.php` files)

Commands

# Print `CHANGELOG.md`, with the entries of the fragments in `[Unreleased]`
pnpm --silent changelog

# Move the entries into `[Unreleased]` in `CHANGELOG.md`, and delete the fragments
pnpm changelog compile

# Check the fragments
pnpm changelog check

# Move the entries into a new `## [<version>] - <date>` section, and delete the fragments
pnpm changelog release <version> [<date>]

The entries of the fragments go after the entries that are already in [Unreleased], in the order in which their pull requests merged.

After each merge into main that adds a fragment, .github/workflows/changelog.yml runs compile and pushes the result to main. It uses the CHANGELOG_TOKEN secret, a personal access token of an admin, because only admins can push to main without a pull request.