IF Commons GitHub

merge/limits

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0007-anyfs-merge-governance FR-006

What a merge refuses to hold, as limits and not hopes: how long a path, how large a blob, how many rows and how much text in a delta. Also the order of two texts by their code units, which is the order of ids, sums and paths everywhere in a merge, whatever the language of the machine.

import { DEFAULT_LIMITS, compareText } from "./limits.ts";
compareText("a", "b"); // -1

Source: commons/anyfs/src/merge/limits.ts

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

Limitstypeno test imports it
type Limits = { readonly maxPathChars: number; readonly maxBlobBytes: number; readonly maxVersions: number; readonly maxDeltaChars: number };

What a replica refuses: the characters of a path, the bytes of a blob, the rows of a delta and the characters of a delta.

DEFAULT_LIMITSconst
const DEFAULT_LIMITS: Limits

The limits a replica has until it is told otherwise: a path of a kibibyte, a blob of sixty-four mebibytes, a hundred thousand rows in a delta and a delta of 256 mebibytes of text.

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

compareTextfunctionno test imports it
function compareText(a: string, b: string): number

The order of two texts by their code units.

toBase64function
function toBase64(bytes: Uint8Array<ArrayBufferLike>): string

Bytes as base64.

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

fromBase64functionno test imports it
function fromBase64(text: string): Uint8Array<ArrayBufferLike> | undefined

Bytes from base64, or nothing where the text is not base64.

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