Merge branch 'develop' into test-updates

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Karsten Hassel 2021-10-20 21:22:12 +02:00
commit 3a0a02d3ba
8 changed files with 40 additions and 35 deletions

View File

@ -20,9 +20,10 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies and run tests - name: Install dependencies and run tests
run: | run: |
Xvfb :99 -screen 0 1024x768x16 & Xvfb :99 -screen 0 1024x768x16 &

View File

@ -23,7 +23,7 @@ jobs:
touch css/custom.css touch css/custom.css
npm run test:coverage npm run test:coverage
- name: Upload coverage results to codecov - name: Upload coverage results to codecov
uses: codecov/codecov-action@v1 uses: codecov/codecov-action@v2
with: with:
file: ./coverage/lcov.info files: ./coverage/lcov.info
fail_ci_if_error: true fail_ci_if_error: true

View File

@ -14,7 +14,7 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Enforce changelog - name: Enforce changelog
uses: dangoslen/changelog-enforcer@v1.6.1 uses: dangoslen/changelog-enforcer@v2
with: with:
changeLogPath: "CHANGELOG.md" changeLogPath: "CHANGELOG.md"
skipLabels: "Skip Changelog" skipLabels: "Skip Changelog"

View File

@ -19,11 +19,14 @@ _This release is scheduled to be released on 2022-01-01._
- Update missed translations for Korean language (ko.json) - Update missed translations for Korean language (ko.json)
- Cleaned up `alert` module and switched to nunjuck template. - Cleaned up `alert` module and switched to nunjuck template.
- Moved weather tests from category `electron` to `e2e`. - Moved weather tests from category `electron` to `e2e`.
- Updated github actions.
### Fixed ### Fixed
- Fixed wrong file `kr.json` to `ko.json`. Use language code 'ko' instead of 'kr' for Korean language. - 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 `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. - Fixed e2e tests by increasing testTimeout.
## [2.17.1] - 2021-10-01 ## [2.17.1] - 2021-10-01

View File

@ -160,7 +160,7 @@ const CalendarUtils = {
} }
if (event.type === "VEVENT") { if (event.type === "VEVENT") {
Log.debug("\nEvent: " + JSON.stringify(event)); Log.debug("Event:\n" + JSON.stringify(event));
let startDate = eventDate(event, "start"); let startDate = eventDate(event, "start");
let endDate; let endDate;
@ -177,8 +177,8 @@ const CalendarUtils = {
} }
} }
Log.debug("startDate (local): " + startDate.toDate()); Log.debug("start: " + startDate.toDate());
Log.debug("endDate (local): " + endDate.toDate()); Log.debug("end:: " + endDate.toDate());
// Calculate the duration of the event for use with recurring events. // Calculate the duration of the event for use with recurring events.
let duration = parseInt(endDate.format("x")) - parseInt(startDate.format("x")); let duration = parseInt(endDate.format("x")) - parseInt(startDate.format("x"));
@ -332,17 +332,15 @@ const CalendarUtils = {
Log.debug("Fullday"); Log.debug("Fullday");
// If the offset is negative (east of GMT), where the problem is // If the offset is negative (east of GMT), where the problem is
if (dateoffset < 0) { if (dateoffset < 0) {
// Remove the offset, independently of the comparison between the date hour and the offset, if (dh <= Math.abs(dateoffset / 60)) {
// since in the case that *date houre < offset*, the *new Date* command will handle this by // reduce the time by the offset
// representing the day before.
// Reduce the time by the offset:
// Apply the correction to the date/time to get it UTC relative // Apply the correction to the date/time to get it UTC relative
date = new Date(date.getTime() - Math.abs(nowOffset) * 60000); date = new Date(date.getTime() - Math.abs(dateoffset) * 60000);
// the duration was calculated way back at the top before we could correct the start time.. // the duration was calculated way back at the top before we could correct the start time..
// fix it for this event entry // fix it for this event entry
//duration = 24 * 60 * 60 * 1000; //duration = 24 * 60 * 60 * 1000;
Log.debug("new recurring date1 is " + date); Log.debug("new recurring date1 is " + date);
}
} else { } else {
// if the timezones are the same, correct date if needed // if the timezones are the same, correct date if needed
if (event.start.tz === moment.tz.guess()) { if (event.start.tz === moment.tz.guess()) {
@ -387,7 +385,7 @@ const CalendarUtils = {
} }
} }
startDate = moment(date); startDate = moment(date);
Log.debug("Corrected startDate (local): " + startDate.toDate()); Log.debug("Corrected startDate: " + startDate.toDate());
let adjustDays = CalendarUtils.calculateTimezoneAdjustment(event, date); let adjustDays = CalendarUtils.calculateTimezoneAdjustment(event, date);

View File

@ -295,6 +295,9 @@ Module.register("newsfeed", {
this.sendNotification("NEWS_FEED", { items: this.newsItems }); this.sendNotification("NEWS_FEED", { items: this.newsItems });
} }
// #2638 Clear timer if it already exists
if (this.timer) clearInterval(this.timer);
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.activeItem++; this.activeItem++;
this.updateDom(this.config.animationSpeed); this.updateDom(this.config.animationSpeed);

28
package-lock.json generated
View File

@ -23,11 +23,11 @@
"moment": "^2.29.1", "moment": "^2.29.1",
"node-fetch": "^2.6.5", "node-fetch": "^2.6.5",
"node-ical": "^0.13.0", "node-ical": "^0.13.0",
"socket.io": "^4.3.0" "socket.io": "^4.3.1"
}, },
"devDependencies": { "devDependencies": {
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^25.2.1", "eslint-plugin-jest": "^25.2.2",
"eslint-plugin-jsdoc": "^36.1.1", "eslint-plugin-jsdoc": "^36.1.1",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"express-basic-auth": "^1.2.0", "express-basic-auth": "^1.2.0",
@ -3553,9 +3553,9 @@
} }
}, },
"node_modules/eslint-plugin-jest": { "node_modules/eslint-plugin-jest": {
"version": "25.2.1", "version": "25.2.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.2.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.2.2.tgz",
"integrity": "sha512-fC6T95lqgWHsdVFd+f0kTHH32NxbIzIm1fJ/3kGaCFcQP1fJc5khV7DzUHjNQSTOHd5Toa7ccEBptab4uFqbNQ==", "integrity": "sha512-frn5yhOF60U4kcqozO3zKTNZQUk+mfx037XOy2iiYL8FhorEkuCuL3/flzKcY1ECDP2WYT9ydmvlO3fRW9o4mg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/experimental-utils": "^5.0.0" "@typescript-eslint/experimental-utils": "^5.0.0"
@ -8828,9 +8828,9 @@
} }
}, },
"node_modules/socket.io": { "node_modules/socket.io": {
"version": "4.3.0", "version": "4.3.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.3.0.tgz", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.3.1.tgz",
"integrity": "sha512-15eJ4fLho1uQTgdvAKlkMPvhvurky8KAc0F+wAdrSoIk+rKEYor8vPKiV5grp4J0sQpPms/AW7w9BV6b/HB0oA==", "integrity": "sha512-HC5w5Olv2XZ0XJ4gOLGzzHEuOCfj3G0SmoW3jLHYYh34EVsIr3EkW9h6kgfW+K3TFEcmYy8JcPWe//KUkBp5jA==",
"dependencies": { "dependencies": {
"accepts": "~1.3.4", "accepts": "~1.3.4",
"base64id": "~2.0.0", "base64id": "~2.0.0",
@ -13359,9 +13359,9 @@
"requires": {} "requires": {}
}, },
"eslint-plugin-jest": { "eslint-plugin-jest": {
"version": "25.2.1", "version": "25.2.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.2.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.2.2.tgz",
"integrity": "sha512-fC6T95lqgWHsdVFd+f0kTHH32NxbIzIm1fJ/3kGaCFcQP1fJc5khV7DzUHjNQSTOHd5Toa7ccEBptab4uFqbNQ==", "integrity": "sha512-frn5yhOF60U4kcqozO3zKTNZQUk+mfx037XOy2iiYL8FhorEkuCuL3/flzKcY1ECDP2WYT9ydmvlO3fRW9o4mg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/experimental-utils": "^5.0.0" "@typescript-eslint/experimental-utils": "^5.0.0"
@ -17380,9 +17380,9 @@
} }
}, },
"socket.io": { "socket.io": {
"version": "4.3.0", "version": "4.3.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.3.0.tgz", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.3.1.tgz",
"integrity": "sha512-15eJ4fLho1uQTgdvAKlkMPvhvurky8KAc0F+wAdrSoIk+rKEYor8vPKiV5grp4J0sQpPms/AW7w9BV6b/HB0oA==", "integrity": "sha512-HC5w5Olv2XZ0XJ4gOLGzzHEuOCfj3G0SmoW3jLHYYh34EVsIr3EkW9h6kgfW+K3TFEcmYy8JcPWe//KUkBp5jA==",
"requires": { "requires": {
"accepts": "~1.3.4", "accepts": "~1.3.4",
"base64id": "~2.0.0", "base64id": "~2.0.0",

View File

@ -47,7 +47,7 @@
"homepage": "https://magicmirror.builders", "homepage": "https://magicmirror.builders",
"devDependencies": { "devDependencies": {
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^25.2.1", "eslint-plugin-jest": "^25.2.2",
"eslint-plugin-jsdoc": "^36.1.1", "eslint-plugin-jsdoc": "^36.1.1",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"express-basic-auth": "^1.2.0", "express-basic-auth": "^1.2.0",
@ -83,7 +83,7 @@
"moment": "^2.29.1", "moment": "^2.29.1",
"node-fetch": "^2.6.5", "node-fetch": "^2.6.5",
"node-ical": "^0.13.0", "node-ical": "^0.13.0",
"socket.io": "^4.3.0" "socket.io": "^4.3.1"
}, },
"_moduleAliases": { "_moduleAliases": {
"node_helper": "js/node_helper.js", "node_helper": "js/node_helper.js",