Skip to content
Permalink
Browse files

Merge pull request #1717 from MichMich/develop

Release 2.8.0
  • Loading branch information...
MichMich committed Jul 1, 2019
2 parents b508a62 + 361b62b commit a31546b1ff8c7c10e12d7acbab063297d59c6b93
Showing with 5,422 additions and 3,413 deletions.
  1. +0 −1 .eslintignore
  2. +2 −0 .eslintrc.json
  3. +19 −0 .github/stale.yml
  4. 0 .stylelintrc → .stylelintrc.json
  5. +49 −0 CHANGELOG.md
  6. +5 −4 Gruntfile.js
  7. +2 −2 README.md
  8. +6 −6 clientonly/index.js
  9. +6 −5 config/config.js.sample
  10. +4 −4 dangerfile.js
  11. +88 −17 installers/raspberry.sh
  12. +13 −6 js/app.js
  13. +3 −4 js/class.js
  14. +1 −0 js/electron.js
  15. +2 −7 js/loader.js
  16. +6 −6 js/main.js
  17. +8 −9 js/module.js
  18. +2 −2 js/server.js
  19. +2 −1 js/translator.js
  20. +1 −1 modules/README.md
  21. +3 −4 modules/default/alert/alert.js
  22. +5 −2 modules/default/calendar/README.md
  23. +68 −31 modules/default/calendar/calendar.js
  24. +122 −29 modules/default/calendar/calendarfetcher.js
  25. +1 −0 modules/default/calendar/debug.js
  26. +4 −3 modules/default/calendar/node_helper.js
  27. +1 −3 modules/default/calendar/vendor/ical.js/.travis.yml
  28. +13 −10 modules/default/calendar/vendor/ical.js/example.js
  29. +118 −0 modules/default/calendar/vendor/ical.js/example_rrule.js
  30. +40 −0 modules/default/calendar/vendor/ical.js/examples/example_rrule.ics
  31. +202 −89 modules/default/calendar/vendor/ical.js/ical.js
  32. +42 −32 modules/default/calendar/vendor/ical.js/node-ical.js
  33. +5 −4 modules/default/calendar/vendor/ical.js/package.json
  34. +26 −15 modules/default/calendar/vendor/ical.js/readme.md
  35. +119 −12 modules/default/calendar/vendor/ical.js/test/test.js
  36. +19 −0 modules/default/calendar/vendor/ical.js/test/test12.ics
  37. +57 −0 modules/default/calendar/vendor/ical.js/test/test13.ics
  38. +33 −0 modules/default/calendar/vendor/ical.js/test/test14.ics
  39. +11 −0 modules/default/clock/README.md
  40. +23 −5 modules/default/clock/clock.js
  41. +3 −5 modules/default/compliments/compliments.js
  42. +2 −1 modules/default/currentweather/README.md
  43. +7 −1 modules/default/currentweather/currentweather.js
  44. +2 −2 modules/default/helloworld/helloworld.js
  45. +12 −2 modules/default/newsfeed/README.md
  46. +1 −2 modules/default/newsfeed/fetcher.js
  47. +26 −5 modules/default/newsfeed/newsfeed.js
  48. +1 −1 modules/default/updatenotification/node_helper.js
  49. +2 −3 modules/default/updatenotification/updatenotification.js
  50. +12 −2 modules/default/weather/README.md
  51. +13 −6 modules/default/weather/current.njk
  52. +1 −1 modules/default/weather/forecast.njk
  53. +6 −4 modules/default/weather/providers/README.md
  54. +2 −2 modules/default/weather/providers/darksky.js
  55. +8 −8 modules/default/weather/providers/openweathermap.js
  56. +262 −0 modules/default/weather/providers/ukmetoffice.js
  57. +47 −41 modules/default/weather/providers/weathergov.js
  58. +17 −7 modules/default/weather/weather.js
  59. +13 −5 modules/default/weather/weatherobject.js
  60. +7 −9 modules/default/weather/weatherprovider.js
  61. +1 −1 modules/default/weatherforecast/README.md
  62. +2 −2 modules/default/weatherforecast/weatherforecast.css
  63. +6 −6 modules/default/weatherforecast/weatherforecast.js
  64. +3,777 −2,835 package-lock.json
  65. +9 −12 package.json
  66. +5 −5 tests/configs/check_config.js
  67. +1 −1 tests/configs/env.js
  68. +0 −1 tests/configs/modules/positions.js
  69. +1 −1 tests/configs/port_8090.js
  70. +0 −5 tests/e2e/dev_console.js
  71. +0 −2 tests/e2e/env_spec.js
  72. +2 −7 tests/e2e/fonts.js
  73. +0 −1 tests/e2e/global-setup.js
  74. +1 −3 tests/e2e/ipWhistlist_spec.js
  75. +1 −5 tests/e2e/modules/calendar_spec.js
  76. +0 −5 tests/e2e/modules/clock_es_spec.js
  77. +0 −4 tests/e2e/modules/clock_spec.js
  78. +0 −3 tests/e2e/modules/compliments_spec.js
  79. +0 −6 tests/e2e/modules/helloworld_spec.js
  80. +0 −4 tests/e2e/modules/newsfeed_spec.js
  81. +1 −9 tests/e2e/modules_position_spec.js
  82. +2 −5 tests/e2e/port_config.js
  83. +1 −2 tests/e2e/translations_spec.js
  84. +1 −3 tests/e2e/vendor_spec.js
  85. +2 −7 tests/e2e/without_modules.js
  86. +2 −3 tests/servers/basic-auth.js
  87. +1 −2 tests/unit/classes/class_spec.js
  88. +1 −2 tests/unit/classes/deprecated_spec.js
  89. +1 −3 tests/unit/classes/translator_spec.js
  90. +1 −3 tests/unit/classes/utils_spec.js
  91. +1 −1 tests/unit/functions/calendar_spec.js
  92. +1 −3 tests/unit/functions/cmp_versions_spec.js
  93. +3 −11 tests/unit/functions/currentweather_spec.js
  94. +2 −8 tests/unit/functions/newsfeed_spec.js
  95. +3 −9 tests/unit/functions/weatherforecast_spec.js
  96. +1 −3 tests/unit/global_vars/defaults_modules_spec.js
  97. +1 −4 tests/unit/global_vars/root_path_spec.js
  98. +2 −1 translations/en.json
  99. +5 −1 translations/fi.json
  100. +1 −0 translations/ru.json
  101. +0 −1 translations/sv.json
  102. +0 −1 translations/translations.js
  103. +5 −0 vendor/package-lock.json
  104. +1 −0 vendor/package.json
  105. +2 −1 vendor/vendor.js
@@ -3,4 +3,3 @@ vendor/*
!/modules/default/**
!/modules/node_helper
!/modules/node_helper/**
!/modules/default/defaultmodules.js
@@ -2,9 +2,11 @@
"rules": {
"indent": ["error", "tab"],
"quotes": ["error", "double"],
"semi": ["error"],
"max-len": ["error", 250],
"curly": "error",
"camelcase": ["error", {"properties": "never"}],
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
"no-trailing-spaces": ["error", {"ignoreComments": false }],
"no-irregular-whitespace": ["error"]
},
@@ -0,0 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- under investigation
- pr welcome
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
File renamed without changes.
49 CHANGELOG.md 100644 → 100755
@@ -7,6 +7,55 @@ This project adheres to [Semantic Versioning](http://semver.org/).

❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/donate) With your help we can continue to improve the MagicMirror² core.

## [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).

### Added
- Option to show event location in calendar
- Finnish translation for "Feels" and "Weeks"
- 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)
- Added notifications to default `clock` module broadcasting `CLOCK_SECOND` and `CLOCK_MINUTE` for the respective time elapsed.
- Added UK Met Office Datapoint feed as a provider in the default weather module.
- Added new provider class
- Added suncalc.js dependency to calculate sun times (not provided in UK Met Office feed)
- Added "tempUnits" and "windUnits" to allow, for example, temp in metric (i.e. celsius) and wind in imperial (i.e. mph). These will override "units" if specified, otherwise the "units" value will be used.
- Use Feels Like temp from feed if present
- Optionally display probability of precipitation (PoP) in current weather (UK Met Office data)
- Automatically try to fix eslint errors by passing `--fix` option to it
- Added sunrise and sunset times to weathergov weather provider [#1705](https://github.com/MichMich/MagicMirror/issues/1705)
- Added "useLocationAsHeader" to display "location" in `config.js` as header when location name is not returned
- Added to `newsfeed.js`: in order to design the news article better with css, three more class-names were introduced: newsfeed-desc, newsfeed-desc, newsfeed-desc

### Updated
- English translation for "Feels" to "Feels like"
- Fixed the example calender url in `config.js.sample`
- Update `ical.js` to solve various calendar issues.
- Update weather city list url [#1676](https://github.com/MichMich/MagicMirror/issues/1676)
- Only update clock once per minute when seconds aren't shown

### Fixed
- Fixed uncaught exception, race condition on module update
- Fixed issue [#1696](https://github.com/MichMich/MagicMirror/issues/1696), some ical files start date to not parse to date type
- Allowance HTML5 autoplay-policy (policy is changed from Chrome 66 updates)
- Handle SIGTERM messages
- Fixes sliceMultiDayEvents so it respects maximumNumberOfDays
- Minor types in default NewsFeed [README.md](https://github.com/MichMich/MagicMirror/blob/develop/modules/default/newsfeed/README.md)
- Fix typos and small syntax errors, cleanup dependencies, remove multiple-empty-lines, add semi-rule
- Fixed issues with calendar not displaying one-time changes to repeating events
- Updated the fetchedLocationName variable in currentweather.js so that city shows up in the header

### Updated installer
- give non-pi2+ users (pi0, odroid, jetson nano, mac, windows, ...) option to continue install
- use current username vs hardcoded 'pi' to support non-pi install
- check for npm installed. node install doesn't do npm anymore
- check for mac as part of PM2 install, add install option string
- update pm2 config with current username instead of hard coded 'pi'
- check for screen saver config, "/etc/xdg/lxsession", bypass if not setup

## [2.7.1] - 2019-04-02

Fixed `package.json` version number.
@@ -4,6 +4,7 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON("package.json"),
eslint: {
options: {
fix: "true",
configFile: ".eslintrc.json"
},
target: [
@@ -26,7 +27,7 @@ module.exports = function(grunt) {
stylelint: {
simple: {
options: {
configFile: ".stylelintrc"
configFile: ".stylelintrc.json"
},
src: [
"css/main.css",
@@ -42,11 +43,11 @@ module.exports = function(grunt) {
src: [
"package.json",
".eslintrc.json",
".stylelintrc",
".stylelintrc.json",
"installers/pm2_MagicMirror.json",
"translations/*.json",
"modules/default/*/translations/*.json",
"installers/pm2_MagicMirror.json",
"vendor/package.js"
"vendor/package.json"
],
options: {
reporter: "jshint"
@@ -5,7 +5,7 @@
<a href="https://david-dm.org/MichMich/MagicMirror#info=devDependencies"><img src="https://david-dm.org/MichMich/MagicMirror/dev-status.svg" alt="devDependency Status"></a>
<a href="https://bestpractices.coreinfrastructure.org/projects/347"><img src="https://bestpractices.coreinfrastructure.org/projects/347/badge"></a>
<a href="http://choosealicense.com/licenses/mit"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
<a href="https://travis-ci.org/MichMich/MagicMirror"><img src="https://travis-ci.org/MichMich/MagicMirror.svg" alt="Travis"></a>
<a href="https://travis-ci.com/MichMich/MagicMirror"><img src="https://travis-ci.com/MichMich/MagicMirror.svg" alt="Travis"></a>
<a href="https://snyk.io/test/github/MichMich/MagicMirror"><img src="https://snyk.io/test/github/MichMich/MagicMirror/badge.svg" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/MichMich/MagicMirror" style="max-width:100%;"></a>
</p>

@@ -208,7 +208,7 @@ Thanks for your help in making MagicMirror² better!
MagicMirror² is opensource and free. That doesn't mean we don't need any money.

Please consider a donation to help us cover the ongoing costs like webservers and email services.
If we recieve enough donations we might even be able to free up some working hours and spend some extra time improving the MagicMirror² core.
If we receive enough donations we might even be able to free up some working hours and spend some extra time improving the MagicMirror² core.

To donate, please follow [this](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G5D8E9MR5DTD2&source=url) link.

@@ -2,7 +2,7 @@

"use strict";

// Use seperate scope to prevent global scope pollution
// Use separate scope to prevent global scope pollution
(function () {
var config = {};

@@ -19,7 +19,7 @@
// Prefer command line arguments over environment variables
["address", "port"].forEach((key) => {
config[key] = getCommandLineParameter(key, process.env[key.toUpperCase()]);
})
});
}

function getServerConfig(url) {
@@ -30,7 +30,7 @@
const request = lib.get(url, (response) => {
var configData = "";

// Gather incomming data
// Gather incoming data
response.on("data", function(chunk) {
configData += chunk;
});
@@ -43,8 +43,8 @@
request.on("error", function(error) {
reject(new Error(`Unable to read config from server (${url} (${error.message}`));
});
})
};
});
}

function fail(message, code = 1) {
if (message !== undefined && typeof message === "string") {
@@ -89,7 +89,7 @@
});

child.on("close", (code) => {
if (code != 0) {
if (code !== 0) {
console.log(`There something wrong. The clientonly is not running code ${code}`);
}
});
@@ -45,8 +45,7 @@ var config = {
calendars: [
{
symbol: "calendar-check",
url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
}
url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" }
]
}
},
@@ -59,7 +58,7 @@ var config = {
position: "top_right",
config: {
location: "New York",
locationID: "", //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
@@ -69,7 +68,7 @@ var config = {
header: "Weather Forecast",
config: {
location: "New York",
locationID: "5128581", //ID from https://openweathermap.org/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"
}
},
@@ -84,7 +83,9 @@ var config = {
}
],
showSourceTitle: true,
showPublishDate: true
showPublishDate: true,
broadcastNewsFeeds: true,
broadcastNewsUpdates: true
}
},
]
@@ -1,9 +1,9 @@
import { danger, fail, warn } from "danger"
import { danger, fail, warn } from "danger";

// Check if the CHANGELOG.md file has been edited
// Fail the build and post a comment reminding submitters to do so if it wasn't changed
if (!danger.git.modified_files.includes("CHANGELOG.md")) {
warn("Please include an updated `CHANGELOG.md` file.<br>This way we can keep track of all the contributions.")
warn("Please include an updated `CHANGELOG.md` file.<br>This way we can keep track of all the contributions.");
}

// Check if the PR request is send to the master branch.
@@ -12,6 +12,6 @@ if (danger.github.pr.base.ref === "master" && danger.github.pr.user.login !== "M
// Check if the PR body or title includes the text: #accepted.
// If not, the PR will fail.
if ((danger.github.pr.body + danger.github.pr.title).includes("#accepted")) {
fail("Please send all your pull requests to the `develop` branch.<br>Pull requests on the `master` branch will not be accepted.")
fail("Please send all your pull requests to the `develop` branch.<br>Pull requests on the `master` branch will not be accepted.");
}
}
}

0 comments on commit a31546b

Please sign in to comment.
You can’t perform that action at this time.