Commit graph

34 commits

Author SHA1 Message Date
Aric Camarata
9367a45ac8 chore: bump to v1.0.4 2026-06-13 11:52:20 -04:00
Aric Camarata
d9ce016e4b build: use prepack hook so npm pack/publish reliably emit index.d.mts 2026-06-13 10:11:19 -04:00
Aric Camarata
fb803e4068 chore: bump to v1.0.3 2026-06-10 16:47:20 -04:00
Aric Camarata
34193780f3 fix: interpret Dates by UTC calendar day in UAQ engine for exact round-trips
Bug: uaqToHijri read local date components (getFullYear/getMonth/getDate)
and passed them to Date.UTC(), producing a UTC midnight that does not match
the input's intended Gregorian day on hosts west of UTC. Concretely, a Date
returned by toGregorian() (UTC midnight) would map to the *previous* Hijri
day on UTC-5 or UTC-13 hosts, breaking the toHijri(toGregorian(hy,hm,hd))
round-trip.

Fix: switch line 44 to read UTC components (getUTCFullYear/getUTCMonth/
getUTCDate), matching how the FCNA engine already worked. Both engines now
share the same UTC-day contract: toHijri reads the UTC calendar day of the
input, and toGregorian returns a UTC-midnight Date. Round-trips are exact;
results are host-timezone-independent.

Behavior change: on non-UTC hosts, toHijri results may shift to the UTC
calendar day rather than the local calendar day. Users passing local
wall-clock dates should use new Date(Date.UTC(y, m-1, d)).

Also:
- Fix misleading comment in uaqToHijri (previously claimed local components
  were "timezone-safe")
- Add UTC-day contract to toHijri JSDoc in src/index.ts
- Fix wrong constraint comment in hijri-core.test.ts header
- Add "day boundaries (UTC contract)" describe block to vitest suite
- Convert LOCAL Date constructors in test.mjs and test-cjs.cjs to
  Date.UTC() form; add UAQ round-trip assertion to test.mjs
- Add "Day boundaries and time zones" section to README.md
- Add [Unreleased] Fixed entry to CHANGELOG.md
2026-06-10 16:32:01 -04:00
Aric Camarata
6caa9eed2c ci: fix eslint config, add missing ts-eslint devDeps, format src
- Add @typescript-eslint/parser and @typescript-eslint/eslint-plugin to
  devDependencies (required by eslint.config.mjs direct imports and by
  @acamarata/eslint-config peerDependencies)
- Fix eslint.config.mjs: scope files to src/**/*.ts, add parserOptions.project
  for type-aware rules, expand ignores to cover coverage/ and docs/
- Run prettier --write src/ to fix format:check failures
2026-05-31 08:47:31 -04:00
Aric Camarata
680bc72c19 chore: bump to v1.0.2 2026-05-30 19:12:04 -04:00
Aric Camarata
db575a3b41 fix: satisfy strict null checks in uaq/fcna table lookups 2026-05-30 18:49:21 -04:00
Aric Camarata
e1b761db7c chore: P1 compliance updates (AGENTS.md symlink, docs, types) 2026-05-30 18:38:10 -04:00
Aric Camarata
27b89b03a8 docs: refresh TypeDoc API output (T-E8-03 QA-A verify) 2026-05-30 17:48:46 -04:00
Aric Camarata
235ffb8851 docs: add TypeDoc API generation (typedoc@0.28.19 + typedoc-plugin-markdown@4.11.0)
Add typedoc and typedoc-plugin-markdown as devDependencies. Add typedoc.json config
targeting src/index.ts with markdown output to .github/wiki/api. Add docs script to
package.json. Generate initial API reference pages.

Part of T-E8-03 — TypeDoc automation for all 12 JS/TS packages.
2026-05-30 16:41:58 -04:00
Aric Camarata
94bc28ebc3 chore: adopt shared config packages (tsconfig, eslint, prettier) 2026-05-30 15:07:38 -04:00
Aric Camarata
f5cb959dcc build(hijri-core): emit dist/index.d.mts (postbuild) so pack-check passes 2026-05-29 15:57:11 -04:00
Aric Camarata
69da87f639 ci(hijri-core): scope prettier to src/ so format:check ignores lockfile and prose docs 2026-05-29 15:54:25 -04:00
Aric Camarata
26a43b5829 ci(hijri-core): enable corepack before setup-node so cache:pnpm resolves 2026-05-29 15:50:08 -04:00
Aric Camarata
4c37382667 ci(hijri-core): use corepack instead of pinned pnpm action 2026-05-29 15:02:58 -04:00
Aric Camarata
71116954da chore: corepack migration + typedoc config + ADR-015 CI updates (P1) 2026-05-29 07:15:57 -04:00
Aric Camarata
193bd5527f chore: untrack AGENTS.md (AI working memory, not source code) 2026-05-29 06:36:40 -04:00
Aric Camarata
b6ee3b08d0 docs: add quickstart, advanced guide, and examples for hijri-core 2026-05-28 14:14:20 -04:00
Aric Camarata
4d231b8aec docs(e6): add wiki pages — Sidebar, Footer, Contributing, SECURITY, CODE_OF_CONDUCT 2026-05-28 14:00:09 -04:00
Aric Camarata
c7bb2941b5 chore: bump to v1.0.1
- Flatten exports map to ADR-015 standard
- Add coverage script (c8)
- Migrate CI to corepack enable
2026-05-28 13:54:58 -04:00
Aric Camarata
e1050df823 chore(config): add AGENTS.md for dual-harness parity 2026-05-25 15:49:13 -04:00
Aric Camarata
edeaa21ea5 chore: align repository structure with portfolio documentation standards 2026-05-15 15:27:00 -04:00
Aric Camarata
c89e77a6ff Add GitHub Sponsors funding config 2026-03-28 18:18:48 -04:00
Aric Camarata
f29035f3c9 style: replace em dashes with colons in docs 2026-03-08 17:28:03 -04:00
Aric Camarata
72fb536fcd docs: add Architecture section to README 2026-03-08 17:10:35 -04:00
Aric Camarata
8ed4472701 ci: let pnpm/action-setup read version from packageManager field 2026-03-08 16:52:27 -04:00
Aric Camarata
04dda02b1f docs: add Acknowledgments section to README 2026-03-08 16:46:06 -04:00
Aric Camarata
a7c4e466c7 ci: pin pnpm to version 10 in all CI jobs
Also enable sourcemap: true in tsup config
2026-03-08 16:37:33 -04:00
Aric Camarata
f0757b1333 refactor: code quality improvements across the board 2026-03-08 11:38:10 -04:00
Aric Camarata
0727665eaa chore: add forceConsistentCasingInFileNames to tsconfig; fix wiki-sync action 2026-02-25 15:25:29 -05:00
Aric Camarata
b58c74fa72 chore: clear .npmrc to remove pnpm-only key that warns on npm publish 2026-02-25 15:08:47 -05:00
Aric Camarata
23e066fd4e chore: pre-release CR/QA polish for v1.0.0
Remove empty dependencies field from package.json. Add JSDoc to
CalendarEngine.toGregorian clarifying null-return contract. Fix
documentation style in source comments and wiki (no em dashes).
Tighten test output format in test.mjs and test-cjs.cjs.
2026-02-25 15:07:32 -05:00
Aric Camarata
b98ab39a13 fix: mark dist files as having side effects
The index module registers built-in calendar engines at load time via
registerCalendar(). sideEffects:false was incorrect and could cause
bundlers to tree-shake those registration calls. Mark only the dist
entry points as having side effects so tree-shaking still works for
everything else.
2026-02-25 14:14:42 -05:00
Aric Camarata
bb326d071c feat: initial release of hijri-core v1.0.0
Zero-dependency Hijri calendar engine with pluggable calendar registry.
Built-in Umm al-Qura (UAQ) and FCNA/ISNA calendar engines. Supports N
additional calendars via registerCalendar(). Pure Date.UTC arithmetic,
binary search on 184-entry UAQ table, Meeus Ch.49 new moon formula for
FCNA. 39 ESM + 20 CJS tests passing. Dual CJS/ESM build with full TypeScript
declarations.
2026-02-25 14:06:02 -05:00