Skip to content

chore(deps): bump suncalc from 1.9.0 to 2.0.1 in /frontend#40

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/frontend/suncalc-2.0.0
Open

chore(deps): bump suncalc from 1.9.0 to 2.0.1 in /frontend#40
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/frontend/suncalc-2.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 6, 2026

Copy link
Copy Markdown
Contributor

Bumps suncalc from 1.9.0 to 2.0.1.

Release notes

Sourced from suncalc's releases.

v2.0.1

Fixed an issue with getMoonTimes incorrectly reporting alwaysUp/alwaysDown in some cases. #186

v2.0.0

SunCalc 2.0 is a precision-focused rewrite that matches the accuracy and conventions of timeanddate.com and the U.S. Naval Observatory. It now ships as a modern ES module with TypeScript declarations, plus a bundled CommonJS/UMD build for legacy require() and <script> use.

Dramatically improved accuracy ⚡

Every function was rebuilt on higher-order astronomical models (Jean Meeus' Astronomical Algorithms) and validated against JPL Horizons and the USNO. Typical errors versus v1:

v1 v2
Sun position ~0.43° ~0.08° ~5× better
Sun rise/set times ~75 s ~15 s ~5× better
Moon position ~1.2° ~0.09° ~14× better
Moon rise/set times ~5 min ~15 s ~20× better
Moon distance ~3500 km ~20 km ~150× better

Sun and moon times are now accurate to ~15 seconds — at the floor of what the USNO's whole-minute reference data can even measure.

Breaking changes ⚠️

  • ESM-first. The source is now a native ES module — import * as SunCalc from 'suncalc'. A bundled UMD build still supports require('suncalc') and direct <script> tags (global SunCalc, also on unpkg / jsDelivr).
  • Angles in degrees. Every angle in and out — altitude, azimuth, illumination angle, parallactic angle — is in degrees, not radians.
  • North-based azimuth. Azimuth is measured clockwise from north: 0 = N, 90 = E, 180 = S, 270 = W (v1 measured from south).
  • Apparent altitude. getPosition / getMoonPosition now return the apparent (atmospheric-refraction-corrected) altitude, so positions near the horizon match what you actually observe.
  • Dates are UTC instants. Inputs and outputs are absolute moments in time; no local-timezone conversion is applied. getTimes resolves the input date's solar day regardless of the time-of-day you pass (in v1 you had to pass noon to avoid off-by-one-day surprises).
  • getMoonTimes scans the UTC day of the given date; the inUTC argument has been removed. For a local-civil-day window, pass a date set to local midnight.
  • Missing events are null. When an event doesn't occur (e.g. the sun never rises at high latitudes), its time is null rather than an Invalid Date, and getTimes sets alwaysUp / alwaysDown accordingly.

Other changes

  • Added a waxing flag to getMoonIllumination.
  • Bundled hand-written TypeScript declarations (index.d.ts).
Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jul 6, 2026
@dependabot dependabot Bot changed the title chore(deps): bump suncalc from 1.9.0 to 2.0.0 in /frontend chore(deps): bump suncalc from 1.9.0 to 2.0.1 in /frontend Jul 20, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/frontend/suncalc-2.0.0 branch from a5b1e5a to fb0e8d9 Compare July 20, 2026 13:39
Bumps [suncalc](https://github.com/mourner/suncalc) from 1.9.0 to 2.0.1.
- [Release notes](https://github.com/mourner/suncalc/releases)
- [Commits](mourner/suncalc@v1.9.0...v2.0.1)

---
updated-dependencies:
- dependency-name: suncalc
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/frontend/suncalc-2.0.0 branch from fb0e8d9 to 2ca6144 Compare July 20, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants