Skip to content

Fix defaultDate/12-24-hour parsing bug, harden CI, and misc chores - #136

Merged
knowledgecode merged 6 commits into
masterfrom
develop
Aug 30, 2026
Merged

Fix defaultDate/12-24-hour parsing bug, harden CI, and misc chores#136
knowledgecode merged 6 commits into
masterfrom
develop

Conversation

@knowledgecode

@knowledgecode knowledgecode commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • fix: parse() incorrectly let unrelated defaultDate fields (H vs A/h) override an explicitly parsed hour, including the H=0/H=24 boundary values that a truthiness-based check treated as absent. The hour mode (24-hour vs 12-hour) is now decided from the parsed string alone; defaultDate only fills in fields the parsed string didn't provide.
  • chore: replace __dirname with import.meta.dirname in vitest.config.ts (Vite native configLoader deprecation warning); rollup.config.ts already used the ESM-native pattern.
  • test: add coverage thresholds to vitest.config.ts (lines/statements/functions 100%, branches 95%) so a coverage regression fails CI instead of only affecting the badge.
  • chore(timezone): add a missing UTC+0 historical offset entry for Antarctica/McMurdo.

Update @astrojs/starlight, @types/node, @vitest/coverage-v8, astro,
eslint, prettier, rollup, rollup-plugin-dts, tsx, typescript-eslint,
and vitest to latest patch/minor versions.
Add timeout-minutes to all jobs, add explicit permissions, and add
a concurrency group to test.yml to cancel superseded runs. Bump
actions/checkout, actions/setup-node, actions/configure-pages,
actions/upload-pages-artifact, actions/deploy-pages,
actions/upload-artifact, and emibcn/badge-action to their latest
major versions.
…ted 12/24-hour fields

The hour resolution mixed pr and defaultDate fields before deciding
whether to use 24-hour (H) or 12-hour (h/A) semantics, so an unrelated
field left over in defaultDate could silently override an explicitly
parsed value (e.g. defaultDate.H clobbering a parsed "h a" time, or
defaultDate.A/h clobbering a parsed H, including the H=0/H=24 boundary
values which the previous truthiness-based check treated as absent).
The mode is now decided from the parsed result alone; defaultDate only
fills in fields the parsed string didn't provide.
Vite's native configLoader warns that __dirname support will be
removed in a future major version. rollup.config.ts already resolved
paths the ESM-native way, so vitest.config.ts is brought in line.
Coverage was measured and reported (via the badge) but never gated,
so a regression in coverage wouldn't fail CI. Current measured
coverage is lines/statements/functions 100% and branches 98.14%;
thresholds are set at 100% for the former and 95% for branches to
leave some room while still catching real regressions.
@knowledgecode
knowledgecode merged commit 47c5fdb into master Aug 30, 2026
4 checks passed
@knowledgecode
knowledgecode deleted the develop branch August 30, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant