chore: bump to v1.0.1

- Flatten exports map to ADR-015 standard
- Add coverage script (c8)
- Migrate CI to corepack enable
This commit is contained in:
Aric Camarata 2026-05-28 13:55:03 -04:00
parent 3492f1f4b2
commit 908e48f9f7
3 changed files with 76 additions and 13 deletions

View file

@ -1 +0,0 @@
CLAUDE.md

45
.claude/AGENTS.md Normal file
View file

@ -0,0 +1,45 @@
# temporal-hijri — PRI (Per-Repo Instructions)
**PPI:** `~/Sites/acamarata/.claude/CLAUDE.md`
## What This Is
Temporal Calendar Protocol implementation for the Hijri calendar. Works with the TC39
Temporal proposal and `@js-temporal/polyfill`. Provides `UaqCalendar` (Umm al-Qura) and
`FcnaCalendar` (FCNA/ISNA) as plug-in calendars for `Temporal.PlainDate` and related
types. The underlying conversion logic comes from hijri-core.
**npm:** `temporal-hijri@1.0.0`
**Language:** TypeScript
**License:** MIT
## Key Technical Details
- Peer dependencies: `hijri-core@^1.0.0`, `@js-temporal/polyfill@^0.4.0` (optional)
- `@js-temporal/polyfill` is optional — works with native Temporal when available in the runtime
- Key exports: `uaqCalendar` (singleton), `fcnaCalendar` (singleton), `UaqCalendar` class, `FcnaCalendar` class
- Calendar protocol methods: `year()`, `month()`, `day()`, `monthCode()`, `inLeapYear()`, `dateFromFields()`, `dateAdd()`
- UAQ data covers 1318-1500 AH (Gregorian 1900-2076)
- Dual CJS/ESM build via tsup
- Zero runtime dependencies (peer deps are provided by the consumer)
## Architecture
`src/index.ts` exports calendar singletons and classes. Built to `dist/` (gitignored)
with `.cjs` and `.mjs` outputs plus dual type declarations. No format string parsing —
the Temporal API handles all date arithmetic and formatting natively.
## Commands
- `pnpm install` — install dev deps
- `pnpm build` — tsup build
- `pnpm test` — run test.mjs + test-cjs.cjs
- `pnpm run typecheck` — tsc --noEmit
## Important Notes
- This implements the Temporal Calendar Protocol — it is not a general-purpose Hijri utility
- hijri-core provides the actual calendar engine — this package is a thin Temporal protocol adapter
- Changes to hijri-core's API may require updates here
- `@js-temporal/polyfill` is optional — only needed in environments without native Temporal support
- TC39 Temporal proposal is Stage 3 — API may shift; track spec changes carefully

21
CHANGELOG.md Normal file
View file

@ -0,0 +1,21 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [1.0.1] - 2026-05-28
### Changed
- Flatten exports map to ADR-015 standard (import/require/types at top level)
- Add "./package.json" export condition
- Add coverage script (c8 --reporter=lcov)
- Migrate CI from pnpm/action-setup to corepack enable
## [1.0.0] - 2026-05-28
### Added
- Initial release

View file

@ -1,6 +1,6 @@
{
"name": "temporal-hijri",
"version": "1.0.0",
"version": "1.0.1",
"description": "Temporal Calendar Protocol implementation for the Hijri calendar system. Supports Umm al-Qura and FCNA calendars via hijri-core.",
"author": "Aric Camarata",
"license": "MIT",
@ -9,15 +9,11 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
}
}
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
@ -41,7 +37,8 @@
"format:check": "prettier --check src/ test.mjs test-cjs.cjs eslint.config.mjs tsup.config.ts",
"pretest": "tsup",
"test": "node --test test.mjs && node --test test-cjs.cjs",
"prepublishOnly": "tsup"
"prepublishOnly": "tsup",
"coverage": "c8 --reporter=lcov --reporter=text node --test"
},
"keywords": [
"temporal",
@ -87,5 +84,6 @@
"homepage": "https://github.com/acamarata/temporal-hijri#readme",
"bugs": {
"url": "https://github.com/acamarata/temporal-hijri/issues"
}
},
"type": "module"
}