IF Commons GitHub

physical/sources/issues

Written to: 1 requirement: 0 proved, 0 partly, 0 failing, 1 with no test recorded. 0004-planning-sources FR-006

The source for the typed issues of a library (0037-planning FR-024): the folder issues/ as data 0044-issues FR-002 lays it out, one NNNNN-slug.ts for each issue, listed in order by mod.ts. A file is read without being run: its issue({ ... }) call is parsed as a literal (strings, numbers, booleans, arrays and objects), so that every field is kept as read in the observation (its severity as the source's own value, priority, size, goals, engines, citations, evidence, links, status and day raised) and the span of the status is known. The status is the one thing written back, as the one replaced value, keeping every other byte.

The status of an issue is a sum whose cases carry what they need: a fixed issue its proof, a duplicate its original, a refused one its reason. A change of status that needs what the event does not carry (a close: the proof, the original or the reason) cannot be written and goes to the outbox; the source writes the reopening (open), a start (in progress, by the actor of the event) and a deferral that names its reason and a day. The until of a deferral in these files is free text and the model's is a day: a deferral whose until is not a day is read as open with a finding that holds the text (commons planning 0004-planning-sources OQ-1).

import { parseIssueFile } from "./issues.ts";
// parseIssueFile(text) is a Result of the record and the span of its status

Source: commons/planning/src/physical/sources/issues.ts

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

physical.IssueRecordtypeno test imports it
type IssueRecord = { readonly record: { readonly [key: string]: Raw }; readonly spans: ReadonlyMap<string, { readonly start: number; readonly end: number }> };

The record of an issue file and the span of each of its fields.

physical.parseIssueFilefunctionno test imports it
function parseIssueFile(text: string): Result<IssueRecord, string>

The issue({ ... }) literal of a file, or why it is not one.

physical.listedByfunctionno test imports it
function listedBy(barrel: string): readonly string[]

The names a barrel mod.ts lists: the files its imports name.

physical.stateOfStatusfunctionno test imports it
function stateOfStatus(status: Raw | undefined): { readonly state: ObservedState; readonly finding?: string | undefined; readonly assignee?: string | undefined; }

The state an issue's status says, and a finding where it cannot be said as a state.

physical.IssuesConfigtypeno test imports it
type IssuesConfig = { readonly scope: string };

What a configuration of the issues source says.

physical.issuesLensfunctionno test imports it
function issuesLens(config: IssuesConfig): FileLens

The lens for the folder of the typed issues of the library scope.

IssueRecordtypeno test imports it
type IssueRecord = { readonly record: { readonly [key: string]: Raw }; readonly spans: ReadonlyMap<string, { readonly start: number; readonly end: number }> };

The record of an issue file and the span of each of its fields.

parseIssueFilefunctionno test imports it
function parseIssueFile(text: string): Result<IssueRecord, string>

The issue({ ... }) literal of a file, or why it is not one.

listedByfunctionno test imports it
function listedBy(barrel: string): readonly string[]

The names a barrel mod.ts lists: the files its imports name.

stateOfStatusfunctionno test imports it
function stateOfStatus(status: Raw | undefined): { readonly state: ObservedState; readonly finding?: string | undefined; readonly assignee?: string | undefined; }

The state an issue's status says, and a finding where it cannot be said as a state.

IssuesConfigtypeno test imports it
type IssuesConfig = { readonly scope: string };

What a configuration of the issues source says.

issuesLensfunctionno test imports it
function issuesLens(config: IssuesConfig): FileLens

The lens for the folder of the typed issues of the library scope.

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