Commit graph

25 commits

Author SHA1 Message Date
Aric Camarata
9a2a984770 build: use prepack hook so npm pack/publish reliably emit index.d.mts 2026-06-13 10:30:57 -04:00
Aric Camarata
df4dbfe53e ci: fix eslint parser devDeps, add files patterns, format src
- Add @typescript-eslint/parser and @typescript-eslint/eslint-plugin as
  explicit devDependencies so pnpm hoists them for eslint.config.mjs
- Add files: ['**/*.ts'] to eslint config entries so ESLint 10 processes
  TS sources instead of ignoring them
- Add parserOptions.project for typed-lint rules
- Run prettier --write to fix pre-existing format issues in 12 src files
2026-05-31 08:48:31 -04:00
Aric Camarata
371d1773e7 chore: bump to v1.1.2 2026-05-30 19:19:07 -04:00
Aric Camarata
a15b4e2bdd fix: satisfy strict null checks in spk/math/visibility 2026-05-30 18:50:48 -04:00
Aric Camarata
1b85f060cd chore: stage P1 audit changes (docs/wiki/ci) 2026-05-30 18:37:17 -04:00
Aric Camarata
b19d9114ec docs: refresh TypeDoc API output (T-E8-03 QA-A verify) 2026-05-30 17:48:48 -04:00
Aric Camarata
2992dcee21 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:59 -04:00
Aric Camarata
89fb490051 chore: adopt shared config packages (tsconfig, eslint, prettier) 2026-05-30 15:12:49 -04:00
Aric Camarata
e6bb8a0860 ci: corepack before setup-node, scope prettier to src/, emit d.mts 2026-05-29 20:05:50 -04:00
Aric Camarata
8a6c1cf70d refactor: use flat exports shape per ADR-015 (keep d.mts on disk) 2026-05-29 15:08:28 -04:00
Aric Camarata
e8981db7aa fix: emit index.d.mts for ESM type resolution (v1.1.1) 2026-05-29 15:05:17 -04:00
Aric Camarata
c9060216e8 chore: E6 polish wiki content + ADR-015 CI updates (P1) 2026-05-29 07:15:46 -04:00
Aric Camarata
95e64643a9 chore: untrack AGENTS.md (AI working memory, not source code) 2026-05-29 06:36:40 -04:00
Aric Camarata
b5868cf0c5 chore(config): add AGENTS.md for dual-harness parity 2026-05-25 15:51:13 -04:00
Aric Camarata
6b29dbcccf chore: align repository structure with portfolio documentation standards 2026-05-15 15:27:18 -04:00
Aric Camarata
e8b0afd119 Add GitHub Sponsors funding config 2026-03-28 18:18:53 -04:00
Aric Camarata
b032fb596f style: fix prettier table formatting in wiki 2026-03-08 17:30:54 -04:00
Aric Camarata
0bf9e6eb16 style: replace em dashes with colons in docs and wiki 2026-03-08 17:28:03 -04:00
Aric Camarata
5ebfe45a4d docs: fix Quick Start heading casing; ci: add CHANGELOG/LICENSE to pack-check 2026-03-08 17:10:34 -04:00
Aric Camarata
789c5e47c3 fix: test script uses && between ESM and CJS runs 2026-03-08 16:37:58 -04:00
Aric Camarata
8bf34fb696 refactor: code quality improvements and fix arcvMinimum constant
Fix critical bug: arcvMinimum polynomial constant was 7.1651 (wrong)
instead of 11.8371 (Odeh 2006) in getMoonVisibilityEstimate. Now
imports the canonical arcvMinimum() from visibility module.

Deduplicate shared code across modules:
- arcvMinimum polynomial: single source in visibility/index.ts
- dot/norm vector helpers: use vdot/vnorm from math/index.ts
- DEG constant: use DEG2RAD from math/index.ts
- jdToJSDate: use jdToDate from time/index.ts

Add input validation to all public API functions (lat/lon range,
valid Date instances). Add ESLint + Prettier with TypeScript support.
Convert tests to node:test runner. Fix package.json exports to use
nested types-first format. Pin devDependencies to caret ranges.
Add noImplicitReturns and noFallthroughCasesInSwitch to tsconfig.
Replace .markdownlint.json with .vscode/settings.json. Update CI
workflow with lint job. Expand .gitignore coverage.
2026-03-08 11:39:28 -04:00
Aric Camarata
3b666c6465 v1.1.0: kernel-free moon position, illumination, visibility, and convenience API
Adds five new kernel-free functions using Meeus Ch. 47/48 approximations,
replacing suncalc as the moon data source in the acamarata stack.

- getMoonPosition(date, lat, lon, elevation?) — topocentric az/alt/distance +
  parallactic angle via WGS84 geodetic model and Bennett refraction
- getMoonIllumination(date) — illumination fraction, phase cycle position,
  bright limb angle, isWaxing via Meeus Ch. 47/48
- getMoonPhase: adds phaseName ("Waxing Crescent") and phaseSymbol ("🌒")
  fields to MoonPhaseResult
- getMoonVisibilityEstimate(date, lat, lon, elevation?) — kernel-free Odeh
  V-parameter crescent visibility estimate; returns zone A-D, V, ARCL, ARCV, W
- getMoon(date, lat, lon, elevation?) — convenience wrapper combining all four
  kernel-free functions into a single MoonSnapshot result

New types: MoonPosition, MoonIlluminationResult, MoonVisibilityEstimate, MoonSnapshot
98 tests (78 ESM + 20 CJS), typecheck clean, zero build warnings
2026-02-25 16:41:03 -05:00
Aric Camarata
2ed1a7188a Fix bin path prefix (npm pkg fix) 2026-02-25 16:00:23 -05:00
Aric Camarata
3712b78590 Rename package: moon-calc → moon-sighting
npm rejected moon-calc as too similar to mooncalc. Renamed to
moon-sighting across all source files, docs, wiki, CLI help text,
cache directory paths, and GitHub URLs.
2026-02-25 15:59:38 -05:00
Aric Camarata
b46ba2a74c Initial release: moon-calc v1.0.0
High-accuracy lunar crescent visibility using JPL DE442S ephemerides.
Implements Yallop q-test and Odeh V-parameter with all five crescent
geometry quantities (ARCL, ARCV, DAZ, W, lag). Full time scale chain
(UTC → TDB), IERS Q·R·W frame transforms, WGS84 observer model,
Bennett refraction, and kernel-free moon phase via Meeus approximation.
2026-02-25 15:45:41 -05:00