From 2f4b8cd6421a1199df82cd22b7f92942f05606dc Mon Sep 17 00:00:00 2001
From: veeck
Date: Fri, 11 Dec 2020 11:09:52 +0100
Subject: [PATCH 01/45] Update dependencies incl ini
---
package-lock.json | 344 ++++++++++++++--------------------------------
package.json | 18 +--
2 files changed, 115 insertions(+), 247 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index d5fac5e2..87dcc438 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -212,9 +212,9 @@
},
"dependencies": {
"core-js": {
- "version": "2.6.11",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
- "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
+ "version": "2.6.12",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
+ "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"dev": true
}
}
@@ -284,9 +284,9 @@
}
},
"@eslint/eslintrc": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz",
- "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz",
+ "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==",
"requires": {
"ajv": "^6.12.4",
"debug": "^4.1.1",
@@ -389,21 +389,21 @@
}
},
"@octokit/auth-token": {
- "version": "2.4.3",
- "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.3.tgz",
- "integrity": "sha512-fdGoOQ3kQJh+hrilc0Plg50xSfaCKOeYN9t6dpJKXN9BxhhfquL0OzoQXg3spLYymL5rm29uPeI3KEXRaZQ9zg==",
+ "version": "2.4.4",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.4.tgz",
+ "integrity": "sha512-LNfGu3Ro9uFAYh10MUZVaT7X2CnNm2C8IDQmabx+3DygYIQjs9FwzFAHN/0t6mu5HEPhxcb1XOuxdpY82vCg2Q==",
"dev": true,
"requires": {
- "@octokit/types": "^5.0.0"
+ "@octokit/types": "^6.0.0"
}
},
"@octokit/endpoint": {
- "version": "6.0.9",
- "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.9.tgz",
- "integrity": "sha512-3VPLbcCuqji4IFTclNUtGdp9v7g+nspWdiCUbK3+iPMjJCZ6LEhn1ts626bWLOn0GiDb6j+uqGvPpqLnY7pBgw==",
+ "version": "6.0.10",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.10.tgz",
+ "integrity": "sha512-9+Xef8nT7OKZglfkOMm7IL6VwxXUQyR7DUSU0LH/F7VNqs8vyd7es5pTfz9E7DwUIx7R3pGscxu1EBhYljyu7Q==",
"dev": true,
"requires": {
- "@octokit/types": "^5.0.0",
+ "@octokit/types": "^6.0.0",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
},
@@ -416,6 +416,12 @@
}
}
},
+ "@octokit/openapi-types": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.0.0.tgz",
+ "integrity": "sha512-J4bfM7lf8oZvEAdpS71oTvC1ofKxfEZgU5vKVwzZKi4QPiL82udjpseJwxPid9Pu2FNmyRQOX4iEj6W1iOSnPw==",
+ "dev": true
+ },
"@octokit/plugin-paginate-rest": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz",
@@ -464,14 +470,14 @@
}
},
"@octokit/request": {
- "version": "5.4.10",
- "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.10.tgz",
- "integrity": "sha512-egA49HkqEORVGDZGav1mh+VD+7uLgOxtn5oODj6guJk0HCy+YBSYapFkSLFgeYj3Fr18ZULKGURkjyhkAChylw==",
+ "version": "5.4.12",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.12.tgz",
+ "integrity": "sha512-MvWYdxengUWTGFpfpefBBpVmmEYfkwMoxonIB3sUGp5rhdgwjXL1ejo6JbgzG/QD9B/NYt/9cJX1pxXeSIUCkg==",
"dev": true,
"requires": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.0.0",
- "@octokit/types": "^5.0.0",
+ "@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1",
@@ -480,12 +486,12 @@
},
"dependencies": {
"@octokit/request-error": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.3.tgz",
- "integrity": "sha512-GgD5z8Btm301i2zfvJLk/mkhvGCdjQ7wT8xF9ov5noQY8WbKZDH9cOBqXzoeKd1mLr1xH2FwbtGso135zGBgTA==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.4.tgz",
+ "integrity": "sha512-LjkSiTbsxIErBiRh5wSZvpZqT4t0/c9+4dOe0PII+6jXR+oj/h66s7E4a/MghV7iT8W9ffoQ5Skoxzs96+gBPA==",
"dev": true,
"requires": {
- "@octokit/types": "^5.0.1",
+ "@octokit/types": "^6.0.0",
"deprecation": "^2.0.0",
"once": "^1.4.0"
}
@@ -545,11 +551,12 @@
}
},
"@octokit/types": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz",
- "integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.1.1.tgz",
+ "integrity": "sha512-btm3D6S7VkRrgyYF31etUtVY/eQ1KzrNRqhFt25KSe2mKlXuLXJilglRC6eDA2P6ou94BUnk/Kz5MPEolXgoiw==",
"dev": true,
"requires": {
+ "@octokit/openapi-types": "^2.0.0",
"@types/node": ">= 8"
}
},
@@ -587,61 +594,20 @@
"defer-to-connect": "^1.0.1"
}
},
- "@types/body-parser": {
- "version": "1.19.0",
- "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz",
- "integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==",
- "requires": {
- "@types/connect": "*",
- "@types/node": "*"
- }
- },
"@types/component-emitter": {
"version": "1.2.10",
"resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.10.tgz",
"integrity": "sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg=="
},
- "@types/connect": {
- "version": "3.4.33",
- "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz",
- "integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==",
- "requires": {
- "@types/node": "*"
- }
- },
"@types/cookie": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.0.tgz",
"integrity": "sha512-y7mImlc/rNkvCRmg8gC3/lj87S7pTUIJ6QGjwHR9WQJcFs+ZMTOaoPrkdFA/YdbuqVEmEbb5RdhVxMkAcgOnpg=="
},
"@types/cors": {
- "version": "2.8.8",
- "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.8.tgz",
- "integrity": "sha512-fO3gf3DxU2Trcbr75O7obVndW/X5k8rJNZkLXlQWStTHhP71PkRqjwPIEI0yMnJdg9R9OasjU+Bsr+Hr1xy/0w==",
- "requires": {
- "@types/express": "*"
- }
- },
- "@types/express": {
- "version": "4.17.9",
- "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.9.tgz",
- "integrity": "sha512-SDzEIZInC4sivGIFY4Sz1GG6J9UObPwCInYJjko2jzOf/Imx/dlpume6Xxwj1ORL82tBbmN4cPDIDkLbWHk9hw==",
- "requires": {
- "@types/body-parser": "*",
- "@types/express-serve-static-core": "*",
- "@types/qs": "*",
- "@types/serve-static": "*"
- }
- },
- "@types/express-serve-static-core": {
- "version": "4.17.14",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.14.tgz",
- "integrity": "sha512-uFTLwu94TfUFMToXNgRZikwPuZdOtDgs3syBtAIr/OXorL1kJqUJT9qCLnRZ5KBOWfZQikQ2xKgR2tnDj1OgDA==",
- "requires": {
- "@types/node": "*",
- "@types/qs": "*",
- "@types/range-parser": "*"
- }
+ "version": "2.8.9",
+ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.9.tgz",
+ "integrity": "sha512-zurD1ibz21BRlAOIKP8yhrxlqKx6L9VCwkB5kMiP6nZAhoF5MvC7qS1qPA7nRcr1GJolfkQC7/EAL4hdYejLtg=="
},
"@types/mdast": {
"version": "3.0.3",
@@ -652,11 +618,6 @@
"@types/unist": "*"
}
},
- "@types/mime": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.3.tgz",
- "integrity": "sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q=="
- },
"@types/minimatch": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
@@ -686,25 +647,6 @@
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
"dev": true
},
- "@types/qs": {
- "version": "6.9.5",
- "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz",
- "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ=="
- },
- "@types/range-parser": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz",
- "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
- },
- "@types/serve-static": {
- "version": "1.13.8",
- "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.8.tgz",
- "integrity": "sha512-MoJhSQreaVoL+/hurAZzIm8wafFR6ajiTM1m4A0kv6AGeVBl4r4pOV8bGFrjjq1sGxDTnCoF8i22o0/aE5XCyA==",
- "requires": {
- "@types/mime": "*",
- "@types/node": "*"
- }
- },
"@types/unist": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",
@@ -1153,6 +1095,11 @@
}
}
},
+ "base64-arraybuffer": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz",
+ "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI="
+ },
"base64-js": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
@@ -1754,8 +1701,7 @@
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
- "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
- "dev": true
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
},
"compress-commons": {
"version": "1.2.2",
@@ -2009,9 +1955,9 @@
}
},
"danger": {
- "version": "10.5.3",
- "resolved": "https://registry.npmjs.org/danger/-/danger-10.5.3.tgz",
- "integrity": "sha512-64ZjkDQNhQNDfUWOyEG9VgT1yjIY0q5dN5K1ocWrZ5whOySN5GjBX4CxaFrY1+HgQldCXCMSp6Xq+3+vFbUt4g==",
+ "version": "10.5.4",
+ "resolved": "https://registry.npmjs.org/danger/-/danger-10.5.4.tgz",
+ "integrity": "sha512-+1OQymly06JlYwkY0CLJzjzRaSV5qx0/FBhM8uRQz+aNh0Zl6SeUzVYLoeyA+h1UZeXhjYwzlzVDATM+p0691w==",
"dev": true,
"requires": {
"@babel/polyfill": "^7.2.5",
@@ -2052,40 +1998,11 @@
"supports-hyperlinks": "^1.0.1"
},
"dependencies": {
- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "dev": true,
- "requires": {
- "color-convert": "^1.9.0"
- }
- },
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
"get-stdin": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
"dev": true
- },
- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
}
}
},
@@ -2573,9 +2490,9 @@
}
},
"engine.io": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-4.0.4.tgz",
- "integrity": "sha512-4ggUX5pICZU17OTZNFv5+uFE/ZyoK+TIXv2SvxWWX8lwStllQ6Lvvs4lDBqvKpV9EYXNcvlNOcjKChd/mo+8Tw==",
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-4.0.5.tgz",
+ "integrity": "sha512-Ri+whTNr2PKklxQkfbGjwEo+kCBUM4Qxk4wtLqLrhH+b1up2NFL9g9pjYWiCV/oazwB0rArnvF/ZmZN2ab5Hpg==",
"requires": {
"accepts": "~1.3.4",
"base64id": "2.0.0",
@@ -2602,9 +2519,12 @@
}
},
"engine.io-parser": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.1.tgz",
- "integrity": "sha512-v5aZK1hlckcJDGmHz3W8xvI3NUHYc9t8QtTbqdR5OaH3S9iJZilPubauOm+vLWOMMWzpE3hiq92l9lTAHamRCg=="
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.2.tgz",
+ "integrity": "sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg==",
+ "requires": {
+ "base64-arraybuffer": "0.1.4"
+ }
},
"enquirer": {
"version": "2.3.6",
@@ -2733,12 +2653,12 @@
}
},
"eslint": {
- "version": "7.14.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.14.0.tgz",
- "integrity": "sha512-5YubdnPXrlrYAFCKybPuHIAH++PINe1pmKNc5wQRB9HSbqIK1ywAnntE3Wwua4giKu0bjligf1gLF6qxMGOYRA==",
+ "version": "7.15.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.15.0.tgz",
+ "integrity": "sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==",
"requires": {
"@babel/code-frame": "^7.0.0",
- "@eslint/eslintrc": "^0.2.1",
+ "@eslint/eslintrc": "^0.2.2",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@@ -2748,10 +2668,10 @@
"eslint-scope": "^5.1.1",
"eslint-utils": "^2.1.0",
"eslint-visitor-keys": "^2.0.0",
- "espree": "^7.3.0",
+ "espree": "^7.3.1",
"esquery": "^1.2.0",
"esutils": "^2.0.2",
- "file-entry-cache": "^5.0.1",
+ "file-entry-cache": "^6.0.0",
"functional-red-black-tree": "^1.0.1",
"glob-parent": "^5.0.0",
"globals": "^12.1.0",
@@ -2843,21 +2763,10 @@
}
},
"eslint-config-prettier": {
- "version": "6.15.0",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz",
- "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==",
- "dev": true,
- "requires": {
- "get-stdin": "^6.0.0"
- },
- "dependencies": {
- "get-stdin": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
- "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
- "dev": true
- }
- }
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz",
+ "integrity": "sha512-8Y8lGLVPPZdaNA7JXqnvETVC7IiVRgAP6afQu9gOQRn90YY3otMNh+x7Vr2vMePQntF+5erdSUBqSzCmU/AxaQ==",
+ "dev": true
},
"eslint-plugin-jsdoc": {
"version": "30.7.8",
@@ -2883,9 +2792,9 @@
}
},
"eslint-plugin-prettier": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz",
- "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.2.0.tgz",
+ "integrity": "sha512-kOUSJnFjAUFKwVxuzy6sA5yyMx6+o9ino4gCdShzBNx4eyFRudWRYKCFolKjoM40PEiuU6Cn7wBLfq3WsGg7qg==",
"dev": true,
"requires": {
"prettier-linter-helpers": "^1.0.0"
@@ -2921,12 +2830,12 @@
"integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ=="
},
"espree": {
- "version": "7.3.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz",
- "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==",
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
+ "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==",
"requires": {
"acorn": "^7.4.0",
- "acorn-jsx": "^5.2.0",
+ "acorn-jsx": "^5.3.1",
"eslint-visitor-keys": "^1.3.0"
},
"dependencies": {
@@ -3456,9 +3365,9 @@
}
},
"feedme": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/feedme/-/feedme-2.0.1.tgz",
- "integrity": "sha512-Sv2gbw5B110TATVannr/DIe+4PHPk5i/UBGBx6Vm5pXT9lYZV/VotWA1f3ik2vyAhz+wXiaRbopV8LJMbL5mng==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/feedme/-/feedme-2.0.2.tgz",
+ "integrity": "sha512-0RNn0uLaSey8EThxgABR0T1Q47kSRatYnAXy1cfUc8/eypqXiAu38XGthuwwzb7mESCD9465k6Nym8D9AtB8HA==",
"requires": {
"clarinet": "^0.12.4",
"sax": "^1.2.4"
@@ -3474,11 +3383,11 @@
}
},
"file-entry-cache": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
- "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz",
+ "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==",
"requires": {
- "flat-cache": "^2.0.1"
+ "flat-cache": "^3.0.4"
}
},
"fill-range": {
@@ -3570,19 +3479,18 @@
"dev": true
},
"flat-cache": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
- "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
+ "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
"requires": {
- "flatted": "^2.0.0",
- "rimraf": "2.6.3",
- "write": "1.0.3"
+ "flatted": "^3.1.0",
+ "rimraf": "^3.0.2"
}
},
"flatted": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
- "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA=="
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz",
+ "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA=="
},
"for-in": {
"version": "1.0.2",
@@ -4258,9 +4166,9 @@
"dev": true
},
"husky": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.0.tgz",
- "integrity": "sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA==",
+ "version": "4.3.5",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.5.tgz",
+ "integrity": "sha512-E5S/1HMoDDaqsH8kDF5zeKEQbYqe3wL9zJDyqyYqc8I4vHBtAoxkDBGXox0lZ9RI+k5GyB728vZdmnM4bYap+g==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
@@ -4419,9 +4327,9 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"ini": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
- "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
+ "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ=="
},
"inquirer": {
"version": "3.3.0",
@@ -6827,9 +6735,9 @@
"optional": true
},
"prettier": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz",
- "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
+ "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==",
"dev": true
},
"prettier-linter-helpers": {
@@ -7474,9 +7382,9 @@
"dev": true
},
"rimraf": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
- "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"requires": {
"glob": "^7.1.3"
}
@@ -7729,9 +7637,9 @@
"dev": true
},
"simple-git": {
- "version": "2.24.0",
- "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-2.24.0.tgz",
- "integrity": "sha512-nF31Xai5lTYgRCiSJ1lHzK0Vk9jWOvAFW12bdBaWy2bhodio04eOWYurvyM/nTBYsPIiQl3PFvdod5TRcPvzww==",
+ "version": "2.26.0",
+ "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-2.26.0.tgz",
+ "integrity": "sha512-I9QIjBNA773X23SZ/S1HFMCA+S//san83Twyd5ffWFjo/sv8VRk7tuck23y1uFWuzTu4KTwDh5LEXyCfEfOWMw==",
"requires": {
"@kwsites/file-exists": "^1.1.1",
"@kwsites/promise-deferred": "^1.1.1",
@@ -7793,16 +7701,6 @@
"ansi-styles": "^3.2.0",
"astral-regex": "^1.0.0",
"is-fullwidth-code-point": "^2.0.0"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "requires": {
- "color-convert": "^1.9.0"
- }
- }
}
},
"snapdragon": {
@@ -7928,9 +7826,9 @@
}
},
"socket.io": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-3.0.3.tgz",
- "integrity": "sha512-TC1GnSXhDVmd3bHji5aG7AgWB8UL7E6quACbKra8uFXBqlMwEDbrJFK+tjuIY5Pe9N0L+MAPPDv3pycnn0000A==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-3.0.4.tgz",
+ "integrity": "sha512-Vj1jUoO75WGc9txWd311ZJJqS9Dr8QtNJJ7gk2r7dcM/yGe9sit7qOijQl3GAwhpBOz/W8CwkD7R6yob07nLbA==",
"requires": {
"@types/cookie": "^0.4.0",
"@types/cors": "^2.8.8",
@@ -7944,9 +7842,9 @@
},
"dependencies": {
"@types/node": {
- "version": "14.14.10",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.10.tgz",
- "integrity": "sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ=="
+ "version": "14.14.12",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.12.tgz",
+ "integrity": "sha512-ASH8OPHMNlkdjrEdmoILmzFfsJICvhBsFfAum4aKZ/9U4B6M6tTmTPh+f3ttWdD74CEGV5XvXWkbyfSdXaTd7g=="
},
"debug": {
"version": "4.1.1",
@@ -7973,11 +7871,6 @@
"debug": "~4.1.0"
},
"dependencies": {
- "component-emitter": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
- "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
- },
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
@@ -8805,23 +8698,6 @@
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
"dev": true
- },
- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- },
- "dependencies": {
- "has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
- "dev": true
- }
- }
}
}
},
@@ -9633,14 +9509,6 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
- "write": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
- "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
- "requires": {
- "mkdirp": "^0.5.1"
- }
- },
"write-file-atomic": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
diff --git a/package.json b/package.json
index 3c19299e..d9f96c6f 100644
--- a/package.json
+++ b/package.json
@@ -44,19 +44,19 @@
"devDependencies": {
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
- "danger": "^10.5.3",
- "eslint-config-prettier": "^6.15.0",
+ "danger": "^10.5.4",
+ "eslint-config-prettier": "^7.0.0",
"eslint-plugin-jsdoc": "^30.7.8",
- "eslint-plugin-prettier": "^3.1.4",
+ "eslint-plugin-prettier": "^3.2.0",
"express-basic-auth": "^1.2.0",
- "husky": "^4.3.0",
+ "husky": "^4.3.5",
"jsdom": "^16.4.0",
"lodash": "^4.17.20",
"mocha": "^8.2.1",
"mocha-each": "^2.0.1",
"mocha-logger": "^1.0.7",
"nyc": "^15.1.0",
- "prettier": "^2.2.0",
+ "prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"spectron": "^10.0.1",
"stylelint": "^13.8.0",
@@ -71,10 +71,10 @@
"colors": "^1.4.0",
"console-stamp": "^3.0.0-rc4.2",
"electron": "^8.5.3",
- "eslint": "^7.14.0",
+ "eslint": "^7.15.0",
"express": "^4.17.1",
"express-ipfilter": "^1.1.2",
- "feedme": "^2.0.1",
+ "feedme": "^2.0.2",
"helmet": "^4.2.0",
"ical": "^0.8.0",
"iconv-lite": "^0.6.2",
@@ -84,8 +84,8 @@
"request": "^2.88.2",
"rrule": "^2.6.6",
"rrule-alt": "^2.2.8",
- "simple-git": "^2.24.0",
- "socket.io": "^3.0.3",
+ "simple-git": "^2.26.0",
+ "socket.io": "^3.0.4",
"valid-url": "^1.0.9"
},
"_moduleAliases": {
From b373aa62503d9a610019157c4100e5a15b4566dc Mon Sep 17 00:00:00 2001
From: veeck
Date: Thu, 17 Dec 2020 18:31:18 +0100
Subject: [PATCH 02/45] Hide alert overlay when dismissed manually
---
modules/default/alert/alert.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/default/alert/alert.js b/modules/default/alert/alert.js
index b2eb2eb2..f2849cd2 100644
--- a/modules/default/alert/alert.js
+++ b/modules/default/alert/alert.js
@@ -100,6 +100,7 @@ Module.register("alert", {
message: image + message,
effect: this.config.alert_effect,
ttl: params.timer,
+ onClose: () => this.hide_alert(sender),
al_no: "ns-alert"
});
//Show alert
From 8cf16f1049f31a03ddcb43dbba7dddf6f9a99eda Mon Sep 17 00:00:00 2001
From: veeck
Date: Thu, 17 Dec 2020 18:32:01 +0100
Subject: [PATCH 03/45] Update changelog
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 02453bb4..17366c9c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -45,6 +45,7 @@ _This release is scheduled to be released on 2021-01-01._
- Fix non-fullday recurring rule processing (#2216)
- Catch errors when parsing calendar data with ical (#2022)
- Corrected logic for timeFormat "relative" and "absolute"
+- Fix Default Alert Module does not hide black overlay when alert is dismissed manually (#2228)
## [2.13.0] - 2020-10-01
From 3f851c1fd63d6a2a0f202c7d89709999a7081085 Mon Sep 17 00:00:00 2001
From: buxxi
Date: Sat, 19 Dec 2020 11:13:46 +0100
Subject: [PATCH 04/45] Adding SMHI as a provider for the weather module
---
CHANGELOG.md | 1 +
modules/default/weather/providers/smhi.js | 279 ++++++++++++++++++++++
2 files changed, 280 insertions(+)
create mode 100644 modules/default/weather/providers/smhi.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 02453bb4..689240c5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ _This release is scheduled to be released on 2021-01-01._
- Added new parameter "useKmh" to weather module for displaying wind speed as kmh.
- Chuvash translation.
- Added Weatherbit as a provider to Weather module.
+- Added SMHI as a provider to Weather module.
- Added Hindi & Gujarati translation.
- Chuvash translation.
- Calendar: new options "limitDays" and "coloredEvents"
diff --git a/modules/default/weather/providers/smhi.js b/modules/default/weather/providers/smhi.js
new file mode 100644
index 00000000..e2bd3d4c
--- /dev/null
+++ b/modules/default/weather/providers/smhi.js
@@ -0,0 +1,279 @@
+/* global WeatherProvider, WeatherObject, SunCalc */
+
+/* Magic Mirror
+ * Module: Weather
+ * Provider: SMHI
+ *
+ * By BuXXi https://github.com/buxxi
+ * MIT Licensed
+ *
+ * This class is a provider for SMHI (Sweden only).
+ * Note that SMHI doesn't provide sunrise and sundown, use SunCalc to calculate it.
+ * Metric system is the only supported unit.
+ */
+WeatherProvider.register("smhi", {
+ providerName: "SMHI",
+
+ /**
+ * Implements method in interface for fetching current weather
+ */
+ fetchCurrentWeather() {
+ this.fetchData(this.getURL())
+ .then((data) => {
+ let closest = this.getClosestToCurrentTime(data.timeSeries);
+ let coordinates = this.resolveCoordinates(data);
+ let weatherObject = this.convertWeatherDataToObject(closest, coordinates);
+ this.setFetchedLocation(`(${coordinates.lat},${coordinates.lon})`);
+ this.setCurrentWeather(weatherObject);
+ })
+ .catch((error) => Log.error("Could not load data: " + error.message))
+ .finally(() => this.updateAvailable());
+ },
+
+ /**
+ * Implements method in interface for fetching a forecast.
+ * Handling hourly forecast would be easy as not grouping by day but it seems really specific for one weather provider for now.
+ */
+ fetchWeatherForecast() {
+ this.fetchData(this.getURL())
+ .then((data) => {
+ let coordinates = this.resolveCoordinates(data);
+ let weatherObjects = this.convertWeatherDataGroupedByDay(data.timeSeries, coordinates);
+ this.setFetchedLocation(`(${coordinates.lat},${coordinates.lon})`);
+ this.setWeatherForecast(weatherObjects);
+ })
+ .catch((error) => Log.error("Could not load data: " + error.message))
+ .finally(() => this.updateAvailable());
+ },
+
+ /**
+ * Overrides method for setting config with checks for the precipitationValue being unset or invalid
+ */
+ setConfig(config) {
+ this.config = config;
+ if (!config.precipitationValue || ["pmin", "pmean", "pmedian", "pmax"].indexOf(config.precipitationValue) == -1) {
+ console.log("invalid or not set: " + config.precipitationValue);
+ config.precipitationValue = "pmedian";
+ }
+ },
+
+ /**
+ * Of all the times returned find out which one is closest to the current time, should be the first if the data isn't old.
+ */
+ getClosestToCurrentTime(times) {
+ let now = moment();
+ let minDiff = undefined;
+ for (time of times) {
+ let diff = Math.abs(moment(time.validTime).diff(now));
+ if (!minDiff || diff < Math.abs(moment(minDiff.validTime).diff(now))) {
+ minDiff = time;
+ }
+ }
+ return minDiff;
+ },
+
+ /**
+ * Get the forecast url for the configured coordinates
+ */
+ getURL() {
+ let lon = this.config.lon;
+ let lat = this.config.lat;
+ return `https://opendata-download-metfcst.smhi.se/api/category/pmp3g/version/2/geotype/point/lon/${lon}/lat/${lat}/data.json`;
+ },
+
+ /**
+ * Converts the returned data into a WeatherObject with required properties set for both current weather and forecast.
+ * The returned units is always in metric system.
+ * Requires coordinates to determine if its daytime or nighttime to know which icon to use and also to set sunrise and sunset.
+ */
+ convertWeatherDataToObject(weatherData, coordinates) {
+ let currentWeather = new WeatherObject("metric", "metric", "metric"); //Weather data is only for Sweden and nobody in Sweden would use imperial
+
+ currentWeather.date = moment(weatherData.validTime);
+ let times = SunCalc.getTimes(currentWeather.date.toDate(), coordinates.lat, coordinates.lon);
+ currentWeather.sunrise = moment(times.sunrise, "X");
+ currentWeather.sunset = moment(times.sunset, "X");
+ currentWeather.humidity = this.paramValue(weatherData, "r");
+ currentWeather.temperature = this.paramValue(weatherData, "t");
+ currentWeather.windSpeed = this.paramValue(weatherData, "ws");
+ currentWeather.windDirection = this.paramValue(weatherData, "wd");
+ currentWeather.weatherType = this.convertWeatherType(this.paramValue(weatherData, "Wsymb2"), this.isDayTime(currentWeather));
+
+ //Determine the precipitation amount and category and update the weatherObject with it, the valuetype to use can be configured or uses median as default.
+ let precipitationValue = this.paramValue(weatherData, this.config.precipitationValue);
+ switch (this.paramValue(weatherData, "pcat")) {
+ // 0 = No precipitation
+ case 1: // Snow
+ currentWeather.snow += precipitationValue;
+ currentWeather.precipitation += precipitationValue;
+ break;
+ case 2: // Snow and rain, treat it as 50/50 snow and rain
+ currentWeather.snow += precipitationValue / 2;
+ currentWeather.rain += precipitationValue / 2;
+ currentWeather.precipitation += precipitationValue;
+ break;
+ case 3: // Rain
+ case 4: // Drizzle
+ case 5: // Freezing rain
+ case 6: // Freezing drizzle
+ currentWeather.rain += precipitationValue;
+ currentWeather.precipitation += precipitationValue;
+ break;
+ }
+
+ return currentWeather;
+ },
+
+ /**
+ * Takes all of the data points and converts it to one WeatherObject per day.
+ */
+ convertWeatherDataGroupedByDay(allWeatherData, coordinates) {
+ var currentWeather;
+ let result = [];
+
+ let allWeatherObjects = this.fillInGaps(allWeatherData).map((weatherData) => this.convertWeatherDataToObject(weatherData, coordinates));
+ var dayWeatherTypes = [];
+
+ for (weatherObject of allWeatherObjects) {
+ //If its the first object or if a day change we need to reset the summary object
+ if (!currentWeather || !currentWeather.date.isSame(weatherObject.date, "day")) {
+ currentWeather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits);
+ dayWeatherTypes = [];
+ currentWeather.date = weatherObject.date;
+ currentWeather.minTemperature = Infinity;
+ currentWeather.maxTemperature = -Infinity;
+ currentWeather.snow = 0;
+ currentWeather.rain = 0;
+ currentWeather.precipitation = 0;
+ result.push(currentWeather);
+ }
+
+ //Keep track of what icons has been used for each hour of daytime and use the middle one for the forecast
+ if (this.isDayTime(weatherObject)) {
+ dayWeatherTypes.push(weatherObject.weatherType);
+ }
+ if (dayWeatherTypes.length > 0) {
+ currentWeather.weatherType = dayWeatherTypes[Math.floor(dayWeatherTypes.length / 2)];
+ } else {
+ currentWeather.weatherType = weatherObject.weatherType;
+ }
+
+ //All other properties is either a sum, min or max of each hour
+ currentWeather.minTemperature = Math.min(currentWeather.minTemperature, weatherObject.temperature);
+ currentWeather.maxTemperature = Math.max(currentWeather.maxTemperature, weatherObject.temperature);
+ currentWeather.snow += weatherObject.snow;
+ currentWeather.rain += weatherObject.rain;
+ currentWeather.precipitation += weatherObject.precipitation;
+ }
+
+ return result;
+ },
+
+ /**
+ * Resolve coordinates from the response data (probably preferably to use this if it's not matching the config values exactly)
+ */
+ resolveCoordinates(data) {
+ return { lat: data.geometry.coordinates[0][1], lon: data.geometry.coordinates[0][0] };
+ },
+
+ /**
+ * Checks if the weatherObject is at dayTime
+ */
+ isDayTime(weatherObject) {
+ return weatherObject.date.isBetween(weatherObject.sunrise, weatherObject.sunset, undefined, "[]");
+ },
+
+ /**
+ * The distance between the data points is increasing in the data the more distant the prediction is.
+ * Find these gaps and fill them with the previous hours data to make the data returned a complete set.
+ */
+ fillInGaps(data) {
+ let result = [];
+ for (var i = 1; i < data.length; i++) {
+ let to = moment(data[i].validTime);
+ let from = moment(data[i - 1].validTime);
+ let hours = moment.duration(to.diff(from)).asHours();
+ // For each hour add a datapoint but change the validTime
+ for (var j = 0; j < hours; j++) {
+ let current = Object.assign({}, data[i]);
+ current.validTime = from.clone().add(j, "hours").toISOString();
+ result.push(current);
+ }
+ }
+ return result;
+ },
+
+ /**
+ * Helper method to fetch a property from the returned data set.
+ * The returned values is an array with always one value in it.
+ */
+ paramValue(currentWeatherData, name) {
+ return currentWeatherData.parameters.filter((p) => p.name == name).flatMap((p) => p.values)[0];
+ },
+
+ /**
+ * Map the icon value from SHMI to an icon that MagicMirror understands.
+ * Uses different icons depending if its daytime or nighttime.
+ * SHMI's description of what the numeric value means is the comment after the case.
+ */
+ convertWeatherType(input, isDayTime) {
+ switch (input) {
+ case 1:
+ return isDayTime ? "day-sunny" : "night-clear"; // Clear sky
+ case 2:
+ return isDayTime ? "day-sunny-overcast" : "night-partly-cloudy"; //Nearly clear sky
+ case 3:
+ return isDayTime ? "day-cloudy" : "night-cloudy"; //Variable cloudiness
+ case 4:
+ return isDayTime ? "day-cloudy" : "night-cloudy"; //Halfclear sky
+ case 5:
+ return "cloudy"; //Cloudy sky
+ case 6:
+ return "cloudy"; //Overcast
+ case 7:
+ return "fog"; //Fog
+ case 8:
+ return "showers"; //Light rain showers
+ case 9:
+ return "showers"; //Moderate rain showers
+ case 10:
+ return "showers"; //Heavy rain showers
+ case 11:
+ return "thunderstorm"; //Thunderstorm
+ case 12:
+ return "sleet"; //Light sleet showers
+ case 13:
+ return "sleet"; //Moderate sleet showers
+ case 14:
+ return "sleet"; //Heavy sleet showers
+ case 15:
+ return "snow"; //Light snow showers
+ case 16:
+ return "snow"; //Moderate snow showers
+ case 17:
+ return "snow"; //Heavy snow showers
+ case 18:
+ return "rain"; //Light rain
+ case 19:
+ return "rain"; //Moderate rain
+ case 20:
+ return "rain"; //Heavy rain
+ case 21:
+ return "thunderstorm"; //Thunder
+ case 22:
+ return "sleet"; // Light sleet
+ case 23:
+ return "sleet"; //Moderate sleet
+ case 24:
+ return "sleet"; // Heavy sleet
+ case 25:
+ return "snow"; // Light snowfall
+ case 26:
+ return "snow"; //Moderate snowfall
+ case 27:
+ return "snow"; //Heavy snowfall
+ default:
+ return "";
+ }
+ }
+});
From 299e4a497f66663a3e501ce45ffab7b776c6e29d Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Sun, 20 Dec 2020 19:58:06 +0100
Subject: [PATCH 05/45] Create node.js.yml
---
.github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 .github/workflows/node.js.yml
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
new file mode 100644
index 00000000..f462f309
--- /dev/null
+++ b/.github/workflows/node.js.yml
@@ -0,0 +1,31 @@
+# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
+
+name: MagicMirror Automated Testing
+
+on:
+ push:
+ branches: [ master, develop, ci-test ]
+ pull_request:
+ branches: [ master, develop, ci-test ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [10.x, 12.x, 14.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - run: npm run test:prettier
+ - run: npm run test:js
+ - run: npm run test:css
+ - run: npm run test:e2e
+ - run: npm run test:unit
From 54ac450f928353d9655963ab4062edfe542404b8 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Sun, 20 Dec 2020 20:00:54 +0100
Subject: [PATCH 06/45] Update and rename node.js.yml to node-ci.js.yml
---
.github/workflows/{node.js.yml => node-ci.js.yml} | 1 +
1 file changed, 1 insertion(+)
rename .github/workflows/{node.js.yml => node-ci.js.yml} (97%)
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node-ci.js.yml
similarity index 97%
rename from .github/workflows/node.js.yml
rename to .github/workflows/node-ci.js.yml
index f462f309..3fdae25e 100644
--- a/.github/workflows/node.js.yml
+++ b/.github/workflows/node-ci.js.yml
@@ -24,6 +24,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
+ - run: npm install
- run: npm run test:prettier
- run: npm run test:js
- run: npm run test:css
From 8251792a0d771c0c4b0aa08338026a96df376c5b Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Sun, 20 Dec 2020 20:04:06 +0100
Subject: [PATCH 07/45] Update .prettierignore
---
.prettierignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.prettierignore b/.prettierignore
index 3b87fcd2..b829fa7c 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -2,3 +2,4 @@ package-lock.json
/config/**/*
/vendor/**/*
!/vendor/vendor.js
+.github/**/*
From 39d7ceb0175e68ebaf2a84fbfaa5b69c1dd79834 Mon Sep 17 00:00:00 2001
From: Karsten Hassel
Date: Sun, 20 Dec 2020 22:03:20 +0100
Subject: [PATCH 08/45] test github actions
---
.github/workflows/node-ci.js.yml | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/node-ci.js.yml b/.github/workflows/node-ci.js.yml
index 3fdae25e..5f916bcf 100644
--- a/.github/workflows/node-ci.js.yml
+++ b/.github/workflows/node-ci.js.yml
@@ -24,9 +24,12 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- - run: npm install
- - run: npm run test:prettier
- - run: npm run test:js
- - run: npm run test:css
- - run: npm run test:e2e
- - run: npm run test:unit
+ - run: |
+ Xvfb :99 -screen 0 1024x768x16 &
+ export DISPLAY=:99
+ npm install
+ npm run test:prettier
+ npm run test:js
+ npm run test:css
+ npm run test:e2e
+ npm run test:unit
From 911687af2a3a6cf992e3afcb8235656461e4c94a Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 09:28:26 +0100
Subject: [PATCH 09/45] Remove Travis
---
.travis.yml | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 .travis.yml
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index b2c4ae0f..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-dist: trusty
-language: node_js
-node_js:
- - 10
- - lts/*
- - node
-before_install:
- - npm i -g npm
-before_script:
- - yarn danger ci
- - "export DISPLAY=:99.0"
- - "export ELECTRON_DISABLE_SANDBOX=1"
- - "sh -e /etc/init.d/xvfb start"
- - sleep 5
-script:
- - npm run test:prettier
- - npm run test:js
- - npm run test:css
- - npm run test:e2e
- - npm run test:unit
-after_script:
- - npm list
-cache:
- directories:
- - node_modules
From 29451562e36167955058e0a89ab9c41dec43979e Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 09:37:08 +0100
Subject: [PATCH 10/45] Create danger-ci.yml
---
.github/workflows/danger-ci.yml | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 .github/workflows/danger-ci.yml
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
new file mode 100644
index 00000000..0ac05896
--- /dev/null
+++ b/.github/workflows/danger-ci.yml
@@ -0,0 +1,28 @@
+# This is a basic workflow to help you get started with Actions
+name: Danger CI
+
+# Controls when the action will run.
+on:
+ # Triggers the workflow on push or pull request events but only for the master branch
+ push:
+ branches: [ master, develop, danger-ci ]
+ pull_request:
+ branches: [ master, develop, danger-ci ]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ build:
+ # The type of runner that the job will run on
+ runs-on: ubuntu-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v2
+
+ - name: Danger JS Action
+ uses: danger/danger-js@9.1.8
From 0f58a56a07f8ccec5c341abdd43450b4b161d18a Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 09:47:36 +0100
Subject: [PATCH 11/45] Add env variable.
---
.github/workflows/danger-ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
index 0ac05896..0e32de9f 100644
--- a/.github/workflows/danger-ci.yml
+++ b/.github/workflows/danger-ci.yml
@@ -26,3 +26,5 @@ jobs:
- name: Danger JS Action
uses: danger/danger-js@9.1.8
+ env:
+ DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
From 86220fa72192757771000cf4d0d966d0a6be7932 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 10:22:25 +0100
Subject: [PATCH 12/45] Update danger-ci.yml
---
.github/workflows/danger-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
index 0e32de9f..d40effce 100644
--- a/.github/workflows/danger-ci.yml
+++ b/.github/workflows/danger-ci.yml
@@ -27,4 +27,4 @@ jobs:
- name: Danger JS Action
uses: danger/danger-js@9.1.8
env:
- DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
From 616431e04b7c04fdcb391ca65a8312ff60fee106 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 10:27:06 +0100
Subject: [PATCH 13/45] Disable Transpile.
---
.github/workflows/danger-ci.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
index d40effce..a6819f42 100644
--- a/.github/workflows/danger-ci.yml
+++ b/.github/workflows/danger-ci.yml
@@ -27,4 +27,5 @@ jobs:
- name: Danger JS Action
uses: danger/danger-js@9.1.8
env:
+ DANGER_DISABLE_TRANSPILATION: true
GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
From 3c3ce243972949db55a541697c23608d8f84a0af Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 10:51:51 +0100
Subject: [PATCH 14/45] Cleanup Danger-CI
---
.github/workflows/danger-ci.yml | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
index a6819f42..7627a9ce 100644
--- a/.github/workflows/danger-ci.yml
+++ b/.github/workflows/danger-ci.yml
@@ -1,29 +1,16 @@
-# This is a basic workflow to help you get started with Actions
name: Danger CI
-# Controls when the action will run.
on:
- # Triggers the workflow on push or pull request events but only for the master branch
- push:
- branches: [ master, develop, danger-ci ]
pull_request:
- branches: [ master, develop, danger-ci ]
+ branches: [master, develop]
- # Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
- # This workflow contains a single job called "build"
- build:
- # The type of runner that the job will run on
+ ci:
runs-on: ubuntu-latest
-
- # Steps represent a sequence of tasks that will be executed as part of the job
steps:
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
-
- name: Danger JS Action
uses: danger/danger-js@9.1.8
env:
From a0366e794b915250925e19d252d7a46cb25d869d Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 10:57:18 +0100
Subject: [PATCH 15/45] Stupid commit to check github actions.
---
modules/default/alert/alert.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/default/alert/alert.js b/modules/default/alert/alert.js
index f2849cd2..8d175b39 100644
--- a/modules/default/alert/alert.js
+++ b/modules/default/alert/alert.js
@@ -103,8 +103,10 @@ Module.register("alert", {
onClose: () => this.hide_alert(sender),
al_no: "ns-alert"
});
+
//Show alert
this.alerts[sender.name].show();
+
//Add timer to dismiss alert and overlay
if (params.timer) {
setTimeout(() => {
From f966e504a5dde5f188ac0b4adc93ae4222c685c5 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 10:59:55 +0100
Subject: [PATCH 16/45] Cleanup.
---
.github/workflows/node-ci.js.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/node-ci.js.yml b/.github/workflows/node-ci.js.yml
index 5f916bcf..a88f3109 100644
--- a/.github/workflows/node-ci.js.yml
+++ b/.github/workflows/node-ci.js.yml
@@ -5,12 +5,12 @@ name: MagicMirror Automated Testing
on:
push:
- branches: [ master, develop, ci-test ]
+ branches: [ master, develop ]
pull_request:
- branches: [ master, develop, ci-test ]
+ branches: [ master, develop ]
jobs:
- build:
+ test:
runs-on: ubuntu-latest
From b72d0ed37eebac7bdba696bcf5fc27ec66f911eb Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 11:02:14 +0100
Subject: [PATCH 17/45] Add ENV variable.
---
.github/workflows/danger-ci.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
index 7627a9ce..851dd1ca 100644
--- a/.github/workflows/danger-ci.yml
+++ b/.github/workflows/danger-ci.yml
@@ -16,3 +16,4 @@ jobs:
env:
DANGER_DISABLE_TRANSPILATION: true
GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
+ DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
From 9622d02230cd4a327e55adcb018a28118f4f8520 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 11:11:48 +0100
Subject: [PATCH 18/45] Yolo.
---
.github/workflows/danger-ci.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
index 851dd1ca..bf5520b1 100644
--- a/.github/workflows/danger-ci.yml
+++ b/.github/workflows/danger-ci.yml
@@ -15,5 +15,4 @@ jobs:
uses: danger/danger-js@9.1.8
env:
DANGER_DISABLE_TRANSPILATION: true
- GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
- DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
+ GITHUB_TOKEN: e56bd535a531ee42e83bf9d48d95ba27a309be6c
From 83ec8ca24fd6bed5b83f0db680622cd80a765bbd Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 11:13:41 +0100
Subject: [PATCH 19/45] Restore.
---
.github/workflows/danger-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
index bf5520b1..7627a9ce 100644
--- a/.github/workflows/danger-ci.yml
+++ b/.github/workflows/danger-ci.yml
@@ -15,4 +15,4 @@ jobs:
uses: danger/danger-js@9.1.8
env:
DANGER_DISABLE_TRANSPILATION: true
- GITHUB_TOKEN: e56bd535a531ee42e83bf9d48d95ba27a309be6c
+ GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
From 20bd85b6765a06cb2901b7d6935b323ae91f73cc Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 11:20:34 +0100
Subject: [PATCH 20/45] Delete danger-ci.yml
Unfortunately Danger Actions currently can't work with PR's:
https://github.com/PrismJS/prism/issues/2627
---
.github/workflows/danger-ci.yml | 18 ------------------
1 file changed, 18 deletions(-)
delete mode 100644 .github/workflows/danger-ci.yml
diff --git a/.github/workflows/danger-ci.yml b/.github/workflows/danger-ci.yml
deleted file mode 100644
index 7627a9ce..00000000
--- a/.github/workflows/danger-ci.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Danger CI
-
-on:
- pull_request:
- branches: [master, develop]
-
- workflow_dispatch:
-
-jobs:
- ci:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Danger JS Action
- uses: danger/danger-js@9.1.8
- env:
- DANGER_DISABLE_TRANSPILATION: true
- GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
From a8ef594dab17c307a87309a72834b2bd704f6848 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 11:23:02 +0100
Subject: [PATCH 21/45] Stupid commit to check github actions.
---
modules/default/weather/providers/smhi.js | 32 ++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/modules/default/weather/providers/smhi.js b/modules/default/weather/providers/smhi.js
index e2bd3d4c..cdbaf013 100644
--- a/modules/default/weather/providers/smhi.js
+++ b/modules/default/weather/providers/smhi.js
@@ -48,6 +48,8 @@ WeatherProvider.register("smhi", {
/**
* Overrides method for setting config with checks for the precipitationValue being unset or invalid
+ *
+ * @param config
*/
setConfig(config) {
this.config = config;
@@ -59,6 +61,8 @@ WeatherProvider.register("smhi", {
/**
* Of all the times returned find out which one is closest to the current time, should be the first if the data isn't old.
+ *
+ * @param times
*/
getClosestToCurrentTime(times) {
let now = moment();
@@ -85,6 +89,11 @@ WeatherProvider.register("smhi", {
* Converts the returned data into a WeatherObject with required properties set for both current weather and forecast.
* The returned units is always in metric system.
* Requires coordinates to determine if its daytime or nighttime to know which icon to use and also to set sunrise and sunset.
+ *
+ * @param weatherData
+ * @param coordinates
+ * @param weatherData
+ * @param coordinates
*/
convertWeatherDataToObject(weatherData, coordinates) {
let currentWeather = new WeatherObject("metric", "metric", "metric"); //Weather data is only for Sweden and nobody in Sweden would use imperial
@@ -126,6 +135,11 @@ WeatherProvider.register("smhi", {
/**
* Takes all of the data points and converts it to one WeatherObject per day.
+ *
+ * @param allWeatherData
+ * @param coordinates
+ * @param allWeatherData
+ * @param coordinates
*/
convertWeatherDataGroupedByDay(allWeatherData, coordinates) {
var currentWeather;
@@ -171,13 +185,17 @@ WeatherProvider.register("smhi", {
/**
* Resolve coordinates from the response data (probably preferably to use this if it's not matching the config values exactly)
+ *
+ * @param data
*/
resolveCoordinates(data) {
return { lat: data.geometry.coordinates[0][1], lon: data.geometry.coordinates[0][0] };
},
/**
- * Checks if the weatherObject is at dayTime
+ * Checks if the weatherObject is at dayTime.
+ *
+ * @param weatherObject
*/
isDayTime(weatherObject) {
return weatherObject.date.isBetween(weatherObject.sunrise, weatherObject.sunset, undefined, "[]");
@@ -186,6 +204,8 @@ WeatherProvider.register("smhi", {
/**
* The distance between the data points is increasing in the data the more distant the prediction is.
* Find these gaps and fill them with the previous hours data to make the data returned a complete set.
+ *
+ * @param data
*/
fillInGaps(data) {
let result = [];
@@ -206,6 +226,11 @@ WeatherProvider.register("smhi", {
/**
* Helper method to fetch a property from the returned data set.
* The returned values is an array with always one value in it.
+ *
+ * @param currentWeatherData
+ * @param name
+ * @param currentWeatherData
+ * @param name
*/
paramValue(currentWeatherData, name) {
return currentWeatherData.parameters.filter((p) => p.name == name).flatMap((p) => p.values)[0];
@@ -215,6 +240,11 @@ WeatherProvider.register("smhi", {
* Map the icon value from SHMI to an icon that MagicMirror understands.
* Uses different icons depending if its daytime or nighttime.
* SHMI's description of what the numeric value means is the comment after the case.
+ *
+ * @param input
+ * @param isDayTime
+ * @param input
+ * @param isDayTime
*/
convertWeatherType(input, isDayTime) {
switch (input) {
From 30db9c30c8a30da62a137f55299864fb61c28ba6 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 11:25:36 +0100
Subject: [PATCH 22/45] Stupid commit to check github actions.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index e09e2e34..54e3cb9b 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,6 @@ If we receive enough donations we might even be able to free up some working hou
To donate, please follow [this](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G5D8E9MR5DTD2&source=url) link.
-
+
From cdb8d35cf6aa28ce1adee3e1c5da4d23f68b9b4f Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 12:36:59 +0100
Subject: [PATCH 23/45] Create enforce-changelog.yml
---
.github/workflows/enforce-changelog.yml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 .github/workflows/enforce-changelog.yml
diff --git a/.github/workflows/enforce-changelog.yml b/.github/workflows/enforce-changelog.yml
new file mode 100644
index 00000000..a58067fc
--- /dev/null
+++ b/.github/workflows/enforce-changelog.yml
@@ -0,0 +1,15 @@
+name: "Enforce Changelog"
+on:
+ pull_request:
+ types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
+
+jobs:
+ # Enforces the update of a changelog file on every pull request
+ changelog:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: dangoslen/changelog-enforcer@v1.6.1
+ with:
+ changeLogPath: 'CHANGELOG.md'
+ skipLabels: 'Skip-Changelog'
From eb6ef3c8ff0f11e48cfdb38f184fcd5081576057 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 13:02:40 +0100
Subject: [PATCH 24/45] Update enforce-changelog.yml
---
.github/workflows/enforce-changelog.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/enforce-changelog.yml b/.github/workflows/enforce-changelog.yml
index a58067fc..c0523c6f 100644
--- a/.github/workflows/enforce-changelog.yml
+++ b/.github/workflows/enforce-changelog.yml
@@ -5,7 +5,7 @@ on:
jobs:
# Enforces the update of a changelog file on every pull request
- changelog:
+ check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
From 0fd0fea7e7ad5e6fa1fddea25e44a06d5174c620 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 13:06:39 +0100
Subject: [PATCH 25/45] Update enforce-changelog.yml
---
.github/workflows/enforce-changelog.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/enforce-changelog.yml b/.github/workflows/enforce-changelog.yml
index c0523c6f..eefa1645 100644
--- a/.github/workflows/enforce-changelog.yml
+++ b/.github/workflows/enforce-changelog.yml
@@ -12,4 +12,4 @@ jobs:
- uses: dangoslen/changelog-enforcer@v1.6.1
with:
changeLogPath: 'CHANGELOG.md'
- skipLabels: 'Skip-Changelog'
+ skipLabels: 'Skip Changelog'
From 202eeea33f9e644f819b77029b89a10ce84f8bcb Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 13:16:54 +0100
Subject: [PATCH 26/45] Fix changelog special character issues.
---
CHANGELOG.md | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index df7af67e..d38b7c2f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,9 @@
-# MagicMirror� Change Log
+# MagicMirror² Change Log
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.14.0] - Unreleased (Develop Branch)
@@ -53,11 +53,11 @@ _This release is scheduled to be released on 2021-01-01._
Special thanks to the following contributors: @bryanzzhu, @bugsounet, @chamakura, @cjbrunner, @easyas314, @larryare, @oemel09, @rejas, @sdetweil & @sthuber90.
-?? **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`.
+ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`.
### Added
-- `--dry-run` option added in fetch call within updatenotification node_helper. This is to prevent
+- `--dry-run` option adde in fetch call within updatenotification node_helper. This is to prevent
MagicMirror from consuming any fetch result. Causes conflict with MMPM when attempting to check
for updates to MagicMirror and/or MagicMirror modules.
- Test coverage with Istanbul, run it with `npm run test:coverage`.
@@ -92,7 +92,7 @@ Special thanks to the following contributors: @bryanzzhu, @bugsounet, @chamakura
Special thanks to the following contributors: @AndreKoepke, @andrezibaia, @bryanzzhu, @chamakura, @DarthBrento, @Ekristoffe, @khassel, @Legion2, @ndom91, @radokristof, @rejas, @XBCreepinJesus & @ZoneMR.
-?? **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`.
+ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`.
### Added
@@ -130,7 +130,7 @@ Special thanks to the following contributors: @AndreKoepke, @andrezibaia, @bryan
## [2.11.0] - 2020-04-01
-?? READ THIS BEFORE UPDATING ??
+🚨 READ THIS BEFORE UPDATING 🚨
In the past years the project has grown a lot. This came with a huge downside: poor maintainability. If I let the project continue the way it was, it would eventually crash and burn. More important: I would completely lose the drive and interest to continue the project. Because of this the decision was made to simplify the core by removing all side features like automatic installers and support for exotic platforms. This release (2.11.0) is the first real release that will reflect (parts) of these changes. As a result of this, some things might break. So before you continue make sure to backup your installation. Your config, your modules or better yet: your full MagicMirror folder. In other words: update at your own risk.
@@ -191,7 +191,7 @@ For more information regarding this major change, please check issue [#1860](htt
Special thanks to @sdetweil for all his great contributions!
-?? **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`.
+ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`.
### Added
@@ -220,12 +220,12 @@ Special thanks to @sdetweil for all his great contributions!
## [2.9.0] - 2019-10-01
-?? **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues running Electron, make sure your [Raspbian is up to date](https://www.raspberrypi.org/documentation/raspbian/updating.md).
+ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues running Electron, make sure your [Raspbian is up to date](https://www.raspberrypi.org/documentation/raspbian/updating.md).
### Added
- Spanish translation for "PRECIP".
-- Adding a Malay (Malaysian) translation for MagicMirror�.
+- Adding a Malay (Malaysian) translation for MagicMirror².
- Add test check URLs of vendors 200 and 404 HTTP CODE.
- Add tests for new weather module and helper to stub ajax requests.
@@ -246,13 +246,13 @@ Special thanks to @sdetweil for all his great contributions!
## [2.8.0] - 2019-07-01
-?? **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues running Electron, make sure your [Raspbian is up to date](https://www.raspberrypi.org/documentation/raspbian/updating.md).
+ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues running Electron, make sure your [Raspbian is up to date](https://www.raspberrypi.org/documentation/raspbian/updating.md).
### Added
- Option to show event location in calendar
- Finnish translation for "Feels" and "Weeks"
-- Russian translation for "Feels"
+- Russian translation for “Feels”
- Calendar module: added `nextDaysRelative` config option
- Add `broadcastPastEvents` config option for calendars to include events from the past `maximumNumberOfDays` in event broadcasts
- Added feature to broadcast news feed items `NEWS_FEED` and updated news items `NEWS_FEED_UPDATED` in default [newsfeed](https://github.com/MichMich/MagicMirror/tree/develop/modules/default/newsfeed) module (when news is updated) with documented default and `config.js` options in [README.md](https://github.com/MichMich/MagicMirror/blob/develop/modules/default/newsfeed/README.md)
@@ -303,7 +303,7 @@ Fixed `package.json` version number.
## [2.7.0] - 2019-04-01
-?? **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues running Electron, make sure your [Raspbian is up to date](https://www.raspberrypi.org/documentation/raspbian/updating.md).
+ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues running Electron, make sure your [Raspbian is up to date](https://www.raspberrypi.org/documentation/raspbian/updating.md).
### Added
@@ -360,9 +360,9 @@ Fixed `package.json` version number.
## [2.6.0] - 2019-01-01
-?? **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues updating, make sure you are running the latest version of Node.
+ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`. If you are having issues updating, make sure you are running the latest version of Node.
-### ? Experimental ?
+### ✨ Experimental ✨
- New default [module weather](modules/default/weather). This module will eventually replace the current `currentweather` and `weatherforecast` modules. The new module is still pretty experimental, but it's included so you can give it a try and help us improve this module. Please give us you feedback using [this forum post](https://forum.magicmirror.builders/topic/9335/default-weather-module-refactoring).
@@ -432,7 +432,7 @@ A huge, huge, huge thanks to user @fewieden for all his hard work on the new `we
- Updated Simplified Chinese translation
- Swedish translations
- Hungarian translations for the updatenotification module
-- Updated Norsk bokm�l translation
+- Updated Norsk bokmål translation
- Updated Norsk nynorsk translation
- Consider multi days event as full day events
@@ -444,9 +444,9 @@ A huge, huge, huge thanks to user @fewieden for all his hard work on the new `we
## [2.4.0] - 2018-07-01
-?? **Warning:** This release includes an updated version of Electron. This requires a Raspberry Pi configuration change to allow the best performance and prevent the CPU from overheating. Please read the information on the [MagicMirror Wiki](https://github.com/michmich/magicmirror/wiki/configuring-the-raspberry-pi#enable-the-open-gl-driver-to-decrease-electrons-cpu-usage).
+⚠️ **Warning:** This release includes an updated version of Electron. This requires a Raspberry Pi configuration change to allow the best performance and prevent the CPU from overheating. Please read the information on the [MagicMirror Wiki](https://github.com/michmich/magicmirror/wiki/configuring-the-raspberry-pi#enable-the-open-gl-driver-to-decrease-electrons-cpu-usage).
-?? **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
+ℹ️ **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
### Added
@@ -460,7 +460,7 @@ A huge, huge, huge thanks to user @fewieden for all his hard work on the new `we
- Add regex filtering to calendar module
- Customize classes for table
- Added option to newsfeed module to only log error parsing a news article if enabled
-- Add update translations for Portugu�s Brasileiro
+- Add update translations for Português Brasileiro
### Changed
@@ -552,7 +552,7 @@ A huge, huge, huge thanks to user @fewieden for all his hard work on the new `we
### Added
- Add option to use [Nunjucks](https://mozilla.github.io/nunjucks/) templates in modules. (See `helloworld` module as an example.)
-- Add Bulgarian translations for MagicMirror� and Alert module.
+- Add Bulgarian translations for MagicMirror² and Alert module.
- Add graceful shutdown of modules by calling `stop` function of each `node_helper` on SIGINT before exiting.
- Link update subtext to Github diff of current version versus tracking branch.
- Add Catalan translation.
@@ -884,7 +884,7 @@ A huge, huge, huge thanks to user @fewieden for all his hard work on the new `we
## [2.0.0] - 2016-05-03
-### Initial release of MagicMirror�
+### Initial release of MagicMirror²
It includes (but is not limited to) the following features:
From 846212798c7082b621e3809463029cc8a7f1812a Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 13:29:10 +0100
Subject: [PATCH 27/45] Update node-ci.js.yml
---
.github/workflows/node-ci.js.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/node-ci.js.yml b/.github/workflows/node-ci.js.yml
index a88f3109..f794c941 100644
--- a/.github/workflows/node-ci.js.yml
+++ b/.github/workflows/node-ci.js.yml
@@ -1,7 +1,7 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
-name: MagicMirror Automated Testing
+name: Automated Tests
on:
push:
From 4e6e84c63757b1a9bf64b9a66740826f9d882a97 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 13:33:03 +0100
Subject: [PATCH 28/45] Replace Badge
---
README.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 54e3cb9b..d4ca67ab 100644
--- a/README.md
+++ b/README.md
@@ -5,8 +5,7 @@
-
-
+
**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).
From f8085ed78f288fad694572082e4da36a031c368c Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 13:56:19 +0100
Subject: [PATCH 29/45] Update CHANGELOG.md
---
CHANGELOG.md | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d38b7c2f..7d165826 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,9 +18,10 @@ _This release is scheduled to be released on 2021-01-01._
- Added SMHI as a provider to Weather module.
- Added Hindi & Gujarati translation.
- Chuvash translation.
-- Calendar: new options "limitDays" and "coloredEvents"
-- Added new option "limitDays" - limit the number of discreet days displayed
-- Added new option "customEvents" - use custom symbol/color based on keyword in event title
+- Calendar: new options "limitDays" and "coloredEvents".
+- Added new option "limitDays" - limit the number of discreet days displayed.
+- Added new option "customEvents" - use custom symbol/color based on keyword in event title.
+- Added GitHub workflows for automated testing and changelog enforcement.
### Updated
@@ -28,26 +29,28 @@ _This release is scheduled to be released on 2021-01-01._
- Update dependencies to latest versions.
- Update dependencies eslint, feedme, simple-git and socket.io to latest versions.
- Update lithuanian translation.
-- Weather module - Always displays night icons when local is other then English. (#2221)
### Deleted
+- Removed Travis CI intergration.
+
### Fixed
- JSON Parse translation files with comments crashing UI. (#2149)
- Calendar parsing where RRULE bug returns wrong date, add Windows timezone name support. (#2145, #2151)
- Wrong node-ical version installed (package.json) requested version. (#2153)
-- Fix calendar fetcher subsequent timing (#2160)
+- Fix calendar fetcher subsequent timing. (#2160)
- Rename Greek translation to correct ISO 639-1 alpha-2 code (gr > el). (#2155)
-- Add a space after icons of sunrise and sunset (#2169)
-- Fix calendar when no DTEND record found in event, startDate overlay when endDate set (#2177)
-- Fix windspeed convertion error in ukmetoffice weather provider (#2189)
-- Fix console.debug not having timestamps (#2199)
-- Fix calendar full day event east of UTC start time (#2200)
-- Fix non-fullday recurring rule processing (#2216)
-- Catch errors when parsing calendar data with ical (#2022)
-- Corrected logic for timeFormat "relative" and "absolute"
-- Fix Default Alert Module does not hide black overlay when alert is dismissed manually (#2228)
+- Add a space after icons of sunrise and sunset. (#2169)
+- Fix calendar when no DTEND record found in event, startDate overlay when endDate set. (#2177)
+- Fix windspeed convertion error in ukmetoffice weather provider. (#2189)
+- Fix console.debug not having timestamps. (#2199)
+- Fix calendar full day event east of UTC start time. (#2200)
+- Fix non-fullday recurring rule processing. (#2216)
+- Catch errors when parsing calendar data with ical. (#2022)
+- Corrected logic for timeFormat "relative" and "absolute".
+- Fix Default Alert Module does not hide black overlay when alert is dismissed manually. (#2228)
+- Weather module - Always displays night icons when local is other then English. (#2221)
## [2.13.0] - 2020-10-01
From a5a5e731960654b277c255f74284aebad47f451d Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Mon, 21 Dec 2020 13:59:03 +0100
Subject: [PATCH 30/45] Fix Prettier issue.
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7d165826..14524ffc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,7 +32,7 @@ _This release is scheduled to be released on 2021-01-01._
### Deleted
-- Removed Travis CI intergration.
+- Removed Travis CI intergration.
### Fixed
From 225bece44efecccd8c6bffeab8696aa5010eaf07 Mon Sep 17 00:00:00 2001
From: Sam Detweiler
Date: Wed, 23 Dec 2020 08:53:45 -0600
Subject: [PATCH 31/45] update node-ical to 0.12.4
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index d9f96c6f..6da3538c 100644
--- a/package.json
+++ b/package.json
@@ -80,7 +80,7 @@
"iconv-lite": "^0.6.2",
"module-alias": "^2.2.2",
"moment": "^2.29.1",
- "node-ical": "^0.12.3",
+ "node-ical": "^0.12.4",
"request": "^2.88.2",
"rrule": "^2.6.6",
"rrule-alt": "^2.2.8",
From 6b12601c6f910f05a4a32214fbb304f795df19b2 Mon Sep 17 00:00:00 2001
From: Sam Detweiler
Date: Wed, 23 Dec 2020 08:57:22 -0600
Subject: [PATCH 32/45] update node-ical to 0.12.4
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 14524ffc..7228c8b6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -51,6 +51,7 @@ _This release is scheduled to be released on 2021-01-01._
- Corrected logic for timeFormat "relative" and "absolute".
- Fix Default Alert Module does not hide black overlay when alert is dismissed manually. (#2228)
- Weather module - Always displays night icons when local is other then English. (#2221)
+- update Node-ical 0.12.4 , fix invalid RRULE format in cal entries
## [2.13.0] - 2020-10-01
From a50824eeee587ff6c07e0720dae38c4392cd13f7 Mon Sep 17 00:00:00 2001
From: buxxi
Date: Mon, 28 Dec 2020 11:50:01 +0100
Subject: [PATCH 33/45] Merging config/.gitignore with .gitignore
---
.gitignore | 4 ++++
CHANGELOG.md | 2 +-
config/.gitignore | 2 --
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 config/.gitignore
diff --git a/.gitignore b/.gitignore
index 08c2df0c..a0177025 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,6 +67,10 @@ Temporary Items
# Ignore changes to the custom css files.
/css/custom.css
+# Ignore users config file but keep the sample.
+/config/*
+!/config/config.js.sample
+
# Vim
## swap
[._]*.s[a-w][a-z]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7228c8b6..53d096ae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,7 +24,7 @@ _This release is scheduled to be released on 2021-01-01._
- Added GitHub workflows for automated testing and changelog enforcement.
### Updated
-
+- Merging .gitignore in the config-folder with the .gitignore in the root-folder.
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand.
- Update dependencies to latest versions.
- Update dependencies eslint, feedme, simple-git and socket.io to latest versions.
diff --git a/config/.gitignore b/config/.gitignore
deleted file mode 100644
index d85e3bd4..00000000
--- a/config/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!config.js.sample
From e5ff320591e5ca3585c48ef885b8d94df94f3f13 Mon Sep 17 00:00:00 2001
From: Sam Detweiler
Date: Mon, 28 Dec 2020 08:15:40 -0600
Subject: [PATCH 34/45] fix package.json for optional dependency
---
CHANGELOG.md | 1 +
package.json | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7228c8b6..3831093a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -52,6 +52,7 @@ _This release is scheduled to be released on 2021-01-01._
- Fix Default Alert Module does not hide black overlay when alert is dismissed manually. (#2228)
- Weather module - Always displays night icons when local is other then English. (#2221)
- update Node-ical 0.12.4 , fix invalid RRULE format in cal entries
+- fix package.json for optional electron dependency (2378)
## [2.13.0] - 2020-10-01
diff --git a/package.json b/package.json
index 6da3538c..2298f95c 100644
--- a/package.json
+++ b/package.json
@@ -70,7 +70,6 @@
"dependencies": {
"colors": "^1.4.0",
"console-stamp": "^3.0.0-rc4.2",
- "electron": "^8.5.3",
"eslint": "^7.15.0",
"express": "^4.17.1",
"express-ipfilter": "^1.1.2",
From 0975826457c3f1e36fc4dbc1b7cc77586199fd19 Mon Sep 17 00:00:00 2001
From: Sam Detweiler
Date: Mon, 28 Dec 2020 08:24:19 -0600
Subject: [PATCH 35/45] update node-ical version
---
CHANGELOG.md | 1 +
package.json | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3831093a..152b7a7a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -53,6 +53,7 @@ _This release is scheduled to be released on 2021-01-01._
- Weather module - Always displays night icons when local is other then English. (#2221)
- update Node-ical 0.12.4 , fix invalid RRULE format in cal entries
- fix package.json for optional electron dependency (2378)
+- update node-ical version again, 0.12.5, change RRULE fix (#2371, #2379)
## [2.13.0] - 2020-10-01
diff --git a/package.json b/package.json
index 2298f95c..551a00b1 100644
--- a/package.json
+++ b/package.json
@@ -79,7 +79,7 @@
"iconv-lite": "^0.6.2",
"module-alias": "^2.2.2",
"moment": "^2.29.1",
- "node-ical": "^0.12.4",
+ "node-ical": "^0.12.5",
"request": "^2.88.2",
"rrule": "^2.6.6",
"rrule-alt": "^2.2.8",
From 07e75b85505ad6cfd7707d719eb04e6aeeeb0c8d Mon Sep 17 00:00:00 2001
From: rejas
Date: Tue, 29 Dec 2020 10:21:50 +0100
Subject: [PATCH 36/45] Adjust log level in sample
---
config/config.js.sample | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/config.js.sample b/config/config.js.sample
index 55e84cb4..eb79b9d6 100644
--- a/config/config.js.sample
+++ b/config/config.js.sample
@@ -28,7 +28,7 @@ var config = {
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
language: "en",
- logLevel: ["DEBUG", "INFO", "LOG", "WARN", "ERROR"],
+ logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
timeFormat: 24,
units: "metric",
// serverOnly: true/false/"local" ,
From 7802e0bb88fa4c36a71962fba7da9a82e7f0b674 Mon Sep 17 00:00:00 2001
From: rejas
Date: Tue, 29 Dec 2020 10:23:12 +0100
Subject: [PATCH 37/45] Set locationID everywhere on config sample
---
config/config.js.sample | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/config.js.sample b/config/config.js.sample
index eb79b9d6..648a8ef6 100644
--- a/config/config.js.sample
+++ b/config/config.js.sample
@@ -70,7 +70,7 @@ var config = {
position: "top_right",
config: {
location: "New York",
- locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
+ locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
From 30cf7f8afeb1d9da0aafa9942d8b9561e1e644e5 Mon Sep 17 00:00:00 2001
From: rejas
Date: Tue, 29 Dec 2020 10:23:57 +0100
Subject: [PATCH 38/45] Update CHANGELOG
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7228c8b6..d4768f45 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ _This release is scheduled to be released on 2021-01-01._
- Update dependencies to latest versions.
- Update dependencies eslint, feedme, simple-git and socket.io to latest versions.
- Update lithuanian translation.
+- Update config sample.
### Deleted
From dd23db0ad87adcb46cadaeb667e8dec82aacf1e9 Mon Sep 17 00:00:00 2001
From: buxxi
Date: Tue, 29 Dec 2020 12:43:40 +0100
Subject: [PATCH 39/45] Running prettier for CHANGELOG
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53d096ae..d3c070e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@ _This release is scheduled to be released on 2021-01-01._
- Added GitHub workflows for automated testing and changelog enforcement.
### Updated
+
- Merging .gitignore in the config-folder with the .gitignore in the root-folder.
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand.
- Update dependencies to latest versions.
From 67bedf864808958d92cb0f0dc702c0418126caa2 Mon Sep 17 00:00:00 2001
From: rejas
Date: Thu, 23 Apr 2020 07:24:20 +0200
Subject: [PATCH 40/45] Add missing function ()
---
js/module.js | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/js/module.js b/js/module.js
index 40f9b311..28291a84 100644
--- a/js/module.js
+++ b/js/module.js
@@ -429,15 +429,10 @@ var Module = Class.extend({
options = options || {};
var self = this;
- MM.showModule(
- this,
- speed,
- function () {
- self.resume();
- callback;
- },
- options
- );
+ MM.showModule(this, speed, function () {
+ self.resume();
+ callback();
+ }, options);
}
});
From efafb1c28a8cebe4fc480a429f051c83f8f68882 Mon Sep 17 00:00:00 2001
From: rejas
Date: Tue, 29 Dec 2020 18:48:45 +0100
Subject: [PATCH 41/45] Cleanup jsdoc
---
js/module.js | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/js/module.js b/js/module.js
index 28291a84..d52eb02b 100644
--- a/js/module.js
+++ b/js/module.js
@@ -228,7 +228,7 @@ var Module = Class.extend({
* Set the module config and combine it with the module defaults.
*
* @param {object} config The combined module config.
- * @param {boolean} config Merge module config in deep.
+ * @param {boolean} deep Merge module config in deep.
*/
setConfig: function (config, deep) {
this.config = deep ? configMerge({}, this.defaults, config) : Object.assign({}, this.defaults, config);
@@ -429,20 +429,27 @@ var Module = Class.extend({
options = options || {};
var self = this;
- MM.showModule(this, speed, function () {
- self.resume();
- callback();
- }, options);
+ MM.showModule(
+ this,
+ speed,
+ function () {
+ self.resume();
+ callback();
+ },
+ options
+ );
}
});
-/** Merging MagicMirror (or other) default/config script
- * merge 2 objects or/with array
- * using:
+/**
+ * Merging MagicMirror (or other) default/config script by @bugsounet
+ * Merge 2 objects or/with array
+ *
+ * Usage:
* -------
* this.config = configMerge({}, this.defaults, this.config)
* -------
- * arg1: initial objet
+ * arg1: initial object
* arg2: config model
* arg3: config to merge
* -------
@@ -451,10 +458,12 @@ var Module = Class.extend({
* it don't merge all thing in deep
* -> object in object and array is not merging
* -------
- * @bugsounet
- * @Todo: idea of Mich determinate what do you want to merge or not
+ *
+ * Todo: idea of Mich determinate what do you want to merge or not
+ *
+ * @param {object} result the initial object
+ * @returns {object} the merged config
*/
-
function configMerge(result) {
var stack = Array.prototype.slice.call(arguments, 1);
var item;
From 3fcbf159155c233450e11c7bbea2ffb8a9fa915f Mon Sep 17 00:00:00 2001
From: rejas
Date: Tue, 29 Dec 2020 18:50:10 +0100
Subject: [PATCH 42/45] Update CHANGELOG
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09d887bb..d950b549 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,6 +56,7 @@ _This release is scheduled to be released on 2021-01-01._
- update Node-ical 0.12.4 , fix invalid RRULE format in cal entries
- fix package.json for optional electron dependency (2378)
- update node-ical version again, 0.12.5, change RRULE fix (#2371, #2379)
+- Added missing function call in module.show()
## [2.13.0] - 2020-10-01
From 7a4eddc592615361768b1d6e3ab8884502640ecf Mon Sep 17 00:00:00 2001
From: rejas
Date: Sat, 20 Jun 2020 12:07:04 +0200
Subject: [PATCH 43/45] Adjust some log levels
---
js/check_config.js | 2 +-
js/server.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/js/check_config.js b/js/check_config.js
index 2bab5220..c9bfe442 100644
--- a/js/check_config.js
+++ b/js/check_config.js
@@ -46,7 +46,7 @@ function checkConfigFile() {
try {
fs.accessSync(configFileName, fs.F_OK);
} catch (e) {
- Log.log(Utils.colors.error(e));
+ Log.error(Utils.colors.error(e));
throw new Error("No permission to access config file!");
}
diff --git a/js/server.js b/js/server.js
index b0ae9528..cd26190b 100644
--- a/js/server.js
+++ b/js/server.js
@@ -37,7 +37,7 @@ var Server = function (config, callback) {
server.listen(port, config.address ? config.address : "localhost");
if (config.ipWhitelist instanceof Array && config.ipWhitelist.length === 0) {
- Log.info(Utils.colors.warn("You're using a full whitelist configuration to allow for all IPs"));
+ Log.warn(Utils.colors.warn("You're using a full whitelist configuration to allow for all IPs"));
}
app.use(function (req, res, next) {
From 61cf92c67a72d30aa46fd01645411b6866465003 Mon Sep 17 00:00:00 2001
From: Karsten Hassel
Date: Tue, 29 Dec 2020 21:10:50 +0100
Subject: [PATCH 44/45] removes undefined objects from modules array, see issue
#2382
---
CHANGELOG.md | 1 +
js/main.js | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09d887bb..a35867fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,6 +56,7 @@ _This release is scheduled to be released on 2021-01-01._
- update Node-ical 0.12.4 , fix invalid RRULE format in cal entries
- fix package.json for optional electron dependency (2378)
- update node-ical version again, 0.12.5, change RRULE fix (#2371, #2379)
+- remove undefined objects from modules array (#2382)
## [2.13.0] - 2020-10-01
diff --git a/js/main.js b/js/main.js
index 9d241a07..dfcf3e04 100644
--- a/js/main.js
+++ b/js/main.js
@@ -502,7 +502,7 @@ var MM = (function () {
modules = [];
for (var m in moduleObjects) {
var module = moduleObjects[m];
- modules[module.data.index] = module;
+ modules[m] = module;
}
Log.info("All modules started!");
From e507f95b2a8e6eea4b03bf8d13ef2e1248e3b8dc Mon Sep 17 00:00:00 2001
From: Karsten Hassel
Date: Tue, 29 Dec 2020 21:45:35 +0100
Subject: [PATCH 45/45] added suggestion from @rejas
---
js/main.js | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/js/main.js b/js/main.js
index dfcf3e04..b7138d99 100644
--- a/js/main.js
+++ b/js/main.js
@@ -500,10 +500,7 @@ var MM = (function () {
*/
modulesStarted: function (moduleObjects) {
modules = [];
- for (var m in moduleObjects) {
- var module = moduleObjects[m];
- modules[m] = module;
- }
+ moduleObjects.forEach((module) => modules.push(module));
Log.info("All modules started!");
sendNotification("ALL_MODULES_STARTED");