Skip to content

Commit e87f50e

Browse files
MichMichkhasselSkySailsrejasveeck
authored
Release 2.24.0 (#3141)
Signed-off-by: naveen <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Karsten Hassel <[email protected]> Co-authored-by: Malte Hallström <[email protected]> Co-authored-by: Veeck <[email protected]> Co-authored-by: veeck <[email protected]> Co-authored-by: dWoolridge <[email protected]> Co-authored-by: Johan <[email protected]> Co-authored-by: Dario Mratovich <[email protected]> Co-authored-by: Dario Mratovich <[email protected]> Co-authored-by: Magnus <[email protected]> Co-authored-by: Naveen <[email protected]> Co-authored-by: buxxi <[email protected]> Co-authored-by: Thomas Hirschberger <[email protected]> Co-authored-by: Kristjan ESPERANTO <[email protected]> Co-authored-by: Andrés Vanegas Jiménez <[email protected]> Co-authored-by: Dave Child <[email protected]> Co-authored-by: grenagit <[email protected]> Co-authored-by: Grena <[email protected]> Co-authored-by: Magnus Marthinsen <[email protected]> Co-authored-by: Patrick <[email protected]> Co-authored-by: Piotr Rajnisz <[email protected]> Co-authored-by: Suthep Yonphimai <[email protected]> Co-authored-by: CarJem Generations (Carter Wallace) <[email protected]> Co-authored-by: Nicholas Fogal <[email protected]> Co-authored-by: JakeBinney <[email protected]> Co-authored-by: OWL4C <[email protected]> Co-authored-by: Oscar Björkman <[email protected]> Co-authored-by: Ismar Slomic <[email protected]> Co-authored-by: Jørgen Veum-Wahlberg <[email protected]> Co-authored-by: Eddie Hung <[email protected]> Co-authored-by: Bugsounet - Cédric <[email protected]> Co-authored-by: bugsounet <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent abe5c08 commit e87f50e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2564
-2431
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"rules": {
2525
"eqeqeq": "error",
2626
"import/order": "error",
27+
"no-param-reassign": "error",
2728
"no-prototype-builtins": "off",
2829
"no-throw-literal": "error",
2930
"no-unused-vars": "off",

.gitattributes

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# .gitattributes snippet to force users to use same line endings for project.
2+
#
3+
# Handle line endings automatically for files detected as text
4+
# and leave all files detected as binary untouched.
5+
* text=auto
6+
7+
#
8+
# The above will handle all files NOT found below
9+
# https://help.github.com/articles/dealing-with-line-endings/
10+
# https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes
11+
12+
13+
14+
# These files are text and should be normalized (Convert crlf => lf)
15+
*.php text
16+
*.css text
17+
*.scss text
18+
*.js text
19+
*.json text
20+
*.htm text
21+
*.html text
22+
*.xml text
23+
*.txt text
24+
*.ini text
25+
*.inc text
26+
*.pl text
27+
*.rb text
28+
*.py text
29+
*.scm text
30+
*.sql text
31+
.htaccess text
32+
*.sh text
33+
Dockerfile* text
34+
*.yml text
35+
*.yaml text
36+
*.md text
37+
*.markdown text
38+
39+
# These files are binary and should be left untouched
40+
# (binary is a macro for -text -diff)
41+
*.png binary
42+
*.jpg binary
43+
*.jpeg binary
44+
*.gif binary
45+
*.ico binary
46+
*.mov binary
47+
*.mp4 binary
48+
*.mp3 binary
49+
*.flv binary
50+
*.fla binary
51+
*.swf binary
52+
*.gz binary
53+
*.zip binary
54+
*.7z binary
55+
*.ttf binary
56+
*.pyc binary

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ When submitting a new issue, please supply the following information:
4343

4444
**Platform**: Place your platform here... give us your web browser/Electron version _and_ your hardware (Raspberry Pi 2/3/4, Windows, Mac, Linux, System V UNIX).
4545

46-
**Node Version**: Make sure it's version 14 or later (recommended is 16).
46+
**Node Version**: Make sure it's version 16 or later (recommended is 18).
4747

4848
**MagicMirror² Version**: Please let us know which version of MagicMirror² you are running. It can be found in the `package.json` file.
4949

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ When submitting a new issue, please supply the following information:
3131

3232
**Platform**: Place your platform here... give us your web browser/Electron version _and_ your hardware (Raspberry Pi 2/3/4, Windows, Mac, Linux, System V UNIX).
3333

34-
**Node Version**: Make sure it's version 14 or later (recommended is 16).
34+
**Node Version**: Make sure it's version 16 or later (recommended is 18).
3535

3636
**MagicMirror² Version**: Please let us know which version of MagicMirror² you are running. It can be found in the `package.json` file.
3737

.github/workflows/automated-tests.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
timeout-minutes: 30
1919
strategy:
2020
matrix:
21-
node-version: [14.x, 16.x, 18.x]
21+
node-version: [16.x, 18.x, 20.x]
2222
steps:
2323
- name: "Checkout code"
2424
uses: actions/checkout@v3
@@ -27,11 +27,13 @@ jobs:
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929
cache: "npm"
30-
- name: "Install dependencies and run tests"
30+
- name: "Install dependencies"
31+
run: |
32+
npm run install-mm:dev
33+
- name: "Run tests"
3134
run: |
3235
Xvfb :99 -screen 0 1024x768x16 &
3336
export DISPLAY=:99
34-
npm run install-mm:dev
3537
touch css/custom.css
3638
npm run test:prettier
3739
npm run test:js

.github/workflows/codecov-test-suites.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ jobs:
1919
steps:
2020
- name: "Checkout code"
2121
uses: actions/checkout@v3
22-
- name: "Install dependencies and run coverage"
22+
- name: "Install dependencies"
23+
run: |
24+
npm ci
25+
- name: "Run coverage"
2326
run: |
2427
Xvfb :99 -screen 0 1024x768x16 &
2528
export DISPLAY=:99
26-
npm ci
2729
touch css/custom.css
2830
npm run test:coverage
2931
- name: "Upload coverage results to codecov"

CHANGELOG.md

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,48 @@ This project adheres to [Semantic Versioning](https://semver.org/).
55

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

8+
## [2.24.0] - 2023-07-01
9+
10+
Thanks to: @angeldeejay, @bugsounet, @buxxi, @CarJem, @dariom, @DaveChild, @dWoolridge, @eddiehung, @grenagit, @Hirschberger, @ismarslomic, @JakeBinney, @KristjanESPERANTO, @MagMar94, @naveensrinivasan, @nfogal, @oscarb, @OWL4C, @psieg, @rajniszp, @retroflex, @SkySails and @tomzt
11+
12+
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!
13+
14+
### Added
15+
16+
- Added UV Index to hourly and current Weather, with support for Openmeteo
17+
- Added tests for serveronly
18+
- Set Timezone `Europe/Berlin` in unit tests (needed for new formatTime tests)
19+
- Added no-param-reassign eslint rule and fix warnings
20+
- updatenotification: Added `sendUpdatesNotifications` feature. Broadcast update with `UPDATES` notification to other modules
21+
- updatenotification: allow force scanning with `SCAN_UPDATES` notification from other modules
22+
- Added per-calendar fetchInterval
23+
24+
### Removed
25+
26+
- Removed unneeded (and unwanted) '.' after the year in calendar repeatingCountTitle (#2896, second attempt ...)
27+
28+
### Updated
29+
30+
- Added support for precipitation probability with openmeteo weather-provider
31+
- Update electron to v25.2 and other dependencies
32+
- Use node v20 in github workflow (replacing v14)
33+
- Refactor formatTime into common util function for default modules
34+
- Refactor some calendar methods into own class and added tests for them
35+
- Split install and run commands in github actions
36+
- Changed `fetchInterval` of calendar in `config.js.sample` to 7 days so we not to request example calendar too frequently
37+
- Changed default calendar fetchInterval to one hour
38+
- Changed calendar url in sample config
39+
40+
### Fixed
41+
42+
- Fix envcanada hourly forecast time (#3080)
43+
- Fix electron not running under windows after async changes (#3083)
44+
- Fix style issues after eslint-plugin-jsdoc update
45+
- Fix don't filter out ongoing full day events (#3095)
46+
- Fix date not shown when clock in analog mode (#3100)
47+
- Fix envcanada today percentage-of-precipitation (#3106)
48+
- Fix updatenotification where no branch is checked out but e.g. a version tag (#3130)
49+
850
## [2.23.0] - 2023-04-04
951

1052
Thanks to: @angeldeejay, @buxxi, @CarJem, @dariom, @DaveChild, @dWoolridge, @grenagit, @Hirschberger, @KristjanESPERANTO, @MagMar94, @naveensrinivasan, @nfogal, @psieg, @rajniszp, @retroflex, @SkySails and @tomzt.
@@ -16,17 +58,18 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
1658
- Added increments for hourly forecasts in weather module (#2996)
1759
- Added tests for hourly weather forecast
1860
- Added possibility to ignore MagicMirror repo in updatenotification module
19-
- Added Pirate Weather as new weather provider (#3005)
61+
- Added Pirate Weather as new weather-provider (#3005)
2062
- Added possibility to use your own templates in Alert module
2163
- Added error message if `<modulename>.js` file is missing in module folder to get a hint in the logs (#2403)
2264
- Added possibility to use environment variables in `config.js` (#1756)
2365
- Added option `pastDaysCount` to default calendar module to control of how many days past events should be displayed
2466
- Added thai language to alert module
2567
- Added option `sendNotifications` in clock module (#3056)
68+
- Added tests for some weather utils
2669

2770
### Removed
2871

29-
- Removed darksky weather provider
72+
- Removed darksky weather-provider
3073
- Removed unneeded (and unwanted) '.' after the year in calendar repeatingCountTitle (#2896)
3174

3275
### Updated
@@ -43,6 +86,7 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
4386
- Update Eslint config, add new rule and handle issue
4487
- Convert lots of callbacks to async/await
4588
- Revise require imports (#3071 and #3072)
89+
- Use `config.js-old` instead of file with timestamp suffix when backing up config with a `config.template` in use (#3104)
4690

4791
### Fixed
4892

@@ -73,12 +117,12 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
73117

74118
- Added new calendar options for colored entries and improved styling (#3033)
75119
- Added test for remoteFile option in compliments module
76-
- Added hourlyWeather functionality to Weather.gov weather provider
120+
- Added hourlyWeather functionality to Weather.gov weather-provider
77121
- Added css class names "today" and "tomorrow" for default calendar
78122
- Added Collaboration.md
79123
- Added new github action for dependency review (#2862)
80124
- Added a WeatherProvider for Open-Meteo
81-
- Added Yr as a weather provider
125+
- Added Yr as a weather-provider
82126
- Added config options "ignoreXOriginHeader" and "ignoreContentSecurityPolicy"
83127
- Added thai language
84128
- Added workflow rule to make sure PRs are based against develop
@@ -96,8 +140,8 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
96140
- Updated da translation
97141
- Rework weather module
98142
- Make sure smhi provider api only gets a maximum of 6 digits coordinates (#2955)
99-
- Use fetch instead of XMLHttpRequest in weatherprovider (#2935)
100-
- Reworked how weatherproviders handle units (#2849)
143+
- Use fetch instead of XMLHttpRequest in weather-provider (#2935)
144+
- Reworked how weather-providers handle units (#2849)
101145
- Use unix() method for parsing times, fix suntimes on the way (#2950)
102146
- Refactor conversion functions into utils class (#2958)
103147
- The `cors`-method in `server.js` now supports sending and receiving HTTP headers
@@ -107,7 +151,7 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
107151

108152
### Fixed
109153

110-
- Correctly show apparent temperature in SMHI weather provider
154+
- Correctly show apparent temperature in SMHI weather-provider
111155
- Ensure updatenotification module isn't shown when local is _ahead_ of remote
112156
- Handle node_helper errors during startup (#2944)
113157
- Possibility to change FontAwesome class in calendar, so icons like `fab fa-facebook-square` works.
@@ -126,7 +170,7 @@ Special thanks to: @BKeyport, @buxxi, @davide125, @khassel, @kolbyjack, @krukle,
126170
- Added possibility to fetch calendars through socket notifications.
127171
- New scripts `install-mm` (and `install-mm:dev`) for simplifying mm installation (now: `npm run install-mm`) and adding params `--no-audit --no-fund --no-update-notifier` for less noise.
128172
- New `showTimeToday` option in calendar module shows time for current-day events even if `timeFormat` is `"relative"`.
129-
- Added hourly forecasts, apparent temperature & custom location name to SMHI weather provider.
173+
- Added hourly forecasts, apparent temperature & custom location name to SMHI weather-provider.
130174
- Added new electron tests for calendar and moved some compliments tests from `e2e` to `electron` because of date mocking, removed mock stuff from compliments module.
131175

132176
### Removed
@@ -182,7 +226,7 @@ Special thanks to the following contributors: @10bias, @CFenner, @JHWelch, @k1rd
182226
- Added test for new weather forecast `absoluteDates` property.
183227
- The modules get a class hidden added/removed if they get hidden/shown which will also toggle pointer-events.
184228
- Added new config option `showTitleAsUrl` to newsfeed module. If set, the displayed title is a link to the article which is useful when running in a browser and you want to read this article.
185-
- Added internal cors proxy to get weather providers working without public proxies (fixes #2714). The new url `http(s)://address:port/cors?url=https://whatever-to-proxy` can be used in other modules too.
229+
- Added internal cors proxy to get weather-providers working without public proxies (fixes #2714). The new url `http(s)://address:port/cors?url=https://whatever-to-proxy` can be used in other modules too.
186230
- Added a WeatherProvider for Weatherflow.
187231
- Added new env var `ELECTRON_DISABLE_GPU` which disable gpu under electron if set (fixes #2831).
188232
- Added missing Czech translations.
@@ -276,7 +320,7 @@ Special thanks to the following contributors: @apiontek, @eouia, @jupadin, @khas
276320
- Updated jsdocs and print warnings during testing too.
277321
- Updated weathergov provider to try fetching not just current, but also foreacst, when API URLs available.
278322
- Refactored clock layout.
279-
- Refactored methods from weatherproviders into weatherobject (isDaytime, updateSunTime).
323+
- Refactored methods from weather-providers into weatherobject (isDaytime, updateSunTime).
280324
- Use of `logger.js` in jest tests.
281325
- Run prettier over all relevant files.
282326
- Move tests needing electron in new category `electron`, use `server only` mode in `e2e` tests.
@@ -374,7 +418,7 @@ Special thanks to the following contributors: @EdgardosReis, @MystaraTheGreat, @
374418
- Code cleanup for FEELS like and added {DEGREE} placeholder for FEELSLIKE for each language.
375419
- Converted newsfeed module to use templates.
376420
- Updated documentation and help screen about invalid config files.
377-
- Moving weather provider specific code and configuration into each provider and making hourly part of the interface.
421+
- Moving weather-provider specific code and configuration into each provider and making hourly part of the interface.
378422
- Bump electron to v11 and enable contextIsolation.
379423
- Don't update the DOM when a module is not displayed.
380424
- Cleaned up jsdoc and tests.
@@ -456,7 +500,7 @@ Special thanks to the following contributors: @Alvinger, @AndyPoms, @ashishtank,
456500
- Rename Greek translation to correct ISO 639-1 alpha-2 code (gr > el). (#2155)
457501
- Add a space after icons of sunrise and sunset. (#2169)
458502
- Fix calendar when no DTEND record found in event, startDate overlay when endDate set. (#2177)
459-
- Fix windspeed conversion error in ukmetoffice weather provider. (#2189)
503+
- Fix windspeed conversion error in ukmetoffice weather-provider. (#2189)
460504
- Fix console.debug not having timestamps. (#2199)
461505
- Fix calendar full day event east of UTC start time. (#2200)
462506
- Fix non-fullday recurring rule processing. (#2216)
@@ -685,7 +729,7 @@ Special thanks to @sdetweil for all his great contributions!
685729
- Use Feels Like temp from feed if present
686730
- Optionally display probability of precipitation (PoP) in current weather (UK Met Office data)
687731
- Automatically try to fix eslint errors by passing `--fix` option to it
688-
- Added sunrise and sunset times to weathergov weather provider [#1705](https://github.com/MichMich/MagicMirror/issues/1705)
732+
- Added sunrise and sunset times to weathergov weather-provider [#1705](https://github.com/MichMich/MagicMirror/issues/1705)
689733
- Added "useLocationAsHeader" to display "location" in `config.js` as header when location name is not returned
690734
- Added to `newsfeed.js`: in order to design the news article better with css, three more class-names were introduced: newsfeed-desc, newsfeed-desc, newsfeed-desc
691735

@@ -696,7 +740,7 @@ Special thanks to @sdetweil for all his great contributions!
696740
- Updated `ical.js` to solve various calendar issues.
697741
- Updated weather city list url [#1676](https://github.com/MichMich/MagicMirror/issues/1676)
698742
- Only update clock once per minute when seconds aren't shown
699-
- Updated weatherprovider documentation.
743+
- Updated weather-provider documentation.
700744

701745
### Fixed
702746

@@ -778,7 +822,7 @@ Fixed `package.json` version number.
778822
- Added fade, fadePoint and maxNumberOfDays properties to the forecast mode [#1516](https://github.com/MichMich/MagicMirror/issues/1516)
779823
- Fixed Loading string and decimalSymbol string replace [#1538](https://github.com/MichMich/MagicMirror/issues/1538)
780824
- Show Snow amounts in new weather module [#1545](https://github.com/MichMich/MagicMirror/issues/1545)
781-
- Added weather.gov as a new weather provider for US locations
825+
- Added weather.gov as a new weather-provider for US locations
782826

783827
## [2.6.0] - 2019-01-01
784828

clientonly/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
/**
1212
* Get command line parameters
1313
* Assumes that a cmdline parameter is defined with `--key [value]`
14-
*
1514
* @param {string} key key to look for at the command line
1615
* @param {string} defaultValue value if no key is given at the command line
1716
* @returns {string} the value of the parameter
@@ -33,7 +32,6 @@
3332

3433
/**
3534
* Gets the config from the specified server url
36-
*
3735
* @param {string} url location where the server is running.
3836
* @returns {Promise} the config
3937
*/
@@ -63,7 +61,6 @@
6361

6462
/**
6563
* Print a message to the console in case of errors
66-
*
6764
* @param {string} message error message to print
6865
* @param {number} code error code for the exit call
6966
*/

config/config.js.sample

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ let config = {
5555
config: {
5656
calendars: [
5757
{
58+
fetchInterval: 7 * 24 * 60 * 60 * 1000,
5859
symbol: "calendar-check",
59-
url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
60+
url: "https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics"
6061
}
6162
]
6263
}

jest.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,24 @@ module.exports = async () => {
66
projects: [
77
{
88
displayName: "unit",
9+
globalSetup: "<rootDir>/tests/unit/helpers/global-setup.js",
910
moduleNameMapper: {
1011
logger: "<rootDir>/js/logger.js"
1112
},
1213
testMatch: ["**/tests/unit/**/*.[jt]s?(x)"],
13-
testPathIgnorePatterns: ["<rootDir>/tests/unit/mocks"]
14+
testPathIgnorePatterns: ["<rootDir>/tests/unit/mocks", "<rootDir>/tests/unit/helpers"]
1415
},
1516
{
1617
displayName: "electron",
1718
testMatch: ["**/tests/electron/**/*.[jt]s?(x)"],
18-
testPathIgnorePatterns: ["<rootDir>/tests/electron/helpers/"]
19+
testPathIgnorePatterns: ["<rootDir>/tests/electron/helpers"]
1920
},
2021
{
2122
displayName: "e2e",
2223
setupFilesAfterEnv: ["<rootDir>/tests/e2e/helpers/mock-console.js"],
2324
testMatch: ["**/tests/e2e/**/*.[jt]s?(x)"],
2425
modulePaths: ["<rootDir>/js/"],
25-
testPathIgnorePatterns: ["<rootDir>/tests/e2e/helpers/", "<rootDir>/tests/e2e/mocks"]
26+
testPathIgnorePatterns: ["<rootDir>/tests/e2e/helpers", "<rootDir>/tests/e2e/mocks"]
2627
}
2728
],
2829
collectCoverageFrom: ["./clientonly/**/*.js", "./js/**/*.js", "./modules/default/**/*.js", "./serveronly/**/*.js"],

0 commit comments

Comments
 (0)