versions.versionsPluginfunctionno test imports itfunction versionsPlugin(works: readonly WorkFile[], anchor: string | undefined): RulePluginThe plugin that judges the records under a root, reporting them for the specification named anchor only.
The versions tool as a rule plugin of Mizan (commons 0026-works-versioning FR-032), for what a folder can judge offline: that every release.ts under the root decodes, that each version matches the pattern of its kind's scheme, that a specification has none and that the revision of a controlled document has its approval. The comparison with a base is the command's (../versions.ts).
A plugin runs once for each specification and the records belong to the harness, so the plugin reports them only for the specification it is anchored to (the first of the folder), as the changes plugin does, and holdHarness anchors it. A controlled document with no approval is in the gate phase: it fails whatever the baseline holds (FR-013); the other findings are held by the baseline like any of Mizan's.
import { versionsPlugin } from "./plugin.ts";
versionsPlugin([{ path: "lib/release.ts", text: "export const release = 1;" }], "0001-x").check({ slug: "0001-x", spec: "" }).length; // 1versions.versionsPluginfunctionno test imports itfunction versionsPlugin(works: readonly WorkFile[], anchor: string | undefined): RulePluginThe plugin that judges the records under a root, reporting them for the specification named anchor only.
versions.WorkFiletypeno test imports ittype WorkFile = { readonly path: string; readonly text: string };A record found under the root: its path from the root, with /, and its text.
WorkFiletypeno test imports ittype WorkFile = { readonly path: string; readonly text: string };A record found under the root: its path from the root, with /, and its text.
versionsPluginfunctionfunction versionsPlugin(works: readonly WorkFile[], anchor: string | undefined): RulePluginThe plugin that judges the records under a root, reporting them for the specification named anchor only.