Commit graph

5 commits

Author SHA1 Message Date
Aric Camarata
70da984a3b ci: fix eslint parser devDeps, flat config files pattern, untrack coverage
- Add @typescript-eslint/parser and @typescript-eslint/eslint-plugin as
  direct devDependencies (were only peer deps of @acamarata/eslint-config,
  causing ERR_MODULE_NOT_FOUND in CI)
- Add files: ['**/*.ts'] to eslint.config.mjs so ESLint 10 flat config
  picks up TypeScript files; add parserOptions.project for type-aware rules
- Run prettier --write src/ to fix formatting after config changes
- Add coverage/ to .gitignore and untrack previously committed coverage files
2026-05-31 08:48:01 -04:00
Aric Camarata
b52802f94b 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:57 -04:00
Aric Camarata
dea28b9262 chore: adopt shared config packages (tsconfig, eslint, prettier) 2026-05-30 15:03:07 -04:00
Aric Camarata
54f6ddfedd refactor: code quality improvements across the board 2026-03-08 11:34:05 -04:00
Aric Camarata
b44d9a958b v2.0.0: TypeScript rewrite with dual CJS/ESM build
Complete modernization of the package. The core SPA algorithm is
unchanged and validated; everything else is rebuilt to match current
JavaScript ecosystem standards.

Changes:
- TypeScript wrapper in src/ with full type definitions
- Dual CJS/ESM build via tsup (dist/index.cjs, dist/index.mjs)
- Core algorithm moved from dist/spa.js to lib/spa.js (same code)
- Input validation with descriptive TypeError/RangeError messages
- formatTime() and SPA function code constants as named exports
- getSpa() / calcSpa() accept null for optional args (tz, options)
- Test suite: 61 ESM assertions and 17 CJS assertions
- GitHub Actions CI: Node 20/22/24 matrix, typecheck, pack-check
- GitHub Wiki: Home, API Reference, Architecture, Twilight, NREL SPA
- NREL attribution in LICENSE and README per their license terms
- package.json: exports map, files, engines >=20, sideEffects: false
- Author corrected to Aric Camarata; repository.url uses git+https://
- LICENSE year corrected to 2023-2026
- Removed: index.js, test.js, dist/spa.js (superseded by above)
2026-02-25 11:01:38 -05:00