versions.impactOffunctionno test imports itfunction impactOf(message: string): "major" | "minor" | "patch" | undefinedThe impact a message declares by Impact: lines: the greatest of them, or undefined where it states none.
The impact a commit declares and the release notes made of the capabilities closed since the last tag (commons 0026-works-versioning FR-021, FR-023): a line Impact: major, Impact: minor or Impact: patch in a commit's message, and deterministic Markdown that lists each Closes #N line of the commits that touch a work's files, grouped by impact and ordered by issue number, so that the change log and the trace chain of 0020-ifccm are one thing.
Pure. The Closes lines are read by parseMessage of 0020-ifccm, which reads no Impact: trailer (0020-ifccm is not changed), so the trailer is read here: a line of its own, case of the word free, a quoted line (>) not read, and the greatest wins where a message has several. The notes hold no date, no author and no clock: the same commits give the same text.
import { impactOf } from "./notes.ts";
impactOf("Add a thing\n\nCloses #4\nImpact: minor\n"); // "minor"versions.impactOffunctionno test imports itfunction impactOf(message: string): "major" | "minor" | "patch" | undefinedThe impact a message declares by Impact: lines: the greatest of them, or undefined where it states none.
versions.impactOfCommitsfunctionno test imports itfunction impactOfCommits(commits: readonly CommitFact[]): "major" | "minor" | "patch" | undefinedThe greatest impact the commits state (the commits given are those that touch the work), or undefined where none does (FR-021: --impact auto then exits with 2).
versions.notesOffunctionno test imports itfunction notesOf(input: NotesInput): stringThe release notes as Markdown (FR-023): the capabilities closed, once each commit, grouped by impact (major, minor, patch, not stated) and ordered by issue number, and how many commits closed none.
versions.CommitFacttypeno test imports ittype CommitFact = {
readonly sha: string;
readonly subject: string;
readonly message: string;
readonly files: readonly string[];
};A commit as the tools read it: its object name, its subject and whole message, and the paths it touched.
versions.NotesInputtypeno test imports ittype NotesInput = {
readonly slug: string;
readonly title: string;
/** The version the notes are for: the record's. */
readonly version: string | undefined;
/** The tag the notes start after, or undefined for the whole history. */
readonly from: string | undefined;
/** The commits since it that touch the work's files, in any order. */
readonly commits: readonly CommitFact[];
};What notes are made of.
impactOffunctionfunction impactOf(message: string): "major" | "minor" | "patch" | undefinedThe impact a message declares by Impact: lines: the greatest of them, or undefined where it states none.
impactOfCommitsfunctionfunction impactOfCommits(commits: readonly CommitFact[]): "major" | "minor" | "patch" | undefinedThe greatest impact the commits state (the commits given are those that touch the work), or undefined where none does (FR-021: --impact auto then exits with 2).
notesOffunctionfunction notesOf(input: NotesInput): stringThe release notes as Markdown (FR-023): the capabilities closed, once each commit, grouped by impact (major, minor, patch, not stated) and ordered by issue number, and how many commits closed none.
CommitFacttypeno test imports ittype CommitFact = {
readonly sha: string;
readonly subject: string;
readonly message: string;
readonly files: readonly string[];
};A commit as the tools read it: its object name, its subject and whole message, and the paths it touched.
NotesInputtypeno test imports ittype NotesInput = {
readonly slug: string;
readonly title: string;
/** The version the notes are for: the record's. */
readonly version: string | undefined;
/** The tag the notes start after, or undefined for the whole history. */
readonly from: string | undefined;
/** The commits since it that touch the work's files, in any order. */
readonly commits: readonly CommitFact[];
};What notes are made of.