IF Commons GitHub

versions/plugin

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; // 1

Source: commons/mizan/src/versions/plugin.ts

1 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

versions.versionsPluginfunctionno test imports it
function versionsPlugin(works: readonly WorkFile[], anchor: string | undefined): RulePlugin

The plugin that judges the records under a root, reporting them for the specification named anchor only.

versions.WorkFiletypeno test imports it
type 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 it
type WorkFile = { readonly path: string; readonly text: string };

A record found under the root: its path from the root, with /, and its text.

versionsPluginfunction
function versionsPlugin(works: readonly WorkFile[], anchor: string | undefined): RulePlugin

The plugin that judges the records under a root, reporting them for the specification named anchor only.

Imported by 19 tests of the run (19 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.