export interface ChangelogEntry { /** Last path segment of the entry permalink, e.g. 2026-08-24-automatic-label-printing */ slug: string title: string date: string type: string /** Release the change shipped in, empty for changes made without a release */ version: string /** Whether this site already has the change */ installed: boolean contentHtml: string } export interface ChangelogResponse { /** False when the feed could not be read, so the page can say so */ feedOk: boolean /** Plugin version installed on this site */ currentVersion: string entries: Array } export const CHANGELOG_TYPES = [ 'new', 'improvement', 'fix', 'deprecated', 'removed', ] as const export const formatChangelogDate = (date: string): string => { if (!date) { return '' } // Feed dates are midnight UTC, so formatting in the browser's zone would // show the previous day for anyone west of UTC return new Date(date).toLocaleDateString(undefined, { timeZone: 'UTC', day: 'numeric', month: 'short', year: 'numeric', }) }