Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #8

Merged
merged 10 commits into from
Oct 2, 2023
18 changes: 18 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,21 @@ updates:
schedule:
interval: "weekly"
target-branch: "develop"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
target-branch: "develop"

- package-ecosystem: "npm"
directory: "/vendor"
schedule:
interval: "monthly"
target-branch: "develop"

- package-ecosystem: "npm"
directory: "/fonts"
schedule:
interval: "monthly"
target-branch: "develop"
32 changes: 27 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,25 @@ This project adheres to [Semantic Versioning](https://semver.org/).

❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/donate) With your help we can continue to improve the MagicMirror².

## [2.25.0] - Unreleased (`develop` branch)
## [2.26.0] - Unreleased (`develop` branch)

_This release is scheduled to be released on 2023-10-01._
_This release is scheduled to be released on 2024-01-01._

> ⚠️ This release needs nodejs version >= `v18`, older release have reached end of life and will not work!
### Added

### Removed

### Updated

### Fixed

## [2.25.0] - 2023-10-01

Thanks to: @bugsounet, @dgoth, @dependabot, @kenzal, @Knapoc, @KristjanESPERANTO, @martingron, @NolanKingdon, @Paranoid93, @TeddyStarinvest and @Ybbet.

Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not all) of the work on this release as project collaborators. This version would not be there without their effort. Thank you guys! You are awesome!

> ⚠️ This release needs nodejs version >= `v18`, older releases have reached end of life and will not work!

### Added

Expand All @@ -20,6 +34,10 @@ _This release is scheduled to be released on 2023-10-01._
- Added AnimateIn and animateOut in module config definition
- Apply AnimateIn rules on the first start
- Added automatic client page reload when server was restarted by setting `reloadAfterServerRestart: true` in `config.js`, per default `false` (#3105)
- Added eventClass option for customEvents on the default calendar
- Added AnimateCSS integration in tests suite (#3206)
- Added npm dependabot [Reserved to developer] (#3210)
- Added improved logging for calendar (#3110)

### Removed

Expand All @@ -29,13 +47,15 @@ _This release is scheduled to be released on 2023-10-01._

- Update roboto fonts to version v5
- Update issue template
- Update dependencies incl. electron to v26
- Update dev/dependencies incl. electron to v26
- Replace pretty-quick by lint-staged (<https://github.com/azz/pretty-quick/issues/164>)
- Update engine node >=18. v16 reached it's end of life. (#3170)
- Update typescript definition for modules
- Cleaned up nunjuck templates
- Replace `node-fetch` with internal fetch (#2649) and remove `digest-fetch`
- Updated the French translation according to the English file.
- Update the French translation according to the English file.
- Update dependabot incl. vendor/fonts (monthly check)
- Renew `package-lock.json` for release

### Fixed

Expand All @@ -49,6 +69,8 @@ _This release is scheduled to be released on 2023-10-01._
- Respect width/height (no fullscreen) if set in electronOptions (together with `fullscreen: false`) in `config.js` (#3174)
- Fix: AnimateCSS merge hide() and show() animated css class when we do multiple call
- Fix `Uncaught SyntaxError: Identifier 'getCorsUrl' has already been declared (at utils.js:1:1)` when using `clock` and `weather` module (#3204)
- Fix overriding `config.js` when running tests (#3201)
- Fix issue in weathergov provider with probability of precipitation not showing up on hourly or daily forecast

## [2.24.0] - 2023-07-01

Expand Down
13 changes: 8 additions & 5 deletions modules/default/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Module.register("calendar", {
hideDuplicates: true,
showTimeToday: false,
colored: false,
customEvents: [], // Array of {keyword: "", symbol: "", color: ""} where Keyword is a regexp and symbol/color are to be applied for matched
customEvents: [], // Array of {keyword: "", symbol: "", color: "", eventClass: ""} where Keyword is a regexp and symbol/color/eventClass are to be applied for matched
tableClass: "small",
calendars: [
{
Expand Down Expand Up @@ -321,12 +321,12 @@ Module.register("calendar", {
}
}

// Color events if custom color is specified
// Color events if custom color or eventClass are specified
if (this.config.customEvents.length > 0) {
for (let ev in this.config.customEvents) {
if (typeof this.config.customEvents[ev].color !== "undefined" && this.config.customEvents[ev].color !== "") {
let needle = new RegExp(this.config.customEvents[ev].keyword, "gi");
if (needle.test(event.title)) {
let needle = new RegExp(this.config.customEvents[ev].keyword, "gi");
if (needle.test(event.title)) {
if (typeof this.config.customEvents[ev].color !== "undefined" && this.config.customEvents[ev].color !== "") {
// Respect parameter ColoredSymbolOnly also for custom events
if (this.config.coloredText) {
eventWrapper.style.cssText = `color:${this.config.customEvents[ev].color}`;
Expand All @@ -337,6 +337,9 @@ Module.register("calendar", {
}
break;
}
if (typeof this.config.customEvents[ev].eventClass !== "undefined" && this.config.customEvents[ev].eventClass !== "") {
eventWrapper.className += ` ${this.config.customEvents[ev].eventClass}`;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/default/calendar/calendarfetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEn
* Broadcast the existing events.
*/
this.broadcastEvents = function () {
Log.info(`Calendar-Fetcher: Broadcasting ${events.length} events.`);
Log.info(`Calendar-Fetcher: Broadcasting ${events.length} events from ${url}.`);
eventsReceivedCallback(this);
};

Expand Down
16 changes: 12 additions & 4 deletions modules/default/weather/providers/weathergov.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ WeatherProvider.register("weathergov", {
weather.windSpeed = WeatherUtils.convertWindToMs(weather.windSpeed);
weather.windFromDirection = forecast.windDirection;
weather.temperature = forecast.temperature;
//assign probability of precipitation
if (forecast.probabilityOfPrecipitation.value === null) {
weather.precipitationProbability = 0;
} else {
weather.precipitationProbability = forecast.probabilityOfPrecipitation.value;
}
// use the forecast isDayTime attribute to help build the weatherType label
weather.weatherType = this.convertWeatherType(forecast.shortForecast, forecast.isDaytime);

Expand Down Expand Up @@ -238,8 +244,6 @@ WeatherProvider.register("weathergov", {
* fetch forecast information for daily forecast.
*/
fetchForecastDaily(forecasts) {
const precipitationProbabilityRegEx = "Chance of precipitation is ([0-9]+?)%";

// initial variable declaration
const days = [];
// variables for temperature range and rain
Expand All @@ -262,8 +266,12 @@ WeatherProvider.register("weathergov", {

minTemp = [];
maxTemp = [];
const precipitation = new RegExp(precipitationProbabilityRegEx, "g").exec(forecast.detailedForecast);
if (precipitation) weather.precipitationProbability = precipitation[1];
//assign probability of precipitation
if (forecast.probabilityOfPrecipitation.value === null) {
weather.precipitationProbability = 0;
} else {
weather.precipitationProbability = forecast.probabilityOfPrecipitation.value;
}

// set new date
date = moment(forecast.startTime).format("YYYY-MM-DD");
Expand Down
Loading