The version check (commons 0026-works-versioningFR-007, FR-009 to FR-014, FR-022, FR-037): for each work, whether its record decodes, whether its version matches the pattern of its kind's scheme, whether its identity is the one it had at the base, and, where files of the work changed since the base, whether its version grew by its scheme.
Pure: it is given the tracked paths and the records of two trees (the head and the base), the paths Git says changed between them, and, for the editions of prose, what Git said of the commits the editions name (their day and which is the ancestor of which). A work is told from another by its slug, so a work that moved to another folder is the same work; a work whose folder holds a record of another slug is a new work only where its record names the one it replaces (replaces), and a change of slug, IRI or position otherwise is versions/identity-changed. A version grows by the scheme of its kind: Semantic Version precedence (build ignored), an edition by its day and then the history, a snapshot by a later day and another digest (and a schema version that grew where the schema's files changed), a revision by a greater number.
import { judgeWorks } from"./judge.ts";
// judgeWorks({ head, base, changed: ["lib/src/a.ts"], editions }) -> [{ rule: "versions/not-grown", ... }] where lib/release.ts did not change
The version check over the works of the head against the base (FR-022): the findings of each record by itself, a change of identity (FR-007), and for each work whose files changed since the base a version that did not grow by its scheme (FR-010 to FR-014).
The findings a record has by itself, which a folder can judge offline (FR-032), and the record where it decoded: that it decodes, that its version matches the pattern of its kind's scheme, and that the revision of a controlled document has its approval (FR-013).
What is wrong with the versions a record carries, by the scheme of its kind (FR-006, FR-010): the version, the schema version of data, the first version of a migration.
typeEditionFacts= {
/** The commits the editions of the head and the base name, by the first eight characters of their object names. */readonlycommits:ReadonlyMap<string, { readonlycommit:string; readonlyday:string }>;
/** Pairs `<ancestor> <descendant>` of full object names. */readonlyancestry:ReadonlySet<string>;
/** The head commit. */readonlyhead:string;
};
What Git said of the commits that editions name: each by its first eight characters, and which commit is an ancestor of which.
The version check over the works of the head against the base (FR-022): the findings of each record by itself, a change of identity (FR-007), and for each work whose files changed since the base a version that did not grow by its scheme (FR-010 to FR-014).
The findings a record has by itself, which a folder can judge offline (FR-032), and the record where it decoded: that it decodes, that its version matches the pattern of its kind's scheme, and that the revision of a controlled document has its approval (FR-013).
What is wrong with the versions a record carries, by the scheme of its kind (FR-006, FR-010): the version, the schema version of data, the first version of a migration.
typeEditionFacts= {
/** The commits the editions of the head and the base name, by the first eight characters of their object names. */readonlycommits:ReadonlyMap<string, { readonlycommit:string; readonlyday:string }>;
/** Pairs `<ancestor> <descendant>` of full object names. */readonlyancestry:ReadonlySet<string>;
/** The head commit. */readonlyhead:string;
};
What Git said of the commits that editions name: each by its first eight characters, and which commit is an ancestor of which.