Skip to content

Releases: jasonsturges/lunarphase-js

Lunar Phase v2.0.2

28 Feb 21:04
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.1...v2.0.2

Lunar Phase v2.0.1

30 Dec 05:54
Compare
Choose a tag to compare

Class patterns for exports and type declarations.

Full Changelog: v2.0.0...v2.0.1

Lunar Phase v2.0.0

27 Dec 06:38
Compare
Choose a tag to compare

Though the API is largely unchanged, major rework of the package has been implemented.

First, this project was ported to TypeScript and now features type declaration for inclusion in TypeScript projects.

Second, the build pipeline has been converted to Vite, now featuring CJS, ESM, UMD, and IIFE builds.

There are potentially three breaking changes.

Options params instead of Hemisphere

To better support features requests, this package is moving to an options pattern instead of individual parameters of functions.

This should only effect those who specify Hemisphere, such as Southern Hemisphere for lunar emoji.

Formerly called as:

import { Hemisphere, Moon } from "lunarphase-js";

Moon.lunarPhaseEmoji(new Date, Hemisphere.SOUTHERN);

Now called via options as:

import { Hemisphere, Moon } from "lunarphase-js";

Moon.lunarPhaseEmoji(new Date(), {
  hemisphere: Hemisphere.SOUTHERN,
});

Julian vs JulianDay

The JulianDay instance is now just Julian.

Formerly called as:

import { JulianDay } from "lunarphase-js";

JulianDay.fromDate();

Now called via Julian

import { Julian } from "lunarphase-js";

Julian.fromDate();

Emoji constants

Emoji per hemisphere are now just two constant enumerations.

Formerly these would be accessed via nested constants:

LunarEmoji.NorthernHemisphere
LunarEmoji.SouthernHemisphere

Now, each set is simply accessed individually:

import {
  NorthernHemisphereLunarEmoji,
  SouthernHemisphereLunarEmoji,
} from "lunarphase-js";

NorthernHemisphereLunarEmoji["FULL"]
SouthernHemisphereLunarEmoji["FULL"]

Log an issue and I will assist in any migration issues.

What's Changed

Full Changelog: v1.0.10...v2.0.0

Lunar Phase v1.0.10

17 Mar 05:54
Compare
Choose a tag to compare

Release notes

Added source maps

Lunar Phase v1.0.9

15 Mar 01:25
Compare
Choose a tag to compare

Release Notes

Corrected emoji for Northern vs Southern hemispheres.

Lunar Phase v1.0.8

25 May 06:51
Compare
Choose a tag to compare

Release Notes

  • Conversion back to JavaScript

Lunar Phase v1.0.7

25 May 04:40
Compare
Choose a tag to compare

Release Notes

  • Documentation improvements
  • Refactoring
  • Time constants
  • Correction to lunar phase age

Lunar Phase v1.0.6

22 May 06:03
Compare
Choose a tag to compare

Release Notes

New Features

Emoji now represents choice of Northern and Southern Hemispheres.

Added Blown Lunation Number (BLN) using Ernest William Brown's lunar theory, based on Lunation 1 being the first new moon of 1923 at approximately 02:41 UTC, January 17, 1923.

Synodic month accuracy increased, based on Mean Synodic Month, 2000 AD mean solar days.

Project Updates

The following updates were implemented.

Project

Converting project to TypeScript, but retaining functional implementation as modules.

Imports

Replacing the glob import with a module export.

This is currently implemented as:

import * as Moon from 'lunarphase-js';

Instead, I'm changing this to:

import { Moon } from 'lunarphase-js';

RESTful API

Eliminating all the get prefixes on the method signatures for a more RESTful API.

Structure

Isolating some enumerations, constants, and date calculations.

Lunar Phase v1.0.5

05 Mar 07:57
Compare
Choose a tag to compare

Documentation update

Lunar Phase v1.0.4

05 Mar 07:48
Compare
Choose a tag to compare

Obtain emoji for specified lunar phase.