Skip to content

Commit a6cbc9f

Browse files
authored
Merge pull request #2761 from MichMich/develop
release v2.18.0
2 parents 222a5f3 + be073da commit a6cbc9f

File tree

75 files changed

+4390
-7703
lines changed

Some content is hidden

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

75 files changed

+4390
-7703
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"parserOptions": {
1818
"sourceType": "module",
19-
"ecmaVersion": 2017,
19+
"ecmaVersion": 2018,
2020
"ecmaFeatures": {
2121
"globalReturn": true
2222
}

.github/CONTRIBUTING.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ Thanks for contributing to MagicMirror²!
44

55
We hold our code to standard, and these standards are documented below.
66

7+
## Linters
8+
79
If you wish to run our linters, use `npm run lint` without any arguments.
810

911
### JavaScript: Run ESLint
1012

1113
We use [ESLint](https://eslint.org) on our JavaScript files.
1214

13-
Our ESLint configuration is in our .eslintrc.json and .eslintignore files.
15+
Our ESLint configuration is in our `.eslintrc.json` and `.eslintignore` files.
1416

1517
To run ESLint, use `npm run lint:js`.
1618

@@ -20,7 +22,15 @@ We use [StyleLint](https://stylelint.io) to lint our CSS. Our configuration is i
2022

2123
To run StyleLint, use `npm run lint:css`.
2224

23-
### Submitting Issues
25+
## Testing
26+
27+
We use [Jest](https://jestjs.io) for JavaScript testing.
28+
29+
To run all tests, use `npm run test`.
30+
31+
The specific test commands are defined in `package.json`. So you can also run the specific tests with other commands, e.g. `npm run test:unit` or `npx jest tests/e2e/env_spec.js`.
32+
33+
## Submitting Issues
2434

2535
Please only submit reproducible issues.
2636

@@ -32,7 +42,7 @@ When submitting a new issue, please supply the following information:
3242

3343
**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).
3444

35-
**Node Version**: Make sure it's version 12 or later (recommended is 14).
45+
**Node Version**: Make sure it's version 14 or later (recommended is 16).
3646

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

.github/ISSUE_TEMPLATE.md

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

3434
**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).
3535

36-
**Node Version**: Make sure it's version 12 or later (recommended is 14).
36+
**Node Version**: Make sure it's version 14 or later (recommended is 16).
3737

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

.github/workflows/automated-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ jobs:
1515
timeout-minutes: 30
1616
strategy:
1717
matrix:
18-
node-version: [12.x, 14.x, 16.x]
18+
node-version: [14.x, 16.x, 17.x]
1919
steps:
2020
- name: Checkout code
2121
uses: actions/checkout@v2
2222
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
23+
uses: actions/setup-node@v2
2424
with:
2525
node-version: ${{ matrix.node-version }}
26+
cache: "npm"
2627
- name: Install dependencies and run tests
2728
run: |
2829
Xvfb :99 -screen 0 1024x768x16 &

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
touch css/custom.css
2424
npm run test:coverage
2525
- name: Upload coverage results to codecov
26-
uses: codecov/codecov-action@v1
26+
uses: codecov/codecov-action@v2
2727
with:
28-
file: ./coverage/lcov.info
28+
files: ./coverage/lcov.info
2929
fail_ci_if_error: true

.github/workflows/enforce-changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v2
1616
- name: Enforce changelog️
17-
uses: dangoslen/changelog-enforcer@v1.6.1
17+
uses: dangoslen/changelog-enforcer@v2
1818
with:
1919
changeLogPath: "CHANGELOG.md"
2020
skipLabels: "Skip Changelog"

CHANGELOG.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,55 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
55

6-
❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/donate) With your help we can continue to improve the MagicMirror²
6+
❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/donate) With your help we can continue to improve the MagicMirror².
7+
8+
## [2.18.0] - 2022-01-01
9+
10+
Special thanks to the following contributors: @AmpioRosso, @eouia, @fewieden, @jupadin, @khassel, @kolbyjack, @KristjanESPERANTO, @MariusVaice, @rejas, @rico24 and @sdetweil.
11+
12+
### Added
13+
14+
- Added test for calendar recurring event with checks the correct date displayed (related to #2752).
15+
16+
### Updated
17+
18+
- ESLint version supports now ECMAScript 2018.
19+
- Cleaned up `updatenotification` module and switched to nunjuck template.
20+
- Moved calendar tests from category `electron` to `e2e`.
21+
- Update missed translations for Korean language (ko.json).
22+
- Update missed translations for Dutch language (nl.json).
23+
- Cleaned up `alert` module and switched to nunjuck template.
24+
- Moved weather tests from category `electron` to `e2e`.
25+
- Updated github actions.
26+
- Replace spectron with playwright, update dependencies including electron update to v16.
27+
- Added lithuanian language to translations.js.
28+
- Show info message if newsfeed is empty (fixes #2731).
29+
- Added dangerouslyDisableAutoEscaping config option for newsfeed templates (fixes #2712).
30+
- Added missing shebang to `installers/mm.sh`.
31+
- Node versions in templates and github workflows.
32+
33+
### Fixed
34+
35+
- Fixed wrong file `kr.json` to `ko.json`. Use language code 'ko' instead of 'kr' for Korean language.
36+
- Fixed `feels_like` data from openweathermaps current weather being ignored (#2678).
37+
- Fixed chaotic newsfeed display after network connection loss thanks to @jalibu (#2638).
38+
- Fixed incorrect time zone correction of recurring full day events (#2632 and #2634).
39+
- Fixed e2e tests by increasing testTimeout.
40+
- Revert node-ical update due to missing luxon package.
41+
- Fixed User-Agent-Header for newsfeed and calendar module (#2729).
42+
- Replace broken shields in Readme and use https for links.
43+
- Fixed electron tests with retry.
44+
- Fixed Calendar recurring cross timezone error (add/subtract a day, not just offset hours) (#2632).
45+
- Fixed Calendar showEnd and Full Date overlay (#2629).
46+
- Fixed regression on #2632, #2752.
47+
- Broadcast custom symbols in CALENDAR_EVENTS.
748

849
## [2.17.1] - 2021-10-01
950

1051
### Fixed
1152

1253
- Fixed error when accessing letsencrypt certificates
54+
- Fixed Calendar module enhancement: displaying full events without time (#2424)
1355

1456
## [2.17.0] - 2021-10-01
1557

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
![MagicMirror²: The open source modular smart mirror platform. ](.github/header.png)
22

33
<p style="text-align: center">
4-
<a href="https://david-dm.org/MichMich/MagicMirror"><img src="https://david-dm.org/MichMich/MagicMirror.svg" alt="Dependency Status"></a>
5-
<a href="https://david-dm.org/MichMich/MagicMirror?type=dev"><img src="https://david-dm.org/MichMich/MagicMirror/dev-status.svg" alt="devDependency Status"></a>
6-
<a href="https://bestpractices.coreinfrastructure.org/projects/347"><img src="https://bestpractices.coreinfrastructure.org/projects/347/badge" alt="CLI Best Practices"></a>
7-
<a href="https://codecov.io/gh/MichMich/MagicMirror"><img src="https://codecov.io/gh/MichMich/MagicMirror/branch/master/graph/badge.svg?token=LEG1KitZR6" alt="CodeCov Status"/></a>
8-
<a href="https://choosealicense.com/licenses/mit"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
9-
<a href="https://github.com/MichMich/MagicMirror/actions?query=workflow%3A%22Automated+Tests%22"><img src="https://github.com/MichMich/MagicMirror/workflows/Automated%20Tests/badge.svg" alt="Tests"></a>
4+
<a href="https://choosealicense.com/licenses/mit">
5+
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
6+
</a>
7+
<img src="https://img.shields.io/github/workflow/status/michmich/magicmirror/Run%20Automated%20Tests" alt="GitHub Actions">
8+
<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>
12+
<a href="https://github.com/MichMich/MagicMirror">
13+
<img src="https://img.shields.io/github/stars/michmich/magicmirror?style=social">
14+
</a>
1015
</p>
1116

1217
**MagicMirror²** is an open source modular smart mirror platform. With a growing list of installable modules, the **MagicMirror²** allows you to convert your hallway or bathroom mirror into your personal assistant. **MagicMirror²** is built by the creator of [the original MagicMirror](https://michaelteeuw.nl/tagged/magicmirror) with the incredible help of a [growing community of contributors](https://github.com/MichMich/MagicMirror/graphs/contributors).

installers/mm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
# This file is still here to keep PM2 working on older installations.
23
cd ~/MagicMirror
34
DISPLAY=:0 npm start

js/electron.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function createWindow() {
5353
// If config.address is not defined or is an empty string (listening on all interfaces), connect to localhost
5454

5555
let prefix;
56-
if (config["tls"] !== null && config["tls"]) {
56+
if ((config["tls"] !== null && config["tls"]) || config.useHttps) {
5757
prefix = "https://";
5858
} else {
5959
prefix = "http://";
@@ -140,6 +140,13 @@ app.on("before-quit", (event) => {
140140
process.exit(0);
141141
});
142142

143+
/* handle errors from self signed certificates */
144+
145+
app.on("certificate-error", (event, webContents, url, error, certificate, callback) => {
146+
event.preventDefault();
147+
callback(true);
148+
});
149+
143150
// Start the core application if server is run on localhost
144151
// This starts all node helpers and starts the webserver.
145152
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].includes(config.address)) {

0 commit comments

Comments
 (0)