mirror of
https://github.com/acamarata/nrel-spa.git
synced 2026-07-01 11:24:25 +00:00
style: replace em dashes with colons in docs and wiki
This commit is contained in:
parent
54f6ddfedd
commit
13c1145fcc
3 changed files with 9 additions and 9 deletions
|
|
@ -32,12 +32,12 @@ nrel-spa/
|
||||||
- Provides `formatTime()` as a standalone export
|
- Provides `formatTime()` as a standalone export
|
||||||
|
|
||||||
**src/types.ts** exports all public TypeScript interfaces and constants:
|
**src/types.ts** exports all public TypeScript interfaces and constants:
|
||||||
- `SpaOptions` — atmospheric and calculation parameters
|
- `SpaOptions`: atmospheric and calculation parameters
|
||||||
- `SpaResult` / `SpaFormattedResult` — base return types for `getSpa` / `calcSpa`
|
- `SpaResult` / `SpaFormattedResult`: base return types for `getSpa` / `calcSpa`
|
||||||
- `SpaAnglesResult` / `SpaFormattedAnglesResult` — per-angle entries in the `angles` array
|
- `SpaAnglesResult` / `SpaFormattedAnglesResult`: per-angle entries in the `angles` array
|
||||||
- `SpaResultWithAngles` / `SpaFormattedResultWithAngles` — return types when `angles` is passed
|
- `SpaResultWithAngles` / `SpaFormattedResultWithAngles`: return types when `angles` is passed
|
||||||
- `SpaFunctionCode` — union type `0 | 1 | 2 | 3`
|
- `SpaFunctionCode`: union type `0 | 1 | 2 | 3`
|
||||||
- `SPA_ZA`, `SPA_ZA_INC`, `SPA_ZA_RTS`, `SPA_ALL` — function code constants
|
- `SPA_ZA`, `SPA_ZA_INC`, `SPA_ZA_RTS`, `SPA_ALL`: function code constants
|
||||||
|
|
||||||
**tsup** compiles `src/index.ts` to both CJS (`dist/index.cjs`) and ESM (`dist/index.mjs`) with TypeScript declarations. The `lib/spa.js` module is kept external (not bundled) and resolved at runtime via a `createRequire` shim in the ESM build.
|
**tsup** compiles `src/index.ts` to both CJS (`dist/index.cjs`) and ESM (`dist/index.mjs`) with TypeScript declarations. The `lib/spa.js` module is kept external (not bundled) and resolved at runtime via a `createRequire` shim in the ESM build.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- **Runtime crash:** `calcSpa(... , [])` with an empty angles array no longer crashes. The empty-array guard is now consistent between `getSpa` and `calcSpa`.
|
- **Runtime crash:** `calcSpa(... , [])` with an empty angles array no longer crashes. The empty-array guard is now consistent between `getSpa` and `calcSpa`.
|
||||||
- **Silent wrong output:** `getSpa` with `options.function: SPA_ZA` or `SPA_ZA_INC` now returns `NaN` for `sunrise`, `solarNoon`, and `sunset` instead of silently returning `0`. `calcSpa` returns `"N/A"` for those fields. The zero values were misleading — those fields are never computed by non-RTS function codes.
|
- **Silent wrong output:** `getSpa` with `options.function: SPA_ZA` or `SPA_ZA_INC` now returns `NaN` for `sunrise`, `solarNoon`, and `sunset` instead of silently returning `0`. `calcSpa` returns `"N/A"` for those fields. The zero values were misleading: those fields are never computed by non-RTS function codes.
|
||||||
- `lib/spa.js` internal file header corrected from `// dist/spa.js` to `// lib/spa.js`.
|
- `lib/spa.js` internal file header corrected from `// dist/spa.js` to `// lib/spa.js`.
|
||||||
- `wiki-sync.yml`: workflow now handles first-run initialization when the GitHub Wiki repository does not yet exist. Replaces `actions/checkout@v4` for the wiki step with a `git clone || git init` pattern.
|
- `wiki-sync.yml`: workflow now handles first-run initialization when the GitHub Wiki repository does not yet exist. Replaces `actions/checkout@v4` for the wiki step with a `git clone || git init` pattern.
|
||||||
- Removed `package-import-method=hardlink` from `.npmrc` — it is pnpm's default since v7 and caused `npm warn Unknown project config` because npm reads `.npmrc` too.
|
- Removed `package-import-method=hardlink` from `.npmrc`: it is pnpm's default since v7 and caused `npm warn Unknown project config` because npm reads `.npmrc` too.
|
||||||
- CI pack-check grep now uses a word-boundary pattern, preventing false matches on files with similar prefixes.
|
- CI pack-check grep now uses a word-boundary pattern, preventing false matches on files with similar prefixes.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ console.log(raw.sunrise); // 5.417 (fractional hours)
|
||||||
console.log(raw.solarNoon); // 12.965
|
console.log(raw.solarNoon); // 12.965
|
||||||
console.log(raw.sunset); // 20.509
|
console.log(raw.sunset); // 20.509
|
||||||
|
|
||||||
// Formatted output — same parameters, HH:MM:SS strings
|
// Formatted output: same parameters, HH:MM:SS strings
|
||||||
const fmt = calcSpa(date, 40.7128, -74.006, -4);
|
const fmt = calcSpa(date, 40.7128, -74.006, -4);
|
||||||
console.log(fmt.sunrise); // "05:25:03"
|
console.log(fmt.sunrise); // "05:25:03"
|
||||||
console.log(fmt.solarNoon); // "12:57:56"
|
console.log(fmt.solarNoon); // "12:57:56"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue