Skip to content

v0.2.0

Choose a tag to compare

@clarkbw clarkbw released this 07 Sep 11:22
· 33 commits to main since this release
298836a

Almanac 0.2.0 adds backward and range lunar eclipse searches in TypeScript and Swift.

  • previousLunarEclipse(before:) / previousLunarEclipse(before) finds the previous eclipse directly, retaining the 100 ms same-eclipse band used by next searches.
  • lunarEclipses(from:to:) / lunarEclipses(from, to) returns eclipse peaks in a sorted, half-open [from, to) window. Visibility remains a separate observer query.
  • Stable peak calculations and Swift date normalization allow adjacent windows to split at a returned peak. The root solver also rejects narrow intervals without a crossing.
  • A shared performance harness compares both ports against the base revision in CI, with macOS benchmarks gated on the cheaper TypeScript job.

Compared with the previous consumer loops, CI measured previous searches about 86% faster and 228-hour range searches 65–99% faster. Stable boundary handling adds about 0.1 ms to next searches (8–11%); all workloads pass the 20% regression gate.

Validated against all 344 catalog eclipses, with 86 TypeScript tests, 91 Swift tests, and unchanged fixture/parity tolerances.

npm install @openwaters/almanac@0.2.0
.package(url: "https://github.com/openwatersio/almanac.git", exact: "0.2.0")

Changes: #7, #8.

Full changelog.