# Risk map — date-fns/date-fns

> Canonical page: https://codevetter.com/unpack/date-fns/risk-map

# Risk map — date-fns/date-fns

Scanned commit 717ce0a807ea4c6b540d015b5c408723175b2838 (2026-09-22). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The strongest source observations concern documentation side effects, snapshot mode selection, date-state synchronization, and build-output paths. These observations are not confirmed security vulnerabilities, and no exploit or runtime failure was reproduced. Library correctness depends on preserving constructor context and handling native Date and Intl edge cases. Potential operational consequences are explicitly labeled as hypotheses where execution would be needed.
- Source-observed snapshot mismatch: test/locales passes --test, but the script compares only when process.argv[2] equals 'test'; the supplied --test therefore selects the writeFile branch. — [pkgs/core/mise.toml#L111-L113](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/mise.toml#L111-L113) [pkgs/core/scripts/build/localeSnapshots/index.ts#L22-L25](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/scripts/build/localeSnapshots/index.ts#L22-L25) [pkgs/core/scripts/build/localeSnapshots/index.ts#L60-L68](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/scripts/build/localeSnapshots/index.ts#L60-L68)
- The docs CLI dynamically imports a process-argument path and initializes Firebase Admin before dispatch; package, TypeDoc, and Markdown paths are resolved from config without a repository-root containment check in these inspected paths. — [pkgs/docs/src/bin.ts#L21-L30](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/docs/src/bin.ts#L21-L30) [pkgs/docs/src/bin.ts#L135-L137](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/docs/src/bin.ts#L135-L137) [pkgs/docs/src/bin.ts#L200-L204](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/docs/src/bin.ts#L200-L204) [pkgs/docs/src/json.ts#L18-L24](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/docs/src/json.ts#L18-L24)
- Hypothesis: documentation publication or rollback can leave partial remote state after an individual failure because package, version, and page operations run concurrently without one encompassing transaction. (inferred) — [pkgs/docs/src/bin.ts#L34-L61](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/docs/src/bin.ts#L34-L61) [pkgs/docs/src/bin.ts#L73-L120](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/docs/src/bin.ts#L73-L120) [pkgs/docs/src/bin.ts#L127-L129](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/docs/src/bin.ts#L127-L129)
- TZDateMini is a correctness hotspot: separate instant/wall-clock objects require synchronization, historical second corrections, DST-gap detection, and a final small-drift correction bounded below 30 minutes. — [pkgs/tz/src/date/mini.js#L3-L26](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/date/mini.js#L3-L26) [pkgs/tz/src/date/mini.js#L363-L385](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/date/mini.js#L363-L385) [pkgs/tz/src/date/mini.js#L425-L440](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/date/mini.js#L425-L440) [pkgs/tz/src/date/mini.js#L491-L504](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/date/mini.js#L491-L504)
- tzOffset caches formatter functions by zone and offsets by strings, catches Intl failures, and falls back to an unanchored numeric-offset regex; cache bounds and stricter fallback input validation are not present in this inspected implementation. — [pkgs/tz/src/tzOffset/index.ts#L1-L3](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/tzOffset/index.ts#L1-L3) [pkgs/tz/src/tzOffset/index.ts#L22-L60](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/tzOffset/index.ts#L22-L60)
- Module-global defaults affect format and parse, while multi-date normalization uses the first object unless a context is supplied; the time-zone guide explicitly demonstrates order-dependent business-day results. — [pkgs/core/src/_lib/defaultOptions/index.ts#L12-L20](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/_lib/defaultOptions/index.ts#L12-L20) [pkgs/core/src/format/index.ts#L351-L366](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/format/index.ts#L351-L366) [pkgs/core/src/_lib/normalizeDates/index.ts#L23-L27](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/src/_lib/normalizeDates/index.ts#L23-L27) [pkgs/core/docs/timeZones.md#L40-L55](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/docs/timeZones.md#L40-L55)
- Build tooling performs filesystem mutations and shell-outs: package.sh removes package-local dist, the dev builder accepts source/output paths and runs oxfmt, and CDN construction recursively removes an environment-selected output when building a separate CDN package. — [pkgs/core/scripts/build/package.sh#L54-L67](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/scripts/build/package.sh#L54-L67) [pkgs/dev/src/build/package.ts#L8-L32](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/dev/src/build/package.ts#L8-L32) [pkgs/core/scripts/build/cdn.ts#L12-L26](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/scripts/build/cdn.ts#L12-L26) [pkgs/core/scripts/build/cdn.ts#L41-L42](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/core/scripts/build/cdn.ts#L41-L42)
- Source-observed subpath mismatch: tz workspace exports reference several paths without src and Date .ts files, while inspected implementations reside under src with Date .js files; utc Date subpaths likewise target .ts instead of the inspected .js implementations. Resolution impact was not tested. — [pkgs/tz/package.json#L25-L33](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/package.json#L25-L33) [pkgs/tz/src/date/index.js#L1-L4](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/date/index.js#L1-L4) [pkgs/tz/src/tzOffset/index.ts#L22-L29](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/tz/src/tzOffset/index.ts#L22-L29) [pkgs/utc/package.json#L22-L26](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/utc/package.json#L22-L26) [pkgs/utc/src/date/mini.js#L1-L14](https://github.com/date-fns/date-fns/blob/717ce0a807ea4c6b540d015b5c408723175b2838/pkgs/utc/src/date/mini.js#L1-L14)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
