tauqeet-js 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -0
- package/README.md +2 -2
- package/dist/hijri/index.cjs +2779 -0
- package/dist/hijri/index.cjs.map +1 -0
- package/dist/hijri/index.d.cts +218 -0
- package/dist/hijri/index.d.ts +218 -0
- package/dist/hijri/index.js +2765 -0
- package/dist/hijri/index.js.map +1 -0
- package/dist/index.cjs +2360 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -617
- package/dist/index.d.ts +5 -617
- package/dist/index.js +2360 -134
- package/dist/index.js.map +1 -1
- package/dist/moon/index.cjs +2633 -0
- package/dist/moon/index.cjs.map +1 -0
- package/dist/moon/index.d.cts +158 -0
- package/dist/moon/index.d.ts +158 -0
- package/dist/moon/index.js +2618 -0
- package/dist/moon/index.js.map +1 -0
- package/dist/prayers/index.cjs +2562 -0
- package/dist/prayers/index.cjs.map +1 -0
- package/dist/prayers/index.d.cts +165 -0
- package/dist/prayers/index.d.ts +165 -0
- package/dist/prayers/index.js +2551 -0
- package/dist/prayers/index.js.map +1 -0
- package/dist/qibla/index.cjs +98 -0
- package/dist/qibla/index.cjs.map +1 -0
- package/dist/qibla/index.d.cts +50 -0
- package/dist/qibla/index.d.ts +50 -0
- package/dist/qibla/index.js +94 -0
- package/dist/qibla/index.js.map +1 -0
- package/dist/solar-alignment/index.cjs +1491 -0
- package/dist/solar-alignment/index.cjs.map +1 -0
- package/dist/solar-alignment/index.d.cts +38 -0
- package/dist/solar-alignment/index.d.ts +38 -0
- package/dist/solar-alignment/index.js +1489 -0
- package/dist/solar-alignment/index.js.map +1 -0
- package/package.json +116 -64
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `tauqeet-js` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format follows [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).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- Sub-path exports (`/prayers`, `/qibla`, `/moon`, `/hijri`, `/solar-alignment`) for true per-module tree-shaking.
|
|
13
|
+
- ESLint + Prettier configuration for consistent code quality enforcement.
|
|
14
|
+
- GitHub Actions CI workflow (`.github/workflows/ci.yml`) running tests and build on Node 20 and 22.
|
|
15
|
+
- `CHANGELOG.md` (this file).
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- `tsconfig.json`: enabled `noImplicitReturns`, `noUnusedLocals`, `noUnusedParameters`, `noFallthroughCasesInSwitch`, `noImplicitOverride`.
|
|
19
|
+
- `tsconfig.json`: removed unused `"jsx": "react-jsx"` option (library has no JSX).
|
|
20
|
+
- `vitest.config.ts`: broadened `include` from an allowlist to `tests/**/*.test.ts`.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- Stale test files (`engine.test.ts`, `moon.test.ts`, `high-latitude.test.ts`, `extended/*.test.ts`) rewritten to use the current API.
|
|
24
|
+
- Removed leftover `methods.ts` from the project root.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## [1.1.0] — 2026-06-14
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- **Hijri Calendar module** (`src/hijri/`): Gregorian ↔ Hijri conversion via four strategies — Civil (tabular), Conjunction (astronomical), Visibility (location-based), and Umm al-Qura.
|
|
32
|
+
- `HijriEngine` class with pluggable calendar methods.
|
|
33
|
+
- Convenience converters `toHijri()` and `toGregorian()`.
|
|
34
|
+
- `HIJRI_MONTH_NAMES` constant array.
|
|
35
|
+
- **Solar Alignment module** (`src/solar-alignment/`): computes times when the sun aligns with the Qibla direction, useful for compass calibration.
|
|
36
|
+
- `EphemerisService` singleton with LRU cache (10-day window) and Lagrange 3-point interpolation for solar ephemeris, reducing per-prayer computation cost.
|
|
37
|
+
- `withMetadata` option on `calculatePrayerTimes` / `getPrayerTimes` to expose DEC, EOT, HP, SD, and solver iteration counts per prayer.
|
|
38
|
+
- `dhahwaKubra` (Ḍuḥā Kubrā) time to prayer results — the midpoint between Fajr and Sunset.
|
|
39
|
+
- Atmospheric corrections (`temperatureC`, `pressureMbar`) for refraction-accurate Sunrise/Maghrib.
|
|
40
|
+
- `resolveTimezoneAsync` hook on `PrayerConfig` for async timezone resolution.
|
|
41
|
+
- `highLatitudeStrategy` option: `'AngleBased'`, `'MiddleOfNight'`, `'SeventhOfNight'`, `'NearestLatitude'`.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- **Architecture consolidation**: merged `internal` and `_internal` utility folders into a single `src/internal/` directory.
|
|
45
|
+
- Iterative refinement for Solar Declination and Equation of Time inside the solar alignment solver.
|
|
46
|
+
- Validator (`validatePrayerConfig`) now supports DMS string and object coordinate formats.
|
|
47
|
+
- `timeZone` falls back to `Intl.DateTimeFormat().resolvedOptions().timeZone` when omitted.
|
|
48
|
+
- Default madhab changed to `Hanafi`; default method per madhab derived from `isDefault` flag in registry.
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
- Sub-second inaccuracies in astronomical event times resolved by iterative ephemeris refinement.
|
|
52
|
+
- Pressure validation now enforces integer check (`Number.isInteger`).
|
|
53
|
+
- Timezone offset widening (`string | number`) corrected throughout all modules.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## [1.0.0] — 2026-05-29
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
- **Prayer Times module** (`src/prayers/`): Fajr, Sunrise, Ḍuḥā, Dhuhr, Asr, Maghrib, Isha.
|
|
61
|
+
- 8 built-in calculation methods scoped per Madhab (Hanafi, Shafi, Maliki, Hanbali, Jaafari).
|
|
62
|
+
- High-latitude handling: Polar Day, Polar Night, Continuous Twilight with Astronomical Midnight fallback.
|
|
63
|
+
- Per-prayer minute adjustments via `adjustments` config.
|
|
64
|
+
- Elevation-based horizon dip correction.
|
|
65
|
+
- **Qibla module** (`src/qibla/`): great-circle bearing, rhumb-line bearing, and Haversine distance to the Kaaba.
|
|
66
|
+
- **Moon module** (`src/moon/`):
|
|
67
|
+
- Moon phase, elongation, illuminated fraction.
|
|
68
|
+
- Moon age (days since last New Moon).
|
|
69
|
+
- Lunar events: Next/Previous New Moon and Full Moon.
|
|
70
|
+
- Crescent visibility via Odeh, Yallop, and HMNAO criteria.
|
|
71
|
+
- **Astronomy engine** (`src/astronomy/`): VSOP87-derived solar ephemeris, lunar position theory, ΔT correction (ELP2000-style).
|
|
72
|
+
- Dual-module output (ESM + CJS) via `tsup`.
|
|
73
|
+
- TypeScript declaration files (`.d.ts` / `.d.cts`).
|
|
74
|
+
- Source maps.
|
|
75
|
+
- `sideEffects: false` for bundler tree-shaking.
|
|
76
|
+
- `prepublishOnly` script to gate `npm publish` behind a full build + test run.
|
|
77
|
+
- Comprehensive test suite with `vitest`.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
[Unreleased]: https://github.com/h-ghulam-hasnain/tauqeet-js/compare/v1.1.0...HEAD
|
|
82
|
+
[1.1.0]: https://github.com/h-ghulam-hasnain/tauqeet-js/compare/v1.0.0...v1.1.0
|
|
83
|
+
[1.0.0]: https://github.com/h-ghulam-hasnain/tauqeet-js/releases/tag/v1.0.0
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**A high-precision TypeScript library for Islamic astronomical calculations.**
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
7
|
|
|
8
8
|
> 📖 **Interactive documentation & live API explorer:** [https://tauqeet-js.web.app](https://tauqeet-js.web.app)
|
|
9
9
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
npm install tauqeet-js
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
> **Note:** The package is currently in active development. See [CONTRIBUTING.md](CONTRIBUTING.md) for building from source.
|
|
53
|
+
> **Note:** The package is currently in active development for v1.2.0. See [CONTRIBUTING.md](CONTRIBUTING.md) for building from source.
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|