Versions and releases
Ashlar follows semantic versioning. A version is major.minor.patch:
- a patch release fixes something and changes no shape or meaning;
- a minor release adds something: a command, a flag, a config key, an optional field in an output;
- a major release may break what worked: it says so in its changelog section.
What counts as breaking
Section titled “What counts as breaking”Tools such as Rehearse read Ashlar only through what it prints and how it exits. So these are Ashlar's public API, and changing any of them in a way that could break a reader is a major release:
| Public | Breaking |
|---|---|
| The commands and their flags (CLI) | a command or flag removed or renamed, or doing something else |
| The exit codes: 0, 1 and 2 | a code that means something else |
| The JSON outputs (JSON outputs) | a field removed, renamed, or of another type or meaning |
| The config (Config) | a key removed or renamed, or meaning something else |
The package's exports: @kurvball/ashlar, @kurvball/ashlar/reach, @kurvball/ashlar/drive, @kurvball/ashlar/map |
a name removed, or of another type |
| The rules | a new rule on by default, since it can fail a check that passed the day before |
A new optional field in a JSON output is not breaking: readers ignore what they don't know.
A JSON shape never changes inside its version
Section titled “A JSON shape never changes inside its version”Each output has a schema, schema/<name>.v1.json, and prints its version (or v). A shape that has to
change gets a new file, schema/<name>.v2.json, a raised version, and a major release. The v1 schema is never
edited to describe another shape, so a tool that validates against v1 never sees v1 change under it.
Pin a release
Section titled “Pin a release”Each release is a tag, vX.Y.Z, and a GitHub Release with the package's tarball attached,
kurvball-ashlar-X.Y.Z.tgz. Ashlar is not on npm yet, so pin a release by its tarball:
pnpm add -D ./vendor/kurvball-ashlar-1.1.0.tgzDownload the tarball from the release's page into your repository (here vendor/), or build it from the tag:
git clone --branch v1.1.0 https://github.com/kurvball/ashlar.gitcd ashlarpnpm installpnpm packYour package.json then names that exact file, so every install gets that exact version until you change it.
Once Ashlar is on npm, pin it as any package: pnpm add -D @kurvball/ashlar@1.1.0 for one version, @kurvball/ashlar@^1 for
the 1.x line. A fix to an older line is published under that line's dist-tag, such as @kurvball/ashlar@release-1.x, never
latest.
Where to read what changed
Section titled “Where to read what changed”Every version's section is in the changelog, and in the notes of its GitHub Release.