@evancnavarro/changelog-core
v0.1.1
Published
Framework-free changelog logic: unified entry schema, configurable tone/shape validator, filter/group, and pluggable search (substring default; fuzzy plugs in behind the same seam).
Readme
@evancnavarro/changelog-core
Framework-free changelog logic: one entry schema, plus filter / group / search /
validate / unread-tracking that any UI can drive. No React, no DOM — the
@evancnavarro/changelog-react
view is one consumer of this core.
Install
npm install @evancnavarro/changelog-coreThe entry shape
import type { ChangelogEntry } from "@evancnavarro/changelog-core";
const entry: ChangelogEntry = {
id: "2026-07-14-004", // deep-link key, anchor-safe [A-Za-z0-9_-]
date: "2026-07-14", // ISO YYYY-MM-DD
app: "all", // feature-space slug, or "all"
type: "feat", // feat | fix | perf | refactor | docs | chore
title: "Benefit-first, user-facing title",
body: "One or two sentences: the user outcome and its boundary.",
};Usage
import {
groupByDate,
searchEntries,
validateEntries,
computeUnread,
InMemorySeenStore,
} from "@evancnavarro/changelog-core";
groupByDate(entries); // [{ date, entries }, …] newest-first
searchEntries(entries, "deep link"); // substring match (pluggable matcher)
computeUnread(entries, lastSeenId); // entries newer than lastSeenId
// Author-time quality gate (tone/shape):
const { ok, problems } = validateEntries(entries);Search is pluggable: pass your own ChangelogSearch as the third arg to
searchEntries (e.g. swap the default substring matcher for fuzzy) — the seam
stays the same.
Exports
ENTRY_TYPES, DEFAULT_JARGON_DENYLIST, filterByApp, groupByDate,
searchEntries, substringMatcher, substringSearch, tokenize,
entryHaystack, findMatchRanges, validateEntries, newestMarker,
computeUnread, InMemorySeenStore, and the ChangelogEntry / ChangelogApp /
ChangelogSearch / SeenStore / ValidationResult types.
License
MIT © Evan C. Navarro
