Aric Camarata
4227afc2c3
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
af34aef986
chore: remove .npmignore, add c8 coverage, fix ci.yml (T-E5-03)
...
- Remove .npmignore (violation: npm-package-standard requires files field in
package.json, not .npmignore; files field was already present and correct)
- Add c8@^10.1.3 to devDependencies for native V8 coverage (ADR-008)
- Fix coverage script: was 'node --test' (missing test.mjs), now correct
- Replace lint job in ci.yml with coverage job per ci-standard.md four-job
pattern (test/typecheck/pack-check/coverage); lint+format remain as local
scripts invocable manually
npm pack --dry-run: zero warnings, 11 files, expected contents verified.
Tests: 119 ESM + 15 CJS = 134 pass, 0 fail.
2026-05-30 15:40:23 -04:00
Aric Camarata
fbb2fa9179
chore: adopt shared config packages (tsconfig, eslint, prettier)
2026-05-30 15:06:05 -04:00
Aric Camarata
5b5466d8ad
ci: corepack before setup-node, scope prettier to src/, emit d.mts
2026-05-29 20:05:26 -04:00
Aric Camarata
681126643f
chore: untrack AGENTS.md (AI working memory, not source code)
2026-05-29 06:36:41 -04:00
Aric Camarata
cf68c044a6
docs: add quickstart, advanced guide, and examples for pray-calc
2026-05-28 14:14:13 -04:00
Aric Camarata
7fefdb93ef
docs(e6): add wiki pages — Sidebar, Footer, Contributing, SECURITY, CODE_OF_CONDUCT
2026-05-28 13:59:59 -04:00
Aric Camarata
cbe283aaf8
chore: bump to v2.1.1
...
- Flatten exports map to ADR-015 standard
- Add coverage script (c8)
- Migrate CI to corepack enable
2026-05-28 13:54:55 -04:00
Aric Camarata
bdb0615c16
chore(config): add AGENTS.md for dual-harness parity
2026-05-25 15:51:18 -04:00
Aric Camarata
3edc12efbe
chore: align repository structure with portfolio documentation standards
2026-05-15 15:27:30 -04:00
Aric Camarata
406ec9fcc3
Add GitHub Sponsors funding config
2026-03-28 18:18:58 -04:00
Aric Camarata
4534b41957
feat: add getMidnight and Midnight field to prayer times output
...
Computes the midpoint of the night (Maghrib to Fajr), commonly used as
the Isha prayer endpoint. Also works with sunrise as the second anchor
for the astronomical variant.
Closes #1
2026-03-22 09:22:59 -04:00
Aric Camarata
43d6241ac2
style: fix prettier table formatting in wiki
2026-03-08 17:30:33 -04:00
Aric Camarata
155217265d
style: replace em dashes with colons in docs and wiki
2026-03-08 17:28:03 -04:00
Aric Camarata
85f02365f5
ci: verify README/CHANGELOG/LICENSE in pack-check; add Acknowledgments to README
2026-03-08 16:46:03 -04:00
Aric Camarata
8f39fcd82e
refactor: code quality improvements across the board
...
- Extract magic numbers into named constants (DHUHR_OFFSET_MINUTES,
ANGLE_MIN/MAX, LAT_SCALE) with source citations for MCW coefficients
- Add input validation (RangeError) for lat, lng, tz, elevation on all
public API functions (getTimes, getTimesAll)
- Optimize solar ephemeris: computeAngles() returns declination so
getTimes/getTimesAll reuse it for Asr instead of computing twice
- DRY: shared constants.ts for DEG, Dhuhr offset, angle bounds
- Improve MethodEntry type with labeled tuple elements and NaN docs
- Add stricter tsconfig (noImplicitReturns, noFallthroughCasesInSwitch)
- Switch tests to node:test framework (TAP output, describe/it blocks)
- Add 8 new input validation tests (104 ESM + 13 CJS total)
- Add ESLint + Prettier with CI lint job
- Remove src/ from npm package files (smaller published tarball)
- Document NaN return behavior in JSDoc for getTimes/getTimesAll
2026-03-08 11:10:22 -04:00
Aric Camarata
a8d15bc85d
fix: chronological order test fails in UTC environments
...
The test called getTimes without an explicit tz, so it fell back to
-date.getTimezoneOffset()/60. On the developer machine (EDT = UTC-4)
this worked; on CI (Ubuntu, UTC = 0) NY's Maghrib crossed midnight,
returning ~0.51h instead of ~24.5h, which sorted before Asr (~21h).
Add tz=-4 explicitly. All section-8 geographic tests already do this;
the chronological test was the only one missing it.
2026-02-25 18:34:59 -05:00
Aric Camarata
c02f197ece
v2.0.0 — TypeScript rewrite, dual ESM/CJS, 14 methods + PCD dynamic algorithm
...
Complete rewrite from plain JavaScript to TypeScript with dual CJS/ESM output
via tsup. Removes all legacy .js source files and the old CommonJS-only index.
Key changes:
- Full TypeScript source in src/ with strict mode and declaration maps
- tsup build: dist/index.cjs + dist/index.mjs + dual .d.ts / .d.mts types
- 14 traditional fixed-angle methods (UOIF through MUIS) + MSC seasonal method
- PCD dynamic algorithm: MSC seasonal base + Earth-Sun distance correction +
ecliptic geometry + atmospheric refraction + observer elevation
- getTimesAll() batches all 14x2 zenith angles into a single SPA call
- getMscFajr() / getMscIsha() expose MSC seasonal reference directly
- getAngles() returns the PCD-computed fajrAngle and ishaAngle
- High-latitude bounds: angles clipped to [10, 20] above 55N
- 106 tests across ESM and CJS (test.mjs + test-cjs.cjs)
- CI matrix: Node 20/22/24, typecheck, pack-check
- Wiki: 12 reference pages + 6-page research section with global accuracy study,
home-territory comparison, observational evidence, and field observation matrix
- Moon functions removed (migrated to moon-sighting package)
- pnpm-only, Node >=20, sideEffects: false
2026-02-25 18:11:20 -05:00
f020a844f0
Added tests
2025-05-14 15:15:32 -04:00
2f9155b567
Update to readme and meta
2025-05-14 15:12:52 -04:00
01e7e3487a
Update test case
2025-05-04 12:07:45 -04:00
b7684851c0
Updated package and research
2025-05-04 12:05:39 -04:00
9e0428a6d9
Major update for core calculation algorithm and bug fixes
2025-05-04 11:34:23 -04:00
269cb3bb11
Update packaging for 1.6.2
2025-05-04 09:38:05 -04:00
925b83b407
Package fix for 1.6.1
2025-05-04 09:35:16 -04:00
6950f5a291
Fixes for 1.6.1
2025-05-04 09:34:00 -04:00
b5ee3ca8b8
feat: improve Asr solver, dynamic twilight angles, and MSC algorithm
2025-05-04 08:59:31 -04:00
uny-dev
eb68c97b42
Updated package.json repository field for NPM
2025-03-18 06:14:01 -04:00
4403cb224c
Added MSC Method
2024-06-21 20:14:18 -04:00
aaf15ee624
moon visibility for start and end
2023-12-01 16:41:57 +07:00
2d266214fa
comments on version
2023-11-14 12:28:17 +07:00
0cb2267da6
updated to "pray-calc" and synodic accuracy
2023-11-14 12:25:53 +07:00
d7c449ece7
update index.d.ts
2023-11-13 22:39:50 +07:00
6380403cf7
add phase name and symbol
2023-11-13 22:24:17 +07:00
c1814c2783
added getMoon functions
2023-11-13 21:34:55 +07:00
aacc8ff81b
edit version in change log
2023-11-13 09:16:56 +07:00
bb49fc63fe
update version
2023-11-13 09:16:32 +07:00
e79dfe1f68
updated types
2023-11-13 09:16:11 +07:00
b867162ace
updated for timezone handling and asr calc
2023-11-13 08:51:34 +07:00
13a477abee
Delete .DS_Store
2023-11-12 11:30:11 +07:00
7bbac3a511
updated gitignore for Mac files
2023-11-12 11:29:15 +07:00
f64a968a48
added info for npm publish
2023-11-12 11:28:20 +07:00
0f6b4046f3
added getMoon
2023-11-12 11:26:19 +07:00
cf8aa20577
initial commit
2023-11-12 11:19:56 +07:00