Main point was to enable ESLint `dot-notation` and `no-unneeded-ternary`
rules for more code consistency.
I took the occasion to add two minor commits:
- Fix a problem found by running `test:spelling
- Minor dependency update
It wouldn't be a problem if the PR didn't arrive in the next release,
the changes are cosmetic.
user reporting slow/no connection/timeout errors on armv6l for calendar,
and newsfeed
we can increase the timeout by adding calls to the undici lib, but it
requires node 20.18.1 or above.
this adds the support for timeout
(also environment variable to override if needed,, mmFetchTimeout
(default 30 seconds)
and updates the base node version
Fix:
- use `path.resolve` for `moduleFolder` and `defaultModuleFolder` path
- Fix module path in case of sub/sub folder is used (sample
`module/test/test`)
---
case of module installation on `module/test/test`:
config will be:
```js
{
module: "test/test",
...
}
```
module core will be:
```js
Module.register("test", {
...
```
`test.js` is used for module core (no change)
---
case of module installation on `module/test` (no change):
config will be:
```js
{
module: "test",
...
}
```
module core will be:
```js
Module.register("test", {
...
```
so `test.js` is used for module core
---
In reality, with this patch, `module` config feature have 2
functionalites:
- determinate module path with more precision
- allow to use sub/sub folder in modules folder
---------
Co-authored-by: Veeck <github@veeck.de>
if the MagicMirror js folder is not writable (synology nas created by
different user than docker container) there is an uncaught throw
```
[ERROR] EACCES: permission denied, open 'js/positions.js'
```
add try/catch, output new message, console.error
```text
unable to write js/positions.js with the discovered module positions
make the MagicMirror/js folder writeable by the user starting MagicMirror
```
MM will start, but no modules will show, as no positions were discovered
this file is used to pass the list from the server side to the browser
side
fixes#3651
It's enough if the code style checks are successful once, it's not
necessary to run them with every node version.
Also, if there is an error, we can see more quickly whether it is a code
style or a test-runner issue.
I also reworked the Linters section in `CONTRIBUTING.md` a bit and
switched the `prettier` config to a flat config.
Co-authored-by: Veeck <github@veeck.de>
here is an updated test version of the fixes for all kinds of calendar
date problems.
NOTE: the changed branch name
NOTE: this used the node-cal@0.19.0 library UNCHANGED
best to make a new folder and git clone there
git clone https://github.com/sdetweil/MagicMirror
cd MagicMirror
git checkout fixcaldates2 // <------ note this is a changed branch name
npm run install-mm
copy your config.js and custom.css from the prior folder
and the non-default modules you have installed…
this ONLY changes the default calendar
but DOES ship an updated node-ical library too
if you need to fall back, just rename the folders around again so that
your original is called MagicMirror
all the testcases for node-ical and MagicMirror execute successfully.
the ‘BIG’ change here is to get the local NON-TZ dates for the
rrule.between()
all the checking and conversion code is commented out or not used
the node-ical fixes are for excluded dates (exdate) values being
adjusted for DST/STD time… waiting to submit that PR
one fix in calendar.js for checking if a past date was too far back,
but it never checked to see IF the event date was in the past… (before
today) so it chopped off too many
and one change in calendarfetcher.js to put out a better diagnostic
message of the parsed data… (exdate was excluded cause JSON stringify
couldn’t convert the complex structure)
I added the tests you all have documented
please re-pull and checkout the new branch (I deleted the old branch)
and npm run install-mm again
---------
Co-authored-by: Veeck <github@veeck.de>
I am adding the animateIn/Out support to MMM-Config, but I need the list
of animations..
but they are not visible in js/animateCSS.js (from require)
adding an export satisfies that
side issue, these would go in a dropdown list
what value can I use for the default behavior? none/default?
don't want an error produced..
should I add code to check for this value to prevent error?
Bumps
[@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome)
from 6.6.0 to 6.7.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/FortAwesome/Font-Awesome/releases"><code>@fortawesome/fontawesome-free</code>'s
releases</a>.</em></p>
<blockquote>
<h2>Release 6.7.1</h2>
<p><strong>Change log available at <a
href="https://fontawesome.com/docs/changelog/">https://fontawesome.com/docs/changelog/</a></strong></p>
<h2>Release 6.7.0</h2>
<p><strong>Change log available at <a
href="https://fontawesome.com/docs/changelog/">https://fontawesome.com/docs/changelog/</a></strong></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3447c58c6b"><code>3447c58</code></a>
Release 6.7.1 (<a
href="https://redirect.github.com/FortAwesome/Font-Awesome/issues/20426">#20426</a>)</li>
<li><a
href="a03a91d681"><code>a03a91d</code></a>
Release 6.7.0 (<a
href="https://redirect.github.com/FortAwesome/Font-Awesome/issues/20418">#20418</a>)</li>
<li>See full diff in <a
href="https://github.com/FortAwesome/Font-Awesome/compare/6.6.0...6.7.1">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.3 to
3.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/prettier/prettier/releases">prettier's
releases</a>.</em></p>
<blockquote>
<h2>3.4.1</h2>
<p>🔗 <a
href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#341">Changelog</a></p>
<h2>3.4.0</h2>
<p><a
href="https://github.com/prettier/prettier/compare/3.3.3...3.4.0">diff</a></p>
<p>🔗 <a href="https://prettier.io/blog/2024/11/26/3.4.0.html">Release
note</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md">prettier's
changelog</a>.</em></p>
<blockquote>
<h1>3.4.1</h1>
<p><a
href="https://github.com/prettier/prettier/compare/3.4.0...3.4.1">diff</a></p>
<h4>Remove unnecessary parentheses around assignment in
<code>v-on</code> (<a
href="https://redirect.github.com/prettier/prettier/pull/16887">#16887</a>
by <a href="https://github.com/fisker"><code>@fisker</code></a>)</h4>
<!-- raw HTML omitted -->
<pre lang="vue"><code><!-- Input -->
\<template>
<button @click="foo += 2">Click</button>
</template>
<p><!-- Prettier 3.4.0 --><br />
&lt;template><br />
<button <a
href="https://github.com/click"><code>@click</code></a>="(foo +=
2)">Click</button><br />
</template></p>
<p><!-- Prettier 3.4.1 --><br />
&lt;template><br />
<button <a
href="https://github.com/click"><code>@click</code></a>="foo +=
2">Click</button><br />
</template><br />
</code></pre></p>
<h1>3.4.0</h1>
<p><a
href="https://github.com/prettier/prettier/compare/3.3.3...3.4.0">diff</a></p>
<p>🔗 <a href="https://prettier.io/blog/2024/11/26/3.4.0.html">Release
Notes</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="37fd1774d1"><code>37fd177</code></a>
Release 3.4.1</li>
<li><a
href="1fb629709a"><code>1fb6297</code></a>
Update ts-api-utils to v1.4.2 (<a
href="https://redirect.github.com/prettier/prettier/issues/16888">#16888</a>)</li>
<li><a
href="f6fccadbc7"><code>f6fccad</code></a>
Remove unnecessary parentheses around assignment in <code>v-on</code>
(<a
href="https://redirect.github.com/prettier/prettier/issues/16887">#16887</a>)</li>
<li><a
href="5fef089377"><code>5fef089</code></a>
Minor improvements in v3.4.0 blog post (<a
href="https://redirect.github.com/prettier/prettier/issues/16886">#16886</a>)</li>
<li><a
href="3542f13845"><code>3542f13</code></a>
3.4 release blog (<a
href="https://redirect.github.com/prettier/prettier/issues/16851">#16851</a>)</li>
<li><a
href="f53791a2c8"><code>f53791a</code></a>
Clean changelog_unreleased</li>
<li><a
href="2b41c937fc"><code>2b41c93</code></a>
Bump Prettier dependency to 3.4.0</li>
<li><a
href="10baab2f57"><code>10baab2</code></a>
Update dependents count</li>
<li><a
href="7999e10265"><code>7999e10</code></a>
Release 3.4.0</li>
<li><a
href="2262d1e4a3"><code>2262d1e</code></a>
chore(config): migrate renovate config (<a
href="https://redirect.github.com/prettier/prettier/issues/16884">#16884</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/prettier/prettier/compare/3.3.3...3.4.1">compare
view</a></li>
</ul>
</details>
<br />
[](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>
in some cases the modulename.js may need to detect running in test mode
(compliments pr #3630)
window.name is not set web mode
add a new field to the index.html
window.intest
and use the server_function to replace the hard coded string like we do
for window.mmversion=#VERSION#
then change the two test helpers to set the env variable
app.js detects and sets global.intest=true
server func replace with value of global.intest
then module can use if(window.intest)
Bumps [croner](https://github.com/hexagon/croner) from 8.1.2 to 9.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hexagon/croner/releases">croner's
releases</a>.</em></p>
<blockquote>
<h2>9.0.0</h2>
<h2>Croner 9.0.0</h2>
<p>This major release brings significant changes to Croner, improving
consistency, fixing bugs, and modernizing the codebase.</p>
<h3>Changes</h3>
<ul>
<li>
<p><strong>Bug Fixes:</strong></p>
<ul>
<li>Fixed an issue where "every X seconds" crons would fail
with a "maximum call stack exceeded" error (<a
href="https://redirect.github.com/hexagon/croner/issues/260">#260</a>).</li>
<li>Fixed an issue where types were not supported when using ES module
via <a href="https://jsr.io">jsr.io</a> (<a
href="https://redirect.github.com/hexagon/croner/issues/258">#258</a>).</li>
</ul>
</li>
<li>
<p><strong>API Changes:</strong></p>
<ul>
<li>The <code>new</code> keyword is now mandatory when instantiating
Croner (e.g., <code>new Cron(/* ... */)</code>).</li>
<li>The default export has been removed. You now need to use
<code>import { Cron } from 'croner';</code> or <code>const { Cron } =
require('croner');</code>.</li>
</ul>
</li>
<li>
<p><strong>File Structure Changes</strong> <em>(relevant for direct file
access)</em>:</p>
<ul>
<li>All files in the <code>/dist</code> directory are now minified.
<code>croner.min.js</code> has been renamed to
<code>croner.js</code>.</li>
<li>Typings have been moved from <code>/types</code> to
<code>/dist</code>.</li>
<li>Only the <code>/src</code> directory is exposed in the jsr module <a
href="https://jsr.io/@hexagon/croner">jsr.io/<code>@hexagon/croner</code></a>.</li>
</ul>
</li>
<li>
<p><strong>Codebase Modernization:</strong></p>
<ul>
<li>The entire codebase has been migrated from JavaScript with JSDoc to
TypeScript.</li>
<li>Deno is now used for formatting, type checking, and linting,
resulting in a cleaner and more maintainable repository. Esbuild is used
to build the <a href="https://www.npmjs.com/package/croner">npm
module</a> and typings.</li>
</ul>
</li>
</ul>
<p><strong>Upgrade Notice:</strong></p>
<p>Due to the API and file structure changes, upgrading from 8.x to 9.x
may require modifications to your existing code. Please review the above
changes carefully before migrating.</p>
<h2>9.0.0-dev.12</h2>
<ul>
<li>Test new release workflow</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="244a439e6e"><code>244a439</code></a>
Merge pull request <a
href="https://redirect.github.com/hexagon/croner/issues/263">#263</a>
from Hexagon/dev</li>
<li><a
href="7e280b5b8a"><code>7e280b5</code></a>
Bump version to 9.0.0 stable</li>
<li><a
href="c99144fe95"><code>c99144f</code></a>
Remove CodeQl. Rename dev release workflow.</li>
<li><a
href="4847b7d097"><code>4847b7d</code></a>
Merge pull request <a
href="https://redirect.github.com/hexagon/croner/issues/262">#262</a>
from Hexagon/dev</li>
<li><a
href="7bfefc49ed"><code>7bfefc4</code></a>
Fix workflow name</li>
<li><a
href="020cf92959"><code>020cf92</code></a>
Bump version.</li>
<li><a
href="40dabf4fa5"><code>40dabf4</code></a>
Fix npm release ci. Improve tsdoc. Refactor build script.</li>
<li><a
href="c45e868a92"><code>c45e868</code></a>
Increase timeout</li>
<li><a
href="df7974a13b"><code>df7974a</code></a>
Re-enable more async tests</li>
<li><a
href="8304e287cf"><code>8304e28</code></a>
Re-add async tests</li>
<li>Additional commits viewable in <a
href="https://github.com/hexagon/croner/compare/8.1.2...9.0.0">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Besides updating cspell and handling spelling issues, the important
change is adding the spelling check to the GitHub workflow.
I'm not sure if it will bother us too much when people create PRs. But I
wanted to give it a try. Or do you have any other ideas on how we can
run the spelling check on a regular basis?
This will fix#3576
@FrankBlackMG:
I don't use `*env.unique_id` because some others modules can use pm2 too
for starting a service and unique_id is the same (this will make
confusion)
So I check `name` and `pm_id` for found it
fixes#3597
Changes:
- electron tests: add mocking to `electron.js` for mocking the server
side, before only the browser side was mocked
- publish "/tests/configs" and "/tests/mocks" always in `server.js`,
this reverts a change done with latest release, we need this for
debugging (otherwise you get on the screen that your config has errors
but config check is successful ...)
- revert hotfix in
`tests/configs/modules/calendar/show-duplicates-in-calendar.js`
- fix `tests/configs/modules/calendar/custom.js` to allow events in the
past (~~I don't know how this could work before~~ when testing css
classes `yesterday` and `dayBeforeYesterday` --> it worked before
because the server side did not mock and therefore was not in the past)
since API 3.0 is default, weatherEndpoint should be set to "/onecall"
Fixes#3574
ATTENTION: since lat / lon defaults to 0 / 0, the weather plugins works
after this patch, but shows the weather from
https://de.wikipedia.org/wiki/Null_Island if lat / lon is not manually
set.
---------
Co-authored-by: Karsten Hassel <hassel@gmx.de>
Co-authored-by: Pedro Lamas <pedrolamas@gmail.com>