Releases: jasonsturges/lunarphase-js
Lunar Phase v2.0.2
What's Changed
- Vite upgrade by @jasonsturges in #36
- DTS bundle generator by @jasonsturges in #37
- Vite gh-pages build by @jasonsturges in #39
Full Changelog: v2.0.1...v2.0.2
Lunar Phase v2.0.1
Class patterns for exports and type declarations.
Full Changelog: v2.0.0...v2.0.1
Lunar Phase v2.0.0
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
- Vite TypeScript by @jasonsturges in #25
Full Changelog: v1.0.10...v2.0.0
Lunar Phase v1.0.10
Release notes
Added source maps
Lunar Phase v1.0.9
Release Notes
Corrected emoji for Northern vs Southern hemispheres.
Lunar Phase v1.0.8
Release Notes
- Conversion back to JavaScript
Lunar Phase v1.0.7
Release Notes
- Documentation improvements
- Refactoring
- Time constants
- Correction to lunar phase age
Lunar Phase v1.0.6
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
Documentation update
Lunar Phase v1.0.4
Obtain emoji for specified lunar phase.