Skip to content

chore(deps): bump suncalc from 1.9.0 to 2.0.0#878

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

chore(deps): bump suncalc from 1.9.0 to 2.0.0#878
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/master/suncalc-2.0.0

Conversation

@dependabot

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

Copy link
Copy Markdown
Contributor

Bumps suncalc from 1.9.0 to 2.0.0.

Release notes

Sourced from suncalc's releases.

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 compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [suncalc](https://github.com/mourner/suncalc) from 1.9.0 to 2.0.0.
- [Release notes](https://github.com/mourner/suncalc/releases)
- [Commits](mourner/suncalc@v1.9.0...v2.0.0)

---
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>
@github-actions

Copy link
Copy Markdown
Contributor

Not Automerged

The PR does not match any automerge rules.

Details: No configuration rule matched this update

Dependabot Information:

  • Package name(s): suncalc
  • Update type: major
  • Dependency type: production
  • Previous version: 1.9.0
  • New version: 2.0.0

Modified Files:

  • package-lock.json
  • package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants