ChronVer

import { ChronVer } from "jsr:@ende/chronver";

interface

interface ChronVer

A ChronVer object parsed into its constituent parts.

A ChronVer string has the format YYYY.MM.DD[.CHANGESET][-FEATURE|-break].

Example: Usage

import type { ChronVer } from "@ende/chronver/types";
import { format } from "@ende/chronver/format";
import { assertEquals } from "@ende/assert";

const version: ChronVer = {
  year: 2024,
  month: 4,
  day: 3,
  changeset: 1,
  isBreaking: false
};

assertEquals(format(version), "2024.04.03.1");

Properties

year

year: number

The year

month

month: number

The month, from 1 to 12

day

day: number

The day of the month, from 1 to 31

changeset

changeset: number

The changeset number, 0 if not specified

feature

feature?: string

The feature name, if specified

isBreaking

isBreaking: boolean

Whether this is a breaking change (-break)

Source