421 Commits

Author SHA1 Message Date
Karsten Hassel
aad3eefc62
update node-ical to v0.17.1 (and other deps) (#3309)
- update `node-ical` to `v0.17.1` (and other deps)
- remove `luxon` (not needed anymore with new `node-ical` version)
- fix `navigator is not defined` errors in e2e tests when running with
Node `v20`
2023-12-28 19:54:49 +01:00
Kristjan ESPERANTO
0b70274a1a
Replace prettier by stylistic to lint JavaScript (#3303)
In the latest versions of ESLint, more and more formatting rules were
removed or declared deprecated. These rules have been integrated into
the new Stylistic package (https://eslint.style/guide/why) and expanded.

Stylistic acts as a better formatter  for JavaScript as Prettier.

With this PR there are many changes that make the code more uniform, but
it may be difficult to review due to the large amount. Even if I have no
worries about the changes, perhaps this would be something for the
release after next.

Let me know what you think.
2023-12-25 08:17:11 +01:00
Karsten Hassel
d5406f4900
update deps and fix style issue in js/class.js (#3289)
see title, should be merged because style tests are failing, see
https://github.com/MichMich/MagicMirror/pull/3284#issuecomment-1854513673
2023-12-13 22:48:23 +01:00
Veeck
e77f10b86d
Update dependencies (#3280)
Took the ones from dependabot and updated the rest...

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 19:14:37 +01:00
Bugsounet - Cédric
203e8647d4
3rd party modules updater for updatenotification (#3150)
Added my (modified) updater main core into updatenotification default
module

Missing: callback display in MM² (i will code it after)

new part of configuration added:

```
		updates: [
			// array of module update commands
			{
				// with embed npm script
				"MMM-Test": "npm run update"
			},
			{
				// with "complex" process
				"MMM-OtherSample": "rm -rf package-lock.json && git reset --hard && git pull && npm install"
			},
			{
				// with git pull && npm install
				"MMM-OtherSample2": "git pull && npm install"
			},
			{
				// with a simple git pull
				"MMM-OtherSample3": "git pull"
			}
		],
		updateTimeout: 2 * 60 * 1000, // max update duration
		updateAutorestart: false // autoRestart MM when update done ?
```

@khassel: i need your help
I don't use docker, maybe you can help me for this:
How can i check if MM² is running inside a docker ? (from MM² main core)
Actually, I check if we use pm2 or not.
I have to check if docker is used or not too
last time you tell me: "you can't use updater with docker", so I want to
check and deny any update if docker used

---------

Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
2023-11-10 12:43:34 +01:00
dependabot[bot]
296df06c21
Bump eslint-plugin-jest from 27.4.3 to 27.6.0 (#3260)
Bumps
[eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)
from 27.4.3 to 27.6.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jest-community/eslint-plugin-jest/releases">eslint-plugin-jest's
releases</a>.</em></p>
<blockquote>
<h2>v27.6.0</h2>
<h1><a
href="https://github.com/jest-community/eslint-plugin-jest/compare/v27.5.0...v27.6.0">27.6.0</a>
(2023-10-26)</h1>
<h3>Features</h3>
<ul>
<li>include plugin <code>meta</code> information for ESLint v9 (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1454">#1454</a>)
(<a
href="4d57146763">4d57146</a>)</li>
</ul>
<h2>v27.5.0</h2>
<h1><a
href="https://github.com/jest-community/eslint-plugin-jest/compare/v27.4.3...v27.5.0">27.5.0</a>
(2023-10-26)</h1>
<h3>Features</h3>
<ul>
<li><strong>valid-title:</strong> allow ignoring tests with non-string
titles (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1460">#1460</a>)
(<a
href="ea89da9b4e">ea89da9</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md">eslint-plugin-jest's
changelog</a>.</em></p>
<blockquote>
<h1><a
href="https://github.com/jest-community/eslint-plugin-jest/compare/v27.5.0...v27.6.0">27.6.0</a>
(2023-10-26)</h1>
<h3>Features</h3>
<ul>
<li>include plugin <code>meta</code> information for ESLint v9 (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1454">#1454</a>)
(<a
href="4d57146763">4d57146</a>)</li>
</ul>
<h1><a
href="https://github.com/jest-community/eslint-plugin-jest/compare/v27.4.3...v27.5.0">27.5.0</a>
(2023-10-26)</h1>
<h3>Features</h3>
<ul>
<li><strong>valid-title:</strong> allow ignoring tests with non-string
titles (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1460">#1460</a>)
(<a
href="ea89da9b4e">ea89da9</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6dfbf15d02"><code>6dfbf15</code></a>
chore(release): 27.6.0 [skip ci]</li>
<li><a
href="4d57146763"><code>4d57146</code></a>
feat: include plugin <code>meta</code> information for ESLint v9 (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1454">#1454</a>)</li>
<li><a
href="55ad33675d"><code>55ad336</code></a>
chore: update <code>moduleResolution</code> and <code>module</code> to
<code>node16</code> (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1455">#1455</a>)</li>
<li><a
href="9cc95920ea"><code>9cc9592</code></a>
chore: replace <code>eslint-plugin-node</code> with
<code>eslint-plugin-n</code> (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1462">#1462</a>)</li>
<li><a
href="1d5bdd1391"><code>1d5bdd1</code></a>
chore(release): 27.5.0 [skip ci]</li>
<li><a
href="ea89da9b4e"><code>ea89da9</code></a>
feat(valid-title): allow ignoring tests with non-string titles (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1460">#1460</a>)</li>
<li><a
href="f2af5194bd"><code>f2af519</code></a>
chore: run CI on Node 21 (<a
href="https://redirect.github.com/jest-community/eslint-plugin-jest/issues/1461">#1461</a>)</li>
<li><a
href="d8b10b47e7"><code>d8b10b4</code></a>
chore: update permissions granted on CI</li>
<li><a
href="4295882c21"><code>4295882</code></a>
chore(deps): lock file maintenance</li>
<li>See full diff in <a
href="https://github.com/jest-community/eslint-plugin-jest/compare/v27.4.3...v27.6.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-plugin-jest&package-manager=npm_and_yarn&previous-version=27.4.3&new-version=27.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 19:48:50 +01:00
Veeck
f80889d953
Update github test action (#3247)
... add node 21 to the tests and also update dependencies
2023-10-23 21:37:52 +02:00
Karsten Hassel
764ca3ac5c
update electron to v27 (#3241)
and 
- update other deps
- update package-lock.json version to v3 in /vendor and /fonts
2023-10-19 23:44:31 +02:00
Veeck
a0b444d6c4
Fix API version in yr weather provider call (#3223)
Fixes #3227 

and also
- removes unused code
- de-duplicates code fragments
- fixes typos
- inlines code
- adds more weather util tests

@martingron and @Justheretoreportanissue would you be so kind to check
if I didnt mess anything up?
2023-10-15 13:25:44 +02:00
Michael Teeuw
66b29ec26e Prepare v2.26.0-develop 2023-10-01 20:17:06 +02:00
Michael Teeuw
6ea94e4512 Release v2.25.0 2023-10-01 20:01:14 +02:00
Bugsounet - Cédric
290b350856
Update last Dependencies before release and add dependabot to vendor/fonts directory (#3213)
Last check before release:

* update to electron: v2.26.4
* update eslint-plugins-jest: v27.4.2
* renew `package-lock.json`
* add dependabot to `vendor` and `fonts` directory (monthly check)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-30 15:18:56 +02:00
Bugsounet - Cédric
e530c783f8
Update Electron based on a severity vulnerability (develop) (#3207)
I just see `electron` package used in develop branch have `1 high
severity vulnerability`

Detail is [there](https://github.com/advisories/GHSA-j7hp-h8jx-5ppr)

We can patch it with electron v26.2.2 (last version at this day) and
will correct it

(ChangeLog is not needed in this case)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: veeck <michael.veeck@nebenan.de>
2023-09-26 23:12:09 +02:00
Bugsounet - Cédric
91fd931a58
Convert HTML entities, codes and tag (#3191)
related to PR [#3092](https://github.com/MichMich/MagicMirror/pull/3092)

maybe best way is using `html-to-text` library

sample: `&quotHello World&quot` will be transformed to `"Hello World"`
2023-09-13 22:47:07 +02:00
Karsten Hassel
f2957f90df
use internal fetch as replacement for node-fetch (#3184)
related to #2649

I was able to move to internal fetch and all tests seems fine so far.

But we have one problem with the calendar module. In the docs we have
several authentication methods and one of them is `digest`. For this we
used `digest-fetch` which needs `node-fetch` (this is not so clear from
code but I was not able to get it working).

So we have 3 options:
- remove `digest` as authentication method for calendar module (this is
what this PR does at the moment)
- find an alternative npm package or implement the digest stuff
ourselves
- use `digest-fetch` and `node-fetch` for calendar module (so they would
remain as dependencies in `package.json`)

Opinions? @KristjanESPERANTO @rejas @sdetweil @MichMich
2023-09-09 21:12:31 +02:00
Veeck
ef20fe2d11
Update dependencies and actions (#3179)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 22:15:45 +02:00
Kristjan ESPERANTO
7c64d8fce6
Minimum node version v18 (#3170)
When the next MagicMirror version is released, node v16 will have
reached its end of life.
2023-08-20 12:55:17 +02:00
Kristjan ESPERANTO
7dcea98e99
Handle pretty-quick issue (#3169)
- Replace pretty-quick by lint-staged (to fix:
<https://github.com/azz/pretty-quick/issues/164>)
- Update prettier dependencies
- Handle prettier issues
2023-08-16 14:21:02 +02:00
Karsten Hassel
59e9d765e2
update to electron v26 (#3168)
- tested on rpi4
- electron tests are fine
2023-08-16 00:05:32 +02:00
Karsten Hassel
58cdfa3cb1
update dependencies (except prettier v3) (#3160) 2023-08-12 22:55:09 +02:00
Veeck
49c72d8dfc
Update dependencies (#3155)
Takes https://github.com/MichMich/MagicMirror/pull/3153 (why does that
always base against master despite the yaml configuring it against
develop?) and updates othe rminor dependencies (not prettier v3 that
will take a little time)

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-16 23:16:53 +02:00
Veeck
f802c85a38
Fix undefined error for showSunTime / showMoonTime in clock module (#3146)
Fixes #3143 and adds tests for showSunTime / showMoonTime
2023-07-02 22:10:58 +02:00
Michael Teeuw
4b0e0aa48f Prepare 2.25.0-develop branch. 2023-07-01 21:24:52 +02:00
Michael Teeuw
2b6720e6e5 Prepare 2.24.0 release. 2023-07-01 20:34:43 +02:00
Karsten Hassel
0e00e64493
update dependencies (#3140)
last dependency update before next release
2023-06-29 22:59:43 +02:00
Veeck
675e4d4f67
Update dependencies and fix dependabot issues (#3134)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-25 20:12:55 +02:00
Karsten Hassel
b7371538bc
update deps and remove stylelint fix (#3120)
~~there are no "all" files in the v5 versions of roboto-fonts anymore so
I used the content of their css files in `roboto.css`~~

coming with separate PR
2023-06-08 22:40:23 +02:00
Karsten Hassel
a56b92990d
update deps incl. electron to v25, fix stylelint segmentation dump (#3118)
- update electron to v25
- added `overrides:` section to `package.json` to fix
https://github.com/stylelint/stylelint/issues/6898 (must be removed when
fixed upstream, fixing the version to `v15.6.2` did not fix the problem)
- update other deps
2023-06-06 10:16:24 +02:00
Veeck
c7405b76b3
Split install and run commands in github actions (#3112)
... makes looking at the checks a little easier in case they fail

---------

Co-authored-by: veeck <michael@veeck.de>
2023-05-27 22:22:26 +02:00
Veeck
432d900ecd
Add tests for some weather utils (#3103)
Co-authored-by: veeck <michael@veeck.de>
2023-05-15 21:04:50 +02:00
Karsten Hassel
b80485b52f
use node v20 in github workflow (replacing v19) (#3093)
additional:

- update deps
- suppress more unwanted log errors in e2e tests
- add .gitattributes
- fix prettier/js warnings
2023-04-22 09:29:23 +02:00
Veeck
7e58b38ddf
Add no-param-reassign from eslint (#3089)
While waiting for the easterbunny I cleaned up some bad coding practice
:-)

Very open for comments especially regarding the places I commented
myself...

---------

Co-authored-by: veeck <michael@veeck.de>
2023-04-16 17:38:39 +02:00
Kristjan ESPERANTO
0d3ad9812c
Drop node v14 support (#3085)
node v14 will have reached end-of-life by the next release.

From April 18th we can use node v20 instead of v19 for testing.
2023-04-07 19:24:27 +02:00
Karsten Hassel
9703226c73
Update electron to v24, remove th.json from root dir (#3079)
- current electron v22 has end of life 07 Jul 2023 so it has to be
upgraded before next release
- removed th.json from root dir (came back with latest release)
- updated other dependencies
2023-04-05 07:43:42 +02:00
Michael Teeuw
cc11b77f24 Prepare v2.24.0-develop 2023-04-04 20:56:49 +02:00
Michael Teeuw
fa40a3e8e8 Prepare release 2.23.0 2023-04-04 20:13:45 +02:00
Veeck
b5a22bc09b
Add sendNotifications option to clock module (#3059)
Fixes #3056 

One question here would be if the default for this new option should be
true or false.

True: keeps the current behaviour, nobody needs to change his config if
they rely on this option

False: keeps the clock notifications quiet, doesnt waste time/resources,
keeps the noise low

Maybe the original author @cybex-dev can weigh in on this, and why he
added this notification.

---------

Co-authored-by: veeck <michael@veeck.de>
2023-04-01 21:40:05 +02:00
Kristjan ESPERANTO
5f38c53260
Revise require imports (#3071)
- order (external first)
- remove superfluous file extensions
- new line after imports
- deconstruct (only one time (in `check_config.js`))
- fix path (only one time (in `global-setup.js`))
2023-03-22 23:53:10 +01:00
Karsten Hassel
d5395ee3f8
update dependencies and main.css to match new stylelint rules (#3067)
On `develop` my css test failed because I was already on newest
dependencies.

- update deps
- update `main.css` because of stylelint issue

Co-authored-by: Veeck <github@veeck.de>
2023-03-20 22:30:04 +01:00
Karsten Hassel
6d779235cf
fix e2e tests (failed after async changes) (#3063)
by running calendar and newsfeed tests last.

Additional change: allow unit tests to run parallel

This is no fix of the real issue of calendar and newsfeed tests but I
moved them to the end of the tests so other tests are not failing
anymore.

There are coming follow up PR's for the real fixes (when I find the
culprits).

With these change we can stay with the async changes done by @rejas and
https://github.com/MichMich/MagicMirror/pull/3060 is obsolete.
2023-03-12 10:22:23 +01:00
Veeck
1b2785cc56
Cleanup more callback things (#3051)
Looks quite stable on my computers, so maybe we give it a try?

---------

Co-authored-by: veeck <michael@veeck.de>
2023-02-26 18:36:47 +01:00
Kristjan ESPERANTO
b08a4737af
Update stylelint (#3042)
1. Update `stylelint` dependencies
- As of stylelint v15, we do not need `stylelint-config-prettier`
anymore:
https://github.com/prettier/stylelint-config-prettier/releases/tag/v9.0.5
2. Switch to `stylelint-config-standard`:
`stylelint-prettier/recommended` has not been updated for a long time
and still needs the old `stylelint-config-prettier`
3. Handle new `stylelint` issues
2023-02-19 21:36:50 +01:00
Veeck
65aa1b0ddc
Update coverage and jest settings (#3038)
Co-authored-by: veeck <michael@veeck.de>
2023-02-16 22:29:43 +01:00
Karsten Hassel
a65ee86501
Introduce envsubst for config.js, update deps (#3032)
This is the implemenation of envsubst discussed in #1756 

Documentation update will follow after merge.
2023-02-12 22:34:57 +01:00
Veeck
a8dc563a31
Update weather tests (#3008)
Added a few tests for sunset/sunrise and feelsLike 
Lets see if they run through first...

Co-authored-by: veeck <michael@veeck.de>
2023-01-26 19:43:34 +01:00
Veeck
877f8ad380
Refactor mock-data for weather-tests generation (#3000)
Refactored the mock data generation for the tests so we can use plain
JSON files for the data and read it in a more general way.

Comments welcome!

Co-authored-by: veeck <michael@veeck.de>
2023-01-11 21:47:20 +01:00
Veeck
4fc38bd5bb
Update dependabot action (#2985)
Supersedes https://github.com/MichMich/MagicMirror/pull/2984 
and tell dependabot to base its PRs against develop
2023-01-02 20:11:26 +01:00
Michael Teeuw
c99f660d98 Prepare 2.23.0 develop branch. 2023-01-01 18:19:30 +01:00
Michael Teeuw
0ebedd0fb8 Prepare Release 2.22.0 2023-01-01 17:57:13 +01:00
Karsten Hassel
76d9042e60
update playwright to v1.29.1 and other dependencies (#2980)
see title, fixes https://github.com/MichMich/MagicMirror/issues/2969
2022-12-22 16:40:53 +01:00