Skip to content

Commit

Permalink
Merge pull request #2761 from MichMich/develop
Browse files Browse the repository at this point in the history
release v2.18.0
  • Loading branch information
MichMich committed Jan 1, 2022
2 parents 222a5f3 + be073da commit a6cbc9f
Show file tree
Hide file tree
Showing 75 changed files with 4,390 additions and 7,703 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2017,
"ecmaVersion": 2018,
"ecmaFeatures": {
"globalReturn": true
}
Expand Down
16 changes: 13 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ Thanks for contributing to MagicMirror²!

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

## Linters

If you wish to run our linters, use `npm run lint` without any arguments.

### JavaScript: Run ESLint

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

Our ESLint configuration is in our .eslintrc.json and .eslintignore files.
Our ESLint configuration is in our `.eslintrc.json` and `.eslintignore` files.

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

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

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

### Submitting Issues
## Testing

We use [Jest](https://jestjs.io) for JavaScript testing.

To run all tests, use `npm run test`.

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`.

## Submitting Issues

Please only submit reproducible issues.

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

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ When submitting a new issue, please supply the following information:

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

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

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

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x, 17.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies and run tests
run: |
Xvfb :99 -screen 0 1024x768x16 &
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codecov-test-suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
touch css/custom.css
npm run test:coverage
- name: Upload coverage results to codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
with:
file: ./coverage/lcov.info
files: ./coverage/lcov.info
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/enforce-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Enforce changelog️
uses: dangoslen/changelog-enforcer@v1.6.1
uses: dangoslen/changelog-enforcer@v2
with:
changeLogPath: "CHANGELOG.md"
skipLabels: "Skip Changelog"
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,55 @@
All notable changes to this project will be documented in this file.
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²
❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/donate) With your help we can continue to improve the MagicMirror².

## [2.18.0] - 2022-01-01

Special thanks to the following contributors: @AmpioRosso, @eouia, @fewieden, @jupadin, @khassel, @kolbyjack, @KristjanESPERANTO, @MariusVaice, @rejas, @rico24 and @sdetweil.

### Added

- Added test for calendar recurring event with checks the correct date displayed (related to #2752).

### Updated

- ESLint version supports now ECMAScript 2018.
- Cleaned up `updatenotification` module and switched to nunjuck template.
- Moved calendar tests from category `electron` to `e2e`.
- Update missed translations for Korean language (ko.json).
- Update missed translations for Dutch language (nl.json).
- Cleaned up `alert` module and switched to nunjuck template.
- Moved weather tests from category `electron` to `e2e`.
- Updated github actions.
- Replace spectron with playwright, update dependencies including electron update to v16.
- Added lithuanian language to translations.js.
- Show info message if newsfeed is empty (fixes #2731).
- Added dangerouslyDisableAutoEscaping config option for newsfeed templates (fixes #2712).
- Added missing shebang to `installers/mm.sh`.
- Node versions in templates and github workflows.

### Fixed

- Fixed wrong file `kr.json` to `ko.json`. Use language code 'ko' instead of 'kr' for Korean language.
- Fixed `feels_like` data from openweathermaps current weather being ignored (#2678).
- Fixed chaotic newsfeed display after network connection loss thanks to @jalibu (#2638).
- Fixed incorrect time zone correction of recurring full day events (#2632 and #2634).
- Fixed e2e tests by increasing testTimeout.
- Revert node-ical update due to missing luxon package.
- Fixed User-Agent-Header for newsfeed and calendar module (#2729).
- Replace broken shields in Readme and use https for links.
- Fixed electron tests with retry.
- Fixed Calendar recurring cross timezone error (add/subtract a day, not just offset hours) (#2632).
- Fixed Calendar showEnd and Full Date overlay (#2629).
- Fixed regression on #2632, #2752.
- Broadcast custom symbols in CALENDAR_EVENTS.

## [2.17.1] - 2021-10-01

### Fixed

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

## [2.17.0] - 2021-10-01

Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
![MagicMirror²: The open source modular smart mirror platform. ](.github/header.png)

<p style="text-align: center">
<a href="https://david-dm.org/MichMich/MagicMirror"><img src="https://david-dm.org/MichMich/MagicMirror.svg" alt="Dependency Status"></a>
<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>
<a href="https://bestpractices.coreinfrastructure.org/projects/347"><img src="https://bestpractices.coreinfrastructure.org/projects/347/badge" alt="CLI Best Practices"></a>
<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>
<a href="https://choosealicense.com/licenses/mit"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
<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>
<a href="https://choosealicense.com/licenses/mit">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
</a>
<img src="https://img.shields.io/github/workflow/status/michmich/magicmirror/Run%20Automated%20Tests" alt="GitHub Actions">
<img src="https://img.shields.io/github/checks-status/michmich/magicmirror/master" alt="Build Status">
<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>
<a href="https://github.com/MichMich/MagicMirror">
<img src="https://img.shields.io/github/stars/michmich/magicmirror?style=social">
</a>
</p>

**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).
Expand Down
1 change: 1 addition & 0 deletions installers/mm.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# This file is still here to keep PM2 working on older installations.
cd ~/MagicMirror
DISPLAY=:0 npm start
9 changes: 8 additions & 1 deletion js/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function createWindow() {
// If config.address is not defined or is an empty string (listening on all interfaces), connect to localhost

let prefix;
if (config["tls"] !== null && config["tls"]) {
if ((config["tls"] !== null && config["tls"]) || config.useHttps) {
prefix = "https://";
} else {
prefix = "http://";
Expand Down Expand Up @@ -140,6 +140,13 @@ app.on("before-quit", (event) => {
process.exit(0);
});

/* handle errors from self signed certificates */

app.on("certificate-error", (event, webContents, url, error, certificate, callback) => {
event.preventDefault();
callback(true);
});

// Start the core application if server is run on localhost
// This starts all node helpers and starts the webserver.
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].includes(config.address)) {
Expand Down
Loading

0 comments on commit a6cbc9f

Please sign in to comment.