Changelog
What changed for users of active-format, per version.
@workspace/active-format 1.0.0Developmentunreleased, in development in Foundationbaseline ce081dc3
The version line at the top of this page is read from the package and the release register of Foundation. A version heading in the changelog below is not a release by itself: only a recorded release is. While the status says development, the content can still change before it is released.
Notable changes to @workspace/active-format. Format based on
Keep a Changelog; versioning per
Semantic Versioning.
[Unreleased]#
Documentation#
- No links to documents of another repository. References to documents of the repository the package came from (Datyx) are text now, marked as such, instead of links that resolve nowhere (or to another document) in the repository that holds the package. The reuse section names the source repository's transfer standard instead of a Datyx path. No code changed.
CurrencyFormatOptions.decimalsreads on its own. Its TSDoc named an internal ticket in the middle of a sentence; the documentation site dropped that whole paragraph, and with it the default (the currency's minor units) and the rounding rule. The sentence now carries the rule without the ticket. No code changed.
[1.0.0] — 2026-10-20#
The first release. The entries below record how the content reached this version; "breaking" there is relative to earlier, unreleased development states.
Changed (platform ADR-115)#
- Byte-identical checkout. The package carries
.gitattributeswith* -text: Git converts no line end in it, so a checkout withcore.autocrlf=truekeeps the bytes its content hash names. digitsOf(an internal helper of the locale contract) is no longer exported from its module; it was never part of the package's public entry.
Documented (2026-10-19) — runtime requirements#
docs/API.md§ Runtime requirements and the README:formatCurrencywith aDecimalStringneeds the ES2023 exact-decimal string form ofIntl.NumberFormat.prototype.format(an older engine converts the string to aNumberitself and loses precision silently);formatElapsedDurationneedsIntl.DurationFormatand throws without it. Both on the server and in the browser; no polyfill is shipped. Checked on Node.js v26.7.0 and Chrome 155; first versions of other engines per MDN browser-compat-data, with a start-up check a host can run. No code change.
Phase 2 of the reuse completion (2026-10-19, D28 to D31)#
Added#
NumberSpec(NumberNotation,NumberSign): significant digits, scientific, engineering and compact notation and sign display forformatNumber;signonCurrencyFormatOptions.DecimalString,isDecimalString,toDecimalString;formatCurrencyformats aDecimalStringamount exactly.formatByteSizewithByteSizeOptions(system: 'decimal' | 'binary'required, IEC symbols for binary).formatUnit,MEASURE_UNITS,isMeasureUnit,MeasureUnit,SimpleMeasureUnit,UnitFormatOptions: a measured quantity, never converted.formatElapsedDurationand its option types: an elapsed duration with an explicit input unit (requiresIntl.DurationFormat).formatList,ListFormatOptions.formatNumberRange,formatDateOnlyRange.LocalDateTimeString,LocalTimeStringwith guards and constructors.- Time-of-day input:
classifyTimeInput,getTimeInputPattern,formatLocalTimeForInput,assertTimeInputConstraintsand their types.
Changed#
- Breaking: the date-only reader accepts only the whole form: a valid
YYYY-MM-DDprefix with an invalid rest ('2026-03-09Tgarbage') is unreadable, andformatMachineDatethrows for it. {decimals, maxDecimals}andPercentFormatprecision are validated (integers 0 to 100) with aRangeErrornaming the field.
Removed#
- Breaking:
formatBytes. MigrateformatBytes(bytes, decimals)toformatByteSize(bytes, presentation, {system: 'binary', maxDecimals: decimals})for the old 1024 scale; the label becomesKiB/MiBand the number follows the presentation. - Breaking:
formatDocumentDate,formatDocumentGenerationDate,formatDocumentAmountmoved to@workspace/pension-documents(D28); aNaNamount now renders''there instead of'NaN'. LocalDateTimeString,isLocalDateTimeStringandtoLocalDateTimeStringare no longer in@workspace/active-types; import them from here.
First content#
The first content of this package. The intended first release is 1.0.0; no release is recorded yet.
Added#
- The owner of formatting and parsing (D26). One entry, the root, with
every export that consumers previously imported from the
/formatterssubpath of a translation package: the presentation context and its types, the portable locale contract (UnsupportedLocaleError,isSupportedLocale,normalizeDigits), the calendar primitives (getDateFnsLocale,getCalendarPhrases), the date and number presets, human date, number, currency and percent formatting, recency, the date-only boundary, date and number input, machine formats and document formatting. Same names, same behaviour. LocaleCode, the open BCP 47 tag every formatter takes.RecencyOptions, the type of the third argument ofresolveRecency(previously reachable only as a parameter type).formatBytes: a byte count in binary units with a fixed notation, moved unchanged from a utility package.- The vocabulary the public types are built on (D27, platform ADR-114),
moved unchanged from
@workspace/active-types: the notation presets (DATE_NOTATION_PRESETS,DATE_SHAPE_PRESETS,TIME_NOTATION_PRESETS,NUMBER_NOTATION_PRESETS,CURRENCY_DISPLAY_PRESETS,PRESENTATION_NOTATION_DIMENSIONSand their types,PresentationNotation), the ISO date brands (CalendarDateString,InstantString,IsoDateString, their guards and constructors,instantStringFromDate) and the IANA zone brand (IanaTimeZone,UTC_TIME_ZONE,isIanaTimeZone,toIanaTimeZone,canonicalizeTimeZone,listIanaTimeZones). This package now depends on no workspace package.
Migration#
| Before | After |
|---|---|
import {…} from '@workspace/ | import {…} from '@workspace/ |
import type {Locale | import type {Locale |
import {format | import {format |
the notation presets, ISO date brands and IANA zone brand from @workspace/ (root or a subpath) | import {…} from '@workspace/ (D27) |
Declare @workspace/active-format as a dependency. Nothing else changes: no
symbol was renamed and no behaviour changed. A vi.mock that replaces
@workspace/active-format wholesale must keep the real module
(importOriginal), because the brands and presets now come from it.