Skip to content

Commit 8c0e7db

Browse files
MichMichkhasselSkySailsrejasveeck
authored
Release 2.26.0 (#3319)
## [2.26.0] - 01-01-2024 Thanks to: @bnitkin, @bugsounet, @dependabot, @jkriegshauser, @kaennchenstruggle, @KristjanESPERANTO 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 also marks the latest release by Michael Teeuw. For more info, please read the following post: [A New Chapter for MagicMirror: The Community Takes the Lead](https://forum.magicmirror.builders/topic/18329/a-new-chapter-for-magicmirror-the-community-takes-the-lead). ### Added - Added update notification updater (for 3rd party modules) - Added node 21 to the test matrix - Added transform object to calendar:customEvents - Added ESLint rules for jest (including jest/expect-expect and jest/no-done-callback) ### Removed - Removed Codecov workflow (not working anymore, other workflow required) (#3107) - Removed titleReplace from calendar, replaced + extended by customEvents (backward compatibility included) (#3249) - Removed failing unit test (#3254) - Removed some unused variables ### Updated - Update electron to v27 and update other dependencies as well as github actions - Update newsfeed: Use `html-to-text` instead of regex for transform description - Review ESLint config (#3269) - Updated dependencies - Clock module: optionally display current moon phase in addition to rise/set times - electron is now per default started without gpu, if needed it must be enabled with new env var `ELECTRON_ENABLE_GPU=1` on startup (#3226) - Replace prettier by stylistic in ESLint config to lint JavaScript (and disable some rules for `config/config.js*` files) - Update node-ical to v0.17.1 and fix tests ### Fixed - Avoid fade out/in on updateDom when many calendars are used - Fix the option eventClass on customEvents. - Fix yr API version in locationforecast and sunrise call (#3227) - Fix cloneObject() function to respect RegExp (#3237) - Fix newsfeed module for feeds using "a10:updated" tag (#3238) - Fix issue template (#3167) - Fix #3256 filter out bad results from rrule.between - Fix calendar events sometimes not respecting deleted events (#3250) - Fix electron loadurl locally on Windows when address "0.0.0.0" (#2550) - Fix updatanotification (update_helper.js): catch error if reponse is not an JSON format (check PM2) - Fix missing typeof in calendar module - Fix style issues after prettier update - Fix calendar test (#3291) by moving "Exdate check" from e2e to electron to run on a Thursday - Fix calendar config params `fetchInterval` and `excludedEvents` were never used from single calendar config (#3297) - Fix MM_PORT variable not used in electron and allow full path for MM_CONFIG_FILE variable (#3302) --------- 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> Co-authored-by: Knapoc <[email protected]> Co-authored-by: sam detweiler <[email protected]> Co-authored-by: veeck <[email protected]> Co-authored-by: Paranoid93 <[email protected]> Co-authored-by: NolanKingdon <[email protected]> Co-authored-by: J. Kenzal Hunter <[email protected]> Co-authored-by: Teddy <[email protected]> Co-authored-by: TeddyStarinvest <[email protected]> Co-authored-by: martingron <[email protected]> Co-authored-by: dgoth <[email protected]> Co-authored-by: kaennchenstruggle <[email protected]> Co-authored-by: jkriegshauser <[email protected]> Co-authored-by: Ben Nitkin <[email protected]>
1 parent 343e7de commit 8c0e7db

File tree

110 files changed

+3450
-2932
lines changed

Some content is hidden

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

110 files changed

+3450
-2932
lines changed

.eslintrc.json

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"extends": ["eslint:recommended", "plugin:prettier/recommended", "plugin:jsdoc/recommended"],
3-
"plugins": ["prettier", "import", "jsdoc", "jest"],
2+
"extends": ["eslint:recommended", "plugin:@stylistic/all-extends", "plugin:import/recommended", "plugin:jest/recommended", "plugin:jsdoc/recommended"],
3+
"plugins": [],
44
"env": {
55
"browser": true,
6-
"es2022": true,
6+
"es2023": true,
77
"jest/globals": true,
88
"node": true
99
},
@@ -16,19 +16,68 @@
1616
},
1717
"parserOptions": {
1818
"sourceType": "module",
19-
"ecmaVersion": 2022,
19+
"ecmaVersion": 2023,
2020
"ecmaFeatures": {
2121
"globalReturn": true
2222
}
2323
},
2424
"rules": {
2525
"eqeqeq": "error",
2626
"import/order": "error",
27+
"import/extensions": "error",
28+
"import/newline-after-import": "error",
29+
"jest/consistent-test-it": "warn",
30+
"jest/expect-expect": "warn",
31+
"jest/no-done-callback": "warn",
32+
"jest/prefer-expect-resolves": "warn",
33+
"jest/prefer-mock-promise-shorthand": "warn",
34+
"jest/prefer-to-be": "warn",
35+
"jest/prefer-to-have-length": "warn",
2736
"no-param-reassign": "error",
2837
"no-prototype-builtins": "off",
2938
"no-throw-literal": "error",
3039
"no-unused-vars": "off",
3140
"no-useless-return": "error",
32-
"prefer-template": "error"
33-
}
41+
"object-shorthand": ["error", "methods"],
42+
"prefer-template": "error",
43+
"@stylistic/array-element-newline": ["error", "consistent"],
44+
"@stylistic/arrow-parens": ["error", "always"],
45+
"@stylistic/brace-style": "off",
46+
"@stylistic/comma-dangle": ["error", "never"],
47+
"@stylistic/dot-location": ["error", "property"],
48+
"@stylistic/function-call-argument-newline": ["error", "consistent"],
49+
"@stylistic/function-paren-newline": ["error", "consistent"],
50+
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
51+
"@stylistic/max-statements-per-line": ["error", { "max": 2 }],
52+
"@stylistic/multiline-ternary": ["error", "always-multiline"],
53+
"@stylistic/newline-per-chained-call": ["error", { "ignoreChainWithDepth": 4 }],
54+
"@stylistic/no-extra-parens": "off",
55+
"@stylistic/no-tabs": "off",
56+
"@stylistic/object-curly-spacing": ["error", "always"],
57+
"@stylistic/object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
58+
"@stylistic/operator-linebreak": ["error", "before"],
59+
"@stylistic/padded-blocks": "off",
60+
"@stylistic/quote-props": ["error", "as-needed"],
61+
"@stylistic/quotes": ["error", "double"],
62+
"@stylistic/indent": ["error", "tab"],
63+
"@stylistic/semi": ["error", "always"],
64+
"@stylistic/space-before-function-paren": ["error", "always"],
65+
"@stylistic/spaced-comment": "off"
66+
},
67+
"overrides": [
68+
{
69+
"files": ["config/config.js*"],
70+
"rules": {
71+
"@stylistic/comma-dangle": "off",
72+
"@stylistic/indent": "off",
73+
"@stylistic/no-multi-spaces": "off"
74+
}
75+
},
76+
{
77+
"files": ["tests/configs/modules/weather/*.js"],
78+
"rules": {
79+
"@stylistic/quotes": "off"
80+
}
81+
}
82+
]
3483
}

.github/ISSUE_TEMPLATE/custom.md renamed to .github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Hello and thank you for opening an issue.
22

3-
**Please make sure that you have read the following lines before submitting your Issue:**
3+
**⚠️ Please make sure that you have read the following lines before submitting your Issue:**
44

55
## I'm not sure if this is a bug
66

.github/workflows/automated-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
timeout-minutes: 30
1919
strategy:
2020
matrix:
21-
node-version: [18.x, 20.x]
21+
node-version: [18.x, 20.x, 21.x]
2222
steps:
2323
- name: "Checkout code"
2424
uses: actions/checkout@v4
2525
- name: "Use Node.js ${{ matrix.node-version }}"
26-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929
cache: "npm"

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

Lines changed: 0 additions & 35 deletions
This file was deleted.

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
*.js
2+
.prettierignore
13
/config
24
/coverage
35
package-lock.json
6+
**.ics

CHANGELOG.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,57 @@ 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.26.0] - 01-01-2024
9+
10+
Thanks to: @bnitkin, @bugsounet, @dependabot, @jkriegshauser, @kaennchenstruggle, @KristjanESPERANTO and @Ybbet.
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+
This release also marks the latest release by Michael Teeuw. For more info, please read the following post: [A New Chapter for MagicMirror: The Community Takes the Lead](https://forum.magicmirror.builders/topic/18329/a-new-chapter-for-magicmirror-the-community-takes-the-lead).
15+
16+
### Added
17+
18+
- Added update notification updater (for 3rd party modules)
19+
- Added node 21 to the test matrix
20+
- Added transform object to calendar:customEvents
21+
- Added ESLint rules for jest (including jest/expect-expect and jest/no-done-callback)
22+
23+
### Removed
24+
25+
- Removed Codecov workflow (not working anymore, other workflow required) (#3107)
26+
- Removed titleReplace from calendar, replaced + extended by customEvents (backward compatibility included) (#3249)
27+
- Removed failing unit test (#3254)
28+
- Removed some unused variables
29+
30+
### Updated
31+
32+
- Update electron to v27 and update other dependencies as well as github actions
33+
- Update newsfeed: Use `html-to-text` instead of regex for transform description
34+
- Review ESLint config (#3269)
35+
- Updated dependencies
36+
- Clock module: optionally display current moon phase in addition to rise/set times
37+
- electron is now per default started without gpu, if needed it must be enabled with new env var `ELECTRON_ENABLE_GPU=1` on startup (#3226)
38+
- Replace prettier by stylistic in ESLint config to lint JavaScript (and disable some rules for `config/config.js*` files)
39+
- Update node-ical to v0.17.1 and fix tests
40+
41+
### Fixed
42+
43+
- Avoid fade out/in on updateDom when many calendars are used
44+
- Fix the option eventClass on customEvents.
45+
- Fix yr API version in locationforecast and sunrise call (#3227)
46+
- Fix cloneObject() function to respect RegExp (#3237)
47+
- Fix newsfeed module for feeds using "a10:updated" tag (#3238)
48+
- Fix issue template (#3167)
49+
- Fix #3256 filter out bad results from rrule.between
50+
- Fix calendar events sometimes not respecting deleted events (#3250)
51+
- Fix electron loadurl locally on Windows when address "0.0.0.0" (#2550)
52+
- Fix updatanotification (update_helper.js): catch error if reponse is not an JSON format (check PM2)
53+
- Fix missing typeof in calendar module
54+
- Fix style issues after prettier update
55+
- Fix calendar test (#3291) by moving "Exdate check" from e2e to electron to run on a Thursday
56+
- Fix calendar config params `fetchInterval` and `excludedEvents` were never used from single calendar config (#3297)
57+
- Fix MM_PORT variable not used in electron and allow full path for MM_CONFIG_FILE variable (#3302)
58+
859
## [2.25.0] - 2023-10-01
960

1061
Thanks to: @bugsounet, @dgoth, @dependabot, @kenzal, @Knapoc, @KristjanESPERANTO, @martingron, @NolanKingdon, @Paranoid93, @TeddyStarinvest and @Ybbet.
@@ -37,7 +88,7 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
3788
- Update issue template
3889
- Update dev/dependencies incl. electron to v26
3990
- Replace pretty-quick by lint-staged (<https://github.com/azz/pretty-quick/issues/164>)
40-
- Update engine node >=18. v16 reached it's end of life. (#3170)
91+
- Update engine node >=18. v16 reached its end of life. (#3170)
4192
- Update typescript definition for modules
4293
- Cleaned up nunjuck templates
4394
- Replace `node-fetch` with internal fetch (#2649) and remove `digest-fetch`
@@ -50,7 +101,7 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
50101
- Fix engine check on npm install (#3135)
51102
- Fix undefined formatTime method in clock module (#3143)
52103
- Fix clientonly startup fails after async added (#3151)
53-
- Fix electron width/heigth when using xrandr under bullseye
104+
- Fix electron width/height when using xrandr under bullseye
54105
- Fix time issue with certain recurring events in calendar module
55106
- Fix ipWhiteList test (#3179)
56107
- Fix newsfeed: Convert HTML entities, codes and tag in description (#3191)
@@ -59,6 +110,7 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
59110
- Fix `Uncaught SyntaxError: Identifier 'getCorsUrl' has already been declared (at utils.js:1:1)` when using `clock` and `weather` module (#3204)
60111
- Fix overriding `config.js` when running tests (#3201)
61112
- Fix issue in weathergov provider with probability of precipitation not showing up on hourly or daily forecast
113+
- Fix yr weather provider after changes in yr API (#3189)
62114

63115
## [2.24.0] - 2023-07-01
64116

@@ -101,7 +153,6 @@ Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not al
101153
- Fix date not shown when clock in analog mode (#3100)
102154
- Fix envcanada today percentage-of-precipitation (#3106)
103155
- Fix updatenotification where no branch is checked out but e.g. a version tag (#3130)
104-
- Fix yr weather provider after changes in yr API (#3189)
105156

106157
## [2.23.0] - 2023-04-04
107158

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
</a>
77
<img src="https://img.shields.io/github/actions/workflow/status/michmich/magicmirror/automated-tests.yaml" alt="GitHub Actions">
88
<img src="https://img.shields.io/github/checks-status/michmich/magicmirror/master" alt="Build Status">
9-
<a href="https://codecov.io/gh/MichMich/MagicMirror">
10-
<img src="https://codecov.io/gh/MichMich/MagicMirror/branch/master/graph/badge.svg?token=LEG1KitZR6" alt="CodeCov Status"/>
11-
</a>
129
<a href="https://github.com/MichMich/MagicMirror">
1310
<img src="https://img.shields.io/github/stars/michmich/magicmirror?style=social">
1411
</a>

clientonly/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
/**
88
* Helper function to get server address/hostname from either the commandline or env
99
*/
10-
function getServerAddress() {
10+
function getServerAddress () {
11+
1112
/**
1213
* Get command line parameters
1314
* Assumes that a cmdline parameter is defined with `--key [value]`
1415
* @param {string} key key to look for at the command line
1516
* @param {string} defaultValue value if no key is given at the command line
1617
* @returns {string} the value of the parameter
1718
*/
18-
function getCommandLineParameter(key, defaultValue = undefined) {
19+
function getCommandLineParameter (key, defaultValue = undefined) {
1920
const index = process.argv.indexOf(`--${key}`);
2021
const value = index > -1 ? process.argv[index + 1] : undefined;
2122
return value !== undefined ? String(value) : defaultValue;
@@ -35,7 +36,7 @@
3536
* @param {string} url location where the server is running.
3637
* @returns {Promise} the config
3738
*/
38-
function getServerConfig(url) {
39+
function getServerConfig (url) {
3940
// Return new pending promise
4041
return new Promise((resolve, reject) => {
4142
// Select http or https module, depending on requested url
@@ -64,7 +65,7 @@
6465
* @param {string} message error message to print
6566
* @param {number} code error code for the exit call
6667
*/
67-
function fail(message, code = 1) {
68+
function fail (message, code = 1) {
6869
if (message !== undefined && typeof message === "string") {
6970
console.log(message);
7071
} else {
@@ -121,4 +122,4 @@
121122
} else {
122123
fail();
123124
}
124-
})();
125+
}());

config/config.js.sample

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ let config = {
1818
// - "0.0.0.0", "::" to listen on any interface
1919
// Default, when address config is left out or empty, is "localhost"
2020
port: 8080,
21-
basePath: "/", // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
22-
// you must set the sub path here. basePath must end with a /
21+
basePath: "/", // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
22+
// you must set the sub path here. basePath must end with a /
2323
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
24-
// or add a specific IPv4 of 192.168.1.5 :
25-
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
26-
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
27-
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
24+
// or add a specific IPv4 of 192.168.1.5 :
25+
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
26+
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
27+
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
2828

29-
useHttps: false, // Support HTTPS or not, default "false" will use HTTP
30-
httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
31-
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
29+
useHttps: false, // Support HTTPS or not, default "false" will use HTTP
30+
httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
31+
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
3232

3333
language: "en",
3434
locale: "en-US",
@@ -109,4 +109,4 @@ let config = {
109109
};
110110

111111
/*************** DO NOT EDIT THE LINE BELOW ***************/
112-
if (typeof module !== "undefined") {module.exports = config;}
112+
if (typeof module !== "undefined") { module.exports = config; }

fonts/package-lock.json

Lines changed: 5 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)