Commit Graph

5244 Commits

Author SHA1 Message Date
Jordan Welch
53df20f313 [weatherprovider] update subclass language use override (#3914) 2025-11-13 22:08:47 +01:00
Veeck
38a4d235e8 [weather] fix wind-icon not showing in pirateweather (#3957)
fixes #3956

---------

Co-authored-by: veeck <gitkraken@veeck.de>
2025-11-10 21:41:24 +01:00
Kristjan ESPERANTO
f29f424a62 [core] refactor: replace XMLHttpRequest with fetch and migrate e2e tests to Playwright (#3950)
### 1. Replace `XMLHttpRequest` with the modern `fetch` API for loading
translation files

#### Changes
- **translator.js**: Use `fetch` with `async/await` instead of XHR
callbacks
- **loader.js**: Align URL handling and add error handling (follow-up to
fetch migration)
- **Tests**: Update infrastructure for `fetch` compatibility

#### Benefits
- Modern standard API
- Cleaner, more readable code
- Better error handling and fallback mechanisms

### 2. Migrate e2e tests to Playwright

This wasn't originally planned for this PR, but is related. While
investigating suspicious log entries which surfaced after the fetch
migration I kept running into JSDOM’s limitations. That pushed me to
migrate the E2E suite to Playwright instead.

#### Changes
- switch e2e harness to Playwright (`tests/e2e/helpers/global-setup.js`)
- rewrite specs to use Playwright locators + shared `expectTextContent`
- install Chromium via `npx playwright install --with-deps` in CI

#### Benefits
- much closer to real browser behaviour
- and no more fighting JSDOM’s quirks
2025-11-08 21:59:05 +01:00
Kristjan ESPERANTO
2b08288346 [core] configure cspell to check default modules only and fix typos (#3955)
When I saw PR #3951, I wondered why `cspell` didn't catch these typos
before. Unfortunately, the default modules were excluded from the check.
I have corrected this with these changes.

This even revealed a code error in
`modules/default/weather/providers/overrideWrapper.js`:

- before: `fetchEatherHourly`
- after: `fetchWeatherHourly`
2025-11-08 20:27:34 +01:00
Kristjan ESPERANTO
8e9ee8953a [gitignore] restoring the old Git behavior for the CSS directory (#3954)
The advantage of the old behavior is that users can keep backups, copies
or any other CSS files with different names in the directory without Git
interfering.

I suspect that this was not taken into account during the cleanup in PR
#3952 🙂
2025-11-08 20:25:47 +01:00
sam detweiler
c1aaea5913 [weather] add error handling to weather fetch functions, including cors (#3791)
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
fixes #3687
2025-11-08 14:21:31 +01:00
Jarno
3b79791a6b [calendar] Show repeatingCountTitle only if yearDiff > 0 (#3949) 2025-11-08 14:13:59 +01:00
Karsten Hassel
ab5f79a1be remove deprecated ukmetoffice datapoint provider, cleanup .gitignore (#3952)
- weather ukmetoffice see #3842 , I got a final reminder today per mail
that datapoint will be retired on Dec. 1st.
- cleanup/simplify `.gitignore`
2025-11-07 08:45:20 +01:00
Veeck
034f3c4b2a [newsfeed] fix header layout issue (#3946)
... fixes #3944 introduced with prettier njk linting

---------

Co-authored-by: veeck <gitkraken@veeck.de>
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
2025-11-05 18:09:30 +01:00
Kristjan ESPERANTO
9d713ffd69 [test] replace node-libgpiod with serialport in electron-rebuild workflow (#3945)
`node-libgpiod` uses deprecated NAN which is incompatible with Electron
v39+. `serialport` uses N-API ensuring compatibility with current and
future Electron versions.

`node-libgpiod` is only used by 1 of ~1300 3rd-party-modules
(MMM-PresenceScreenControl), while serialport is used by at least 4
modules (MMM-Serial-Notification, MMM-RadarPresence, MMM-LKY-TIC and
MMM-Gestures), making it a better test candidate.

Also updates Electron to v39.

Fixes #3933
2025-11-04 22:46:20 +01:00
Kristjan ESPERANTO
67fead74b4 [ci] Add concurrency to automated tests workflow to cancel outdated runs (#3943)
Add `concurrency` configuration to automatically cancel outdated test
runs when new commits are pushed to the same PR/branch.

Inspired by
[MagicMirrorOrg/MagicMirror-Documentation#335](https://github.com/MagicMirrorOrg/MagicMirror-Documentation/pull/335).
2025-11-04 18:04:29 +01:00
Kristjan ESPERANTO
d7348ed765 [tests] suppress debug logs in CI environment + improve calendar symbol test stability (#3941)
## CI Log Suppression

**Two-level approach for clean test output:**

1. **Suppress debug/info logs**: Call `logger.setLogLevel("ERROR")` in
CI to hide verbose logging
2. **Suppress intentional error logs**: Set `mmTestMode` flag and check
it before logging errors that are part of test assertions (e.g., testing
error handling in `git_helper.js` and `server_functions.js`)

This keeps CI output clean and makes genuine failures immediately
visible, while preserving full logging for local development.

**Before:** 1348 log lines with verbose debug/info output  
**After:** 168 log clean lines with only test results

## Calendar Symbol Test Stability

Convert the calendar symbol test from external URL (`calendarlabs.com`)
to existing local mock file (`12_events.ics`). This eliminates CI
timeouts caused by external dependencies and improves test reliability.

The test still validates the same symbol array feature but now runs
faster and deterministically without network dependencies.
2025-11-03 23:49:21 +01:00
Kristjan ESPERANTO
462abf7027 [tests] migrate from jest to vitest (#3940)
This is a big change, but I think it's a good move, as `vitest` is much
more modern than `jest`.

I'm excited about the UI watch feature (run `npm run test:ui`), for
example - it's really helpful and saves time when debugging tests. I had
to adjust a few tests because they had time related issues, but
basically we are now testing the same things - even a bit better and
less flaky (I hope).

What do you think?
2025-11-03 19:47:01 +01:00
Veeck
b542f33a0a Update deps, unpin parse5 (#3934)
seems we dont need the parse5 pin as long as jsdom is fixed to v27.0.0.

not sure if there is anything else we can do to the deps?

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: veeck <gitkraken@veeck.de>
2025-11-01 22:29:40 +01:00
Karsten Hassel
1e5d127d44 fixes problems with daylight-saving-time in weather provider openmeteo (#3931)
fix for #3930
2025-11-01 13:46:58 +01:00
Jboucly
961b3c96d6 feat(core): add server:watch script with automatic restart on file changes (#3920)
## Description

This PR adds a new `server:watch` script that runs MagicMirror² in
server-only mode with automatic restart and browser reload capabilities.

Particularly helpful for:
- **Developers** who need to see changes immediately without manual
restarts.
- **Users setting up their mirror** who make many changes to `config.js`
or `custom.css` and need quick feedback.

### What it does

When you run `npm run server:watch`, the watcher monitors files you
specify in `config.watchTargets`. Whenever a monitored file changes:

1. The server automatically restarts
2. Waits for the port to become available
3. Sends a reload notification to all connected browsers via Socket.io
4. Browsers automatically refresh to show the changes

This creates a seamless development experience where you can edit code,
save, and see the results within seconds.

### Implementation highlights

**Zero dependencies:** Uses only Node.js built-ins (`fs.watch`,
`child_process.spawn`, `net`, `http`) - no nodemon or external watchers
needed.

**Smart file watching:** Monitors parent directories instead of files
directly to handle atomic writes from modern editors (VSCode, etc.) that
create temporary files during save operations.

**Port management:** Waits for the old server instance to fully release
the port before starting a new one, preventing "port already in use"
errors.

### Configuration

Users explicitly define which files to monitor in their `config.js`:

```js
let config = {
  watchTargets: [
    "config/config.js",
    "css/custom.css",
    "modules/MMM-MyModule/MMM-MyModule.js",
    "modules/MMM-MyModule/node_helper.js"
  ],
  // ... rest of config
};
```

This explicit approach keeps the implementation simple (~260 lines)
while giving users full control over what triggers restarts. If
`watchTargets` is empty or undefined, the watcher starts but monitors
nothing, logging a clear warning message.

---

**Note:** This PR description has been updated to reflect the final
implementation. During the review process, we refined the approach
multiple times based on feedback.

---------

Co-authored-by: Jboucly <contact@jboucly.fr>
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
2025-10-28 19:14:51 +01:00
Kristjan ESPERANTO
2e795f6552 [calendar] chore: remove requiresVersion: "2.1.0" (#3932)
This is just to reduce a little noise in the dev console. The following
line will not appear with this change:

```shell
module.js:480 Check MagicMirror² version for module 'calendar' - Minimum version:  2.1.0 - Current version: 2.34.0-
```

Since version 2.1.0 is so old, we can surely throw it out without
concern.
2025-10-27 09:48:17 +01:00
Kristjan ESPERANTO
9ad5618843 [check_config] refactor: improve error handling (#3927)
- Combine file existence and permission checks with better error
messages
- Replace thrown exceptions with clean error output (no stack traces)
- Support custom module positions by changing strict validation to
warnings
- Add missing process.exit(1) after validation errors

Users now see clear, actionable error messages without stack traces, and
custom region configurations work correctly.

## example before

```bash
$ npm run start

> magicmirror@2.34.0-develop start
> node --run start:x11

[2025-10-22 17:56:06.303] [LOG]   Starting MagicMirror: v2.34.0-develop 
[2025-10-22 17:56:06.304] [LOG]   Loading config ... 
[2025-10-22 17:56:06.304] [LOG]   config template file not exists, no envsubst 
[2025-10-22 17:56:06.356] [ERROR] File not found: /home/kristjan/MagicMirror/config/config.js
No config file present! 
[2025-10-22 17:56:06.356] [ERROR] [checkconfig] Error: Error: ENOENT: no such file or directory, access '/home/kristjan/MagicMirror/config/config.js'
No permission to access config file!
    at checkConfigFile (/home/kristjan/MagicMirror/js/check_config.js:43:9)
    at Object.<anonymous> (/home/kristjan/MagicMirror/js/check_config.js:138:2)
    at Module._compile (node:internal/modules/cjs/loader:1714:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1848:10)
    at Module.load (node:internal/modules/cjs/loader:1448:32)
    at Module._load (node:internal/modules/cjs/loader:1270:12)
    at c._load (node:electron/js2c/node_init:2:17993)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:244:24)
    at Module.require (node:internal/modules/cjs/loader:1470:12)
    at require (node:internal/modules/helpers:147:16)
    at loadConfig (/home/kristjan/MagicMirror/js/app.js:126:3)
    at App.start (/home/kristjan/MagicMirror/js/app.js:291:18)
    at Object.<anonymous> (/home/kristjan/MagicMirror/js/electron.js:228:7)
    at Module._compile (node:internal/modules/cjs/loader:1714:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1848:10) 
```

## example after

```bash
$ npm run start

> magicmirror@2.34.0-develop start
> node --run start:x11

[2025-10-22 21:33:27.930] [LOG]   Starting MagicMirror: v2.34.0-develop 
[2025-10-22 21:33:27.931] [LOG]   Loading config ... 
[2025-10-22 21:33:27.931] [LOG]   config template file not exists, no envsubst 
[2025-10-22 21:33:27.985] [ERROR] [check_config] File not found: /home/kristjan/MagicMirror/config/config.js 
```
2025-10-23 22:48:16 +02:00
Kristjan ESPERANTO
c9eecddf23 [calendar] test: remove "Recurring event per timezone" test (#3929)
Remove the "Recurring event per timezone" test that manipulated
Date.prototype.getTimezoneOffset to simulate 24 different timezones for
testing all-day recurring events.

Reasons for removal:
1. The test approach is incompatible with node-ical 0.22.0's Intl-based
timezone handling (which replaced moment-timezone). Manipulating
Date.prototype.getTimezoneOffset no longer affects Intl.DateTimeFormat,
which reads the system timezone directly.

2. node-ical 0.22.0 handles all-day events (VALUE=DATE) correctly by
preserving the calendar date without timezone conversions, making
cross-timezone testing unnecessary. The library includes comprehensive
tests for this behavior, particularly "keeps whole-day recurrence across
DST" in
[test/advanced.test.js](https://github.com/jens-maus/node-ical/blob/master/test/advanced.test.js).

3. The existing "Recurring event" test already verifies that recurring
events from the same ICS file are displayed correctly, so a simplified
version of "Recurring event per timezone" is not necessary.

The old test attempted to work around timezone conversion issues in
node-ical 0.21.0 that are now properly resolved upstream.

Closes #3928
2025-10-23 19:09:56 +02:00
Karsten Hassel
bc0d36503a logger: add calling filename as prefix on server side (#3926) 2025-10-22 22:50:31 +02:00
Veeck
a1c1e9560c [logger] Add prefixes to most Log messages (#3923)
Co-authored-by: veeck <gitkraken@veeck.de>
2025-10-21 20:32:48 +02:00
Veeck
f1c0c38c86 [core] Update deps and pin jsdom to v27.0.0 (#3925) 2025-10-20 19:12:42 +02:00
Kristjan ESPERANTO
64f78ea2f2 chore: update dependencies (#3921)
Normally, I wouldn't update the dependencies again so soon, but
`node-ical` underwent some major changes (see
https://github.com/jens-maus/node-ical/pull/404) with the last release,
and I'd like to use it here as early as possible to see if there are any
problems with it.
2025-10-19 23:58:59 +02:00
Kevin G.
2a4a056c84 Fix for envcanada Provider to use updated Env Canada URL (#3919)
The envcanada provider in the default Weather module was fixed in MM
v2.33.0 to use a new URL hierarchy that Environment Canada implemented
to access weather data for Canadian locations. Subsequent to this
provider update, Environment Canada has implemented one further update
to their URL hierarchy to make it easier to access 'current day' weather
data. Tis change was raised in Issue #3912 as a Bug, which is addressed
in this Provider update. There are no Magic Mirror UI changes from this
update.

The fix is to add one additional element to the URL used to access
Environment Canada XML-based weather data.

This PR is also taking the opportunity to make one further small fix to
how windspeed is handled in this Provider. Most of the time, Env Canada
provides an expected numeric value. There are instances, however, where
the value provided is 'calm', which the Weather module does not expect.
The Provider code has been changed to detect a 'calm' windspeed and
convert it to '0' for the purposes of the Weather module. Note that in
the world of weather/climate analysis, a windspeed of 'calm' is used as
a synonym for a windspeed of 0.

Note that a ChangeLog entry is included in this PR.
2025-10-19 19:06:44 +02:00
Kristjan ESPERANTO
96d3e8776d [weather] feat: add configurable forecast date format option (#3918)
I was a little disappointed that I couldn't change the date format in
the forecast because it was hard-coded. This PR introduces a new option
(`forecastDateFormat`) that allows the user to specify the format
themselves. The default remains `ddd`.

## Before

<img width="483" height="524" alt="Screenshot From 2025-10-18 18-26-13"
src="https://github.com/user-attachments/assets/2de6af55-e73c-42e8-a3fe-7386ef5f90e0"
/>

## After (examples)

### `forecastDateFormat: "dddd"`
<img width="483" height="524" alt="Screenshot From 2025-10-18 18-26-27"
src="https://github.com/user-attachments/assets/cd86c798-f1e4-4d75-adf9-c4e549aa2a51"
/>

### `forecastDateFormat: "ddd, D MMM"`
<img width="483" height="524" alt="Screenshot From 2025-10-18 18-28-02"
src="https://github.com/user-attachments/assets/79aaa7b3-810a-4ab1-833c-09dfab7f457a"
/>
2025-10-18 19:57:41 +02:00
Kristjan ESPERANTO
37d1a3ae8f refactor: replace express-ipfilter with lightweight custom middleware (#3917)
This fixes security issue
[CVE-2023-42282](https://github.com/advisories/GHSA-78xj-cgh5-2h22),
which is not very likely to be exploitable in MagicMirror² setups, but
still should be fixed.

The [express-ipfilter](https://www.npmjs.com/package/express-ipfilter)
package depends on the obviously unmaintained
[ip](https://github.com/indutny/node-ip) package, which has known
security vulnerabilities. Since no fix is available, this commit
replaces both dependencies with a custom middleware using the better
maintained [ipaddr.js](https://www.npmjs.com/package/ipaddr.js) library.

Changes:
- Add new `js/ip_access_control.js` with lightweight middleware
- Remove `express-ipfilter` dependency, add `ipaddr.js`
- Update `js/server.js` to use new middleware
- In addition, I have formulated the descriptions of the corresponding
tests a little more clearly.
2025-10-18 19:56:55 +02:00
Karsten Hassel
9ff716f4ab update deps, exclude node v23 (#3916) 2025-10-16 23:47:06 +02:00
Karsten Hassel
d39e686f7a remove eslint warnings, add npm publish process to Collaboration.md (#3913) 2025-10-14 22:44:37 +02:00
Kristjan ESPERANTO
5f1f5bd291 feat: add ESlint rule no-sparse-arrays for config check (#3911)
Adding a rule to the config checker config so that unexpected commas in
the middle of arrays (reported in issue #3910) are better detected.

Two commas in a row inside the modules array create an empty entry
(`undefined`). JavaScript accepts that syntax, but MagicMirror would
later try to load that “module” and fail.

Alternatively, we could filter out undefined entries, but with this PR,
the user receives a clear message indicating where the error lies, can
easily fix it, and thus has a cleaner configuration.

## Before

```
[2025-10-10 19:33:30.874] [INFO]  Checking config file /home/kristjan/MagicMirror/config/config.js ... 
[2025-10-10 19:33:30.944] [INFO]  Your configuration file doesn't contain syntax errors :) 
[2025-10-10 19:33:30.945] [INFO]  Checking modules structure configuration ... 
[2025-10-10 19:33:31.027] [ERROR] This module configuration contains errors:
undefinedmust be object
```

## After

```
[2025-10-10 19:41:20.030] [INFO]  Checking config file /home/kristjan/MagicMirror/config/config.js ... 
[2025-10-10 19:41:20.107] [ERROR] Your configuration file contains syntax errors :(
Line 91 column 1: Unexpected comma in middle of array.
```
2025-10-13 23:40:23 +02:00
Veeck
b09a27a83b chore: bump dependencies into october (#3909) 2025-10-01 19:13:54 +02:00
Kristjan ESPERANTO
787cc6bd1f refactor: replace module-alias dependency with internal alias resolver (#3893)
- removes the external unmaintained `module-alias` dependency ->
reducing complexity and risk
- introduces a small internal alias mechanism for `logger` and
`node_helper`
- preserves backward compatibility for existing 3rd‑party modules
- should simplify a future ESM migration of MagicMirror

I'm confident that it shouldn't cause any problems, but we could also
consider including it in the release after next. What do you think?

This PR is inspired by PR #2934 - so thanks to @thesebas! 🙇 😃
2025-09-30 20:12:58 +02:00
Kristjan ESPERANTO
b1a189b238 Prepare 2.34.0-develop 2025-09-30 18:14:08 +02:00
Kristjan ESPERANTO
593a4b95d6 Prepare Release 2.33.0 (#3902) 2025-09-30 16:15:50 +02:00
Karsten Hassel
1f2d1b92b5 update jsdoc and other deps (#3896)
other cosmetic code changes because of new `eslint-plugin-jsdoc` version
v60
2025-09-23 06:27:29 +02:00
Veeck
fbca0a0e55 [layout] update styles for weather and calendar (#3894) 2025-09-17 20:02:14 +02:00
Kevin G.
e8868217a9 Fix for envcanada Provider to use new Environment Canada weather data access (#3878)
Earlier in 2025, Environment Canada changed the process to access
weather data for Canadian cities. This change was raised in Issue #3822
as a Bug, which is addressed in this Provider update. There are no Magic
Mirror UI changes from this update.

The 'old' method to access Environment Canada involved accessing a
static URL based on a City identifier which would result in an XML
document containing the appropriate weather data.

The 'new' method is a 2 step process. The first step is to access a
time-sensitive URL that contains a list of links to various cities that
have weather data available. The second step requires finding the
correct city in that list based on a City identifier, and then accessing
that unique URL to access an XML document containing the appropriate
weather data.

The changes made to the envcanada Provider code are solely aimed at
using the new 2-step method to access a specified City's weather data.
Since the resulting XML document structure has not changed, no other
code in envcanada required changes.

Note that a ChangeLog entry is included in this PR.

---------

Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
Co-authored-by: veeck <gitkraken@veeck.de>
2025-09-17 12:07:32 +02:00
Veeck
a49fbede18 [weather] better null value handling for weather type (#3892)
As mentioned
[here](https://github.com/MagicMirrorOrg/MagicMirror/pull/3878#issuecomment-3275344406)
our weather module needs a bit better handling for null values in the
type field.

This pr adds this and cleans up the layout a little.
2025-09-16 17:00:02 +02:00
Kristjan ESPERANTO
777b49c566 chore: update dependencies (#3891)
Since receiving a security warning about `axios` in `node-ical`
(https://github.com/MagicMirrorOrg/MagicMirror/security/dependabot/70),
I've created [a pull request to remove `axios` from
`node-ical`](https://github.com/jens-maus/node-ical/pull/397) — it was
accepted and we now have a new version 🙂
2025-09-15 23:58:55 +02:00
Kristjan ESPERANTO
fb2aa438d8 feat: add clear log for occupied port at startup (#3890)
Having repeatedly seen that users are unaware of the meaning of the
EADDRINUSE error message (see, for example, this [forum
thread](https://forum.magicmirror.builders/topic/19871/update-package-list/5)),
I thought we should intercept this message and provide clearer output.
This may help users identify the cause of the problem more quickly
themselves.

## before

```
[2025-09-13 09:54:32.903] [LOG]   Starting MagicMirror: v2.33.0-develop 
...
[2025-09-13 09:54:33.533] [LOG]   Starting server on port 8080 ...  
[2025-09-13 09:54:33.537] [WARN]  You're using a full whitelist configuration to allow for all IPs 
[2025-09-13 09:54:33.568] [ERROR] Whoops! There was an uncaught exception... 
[2025-09-13 09:54:33.574] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080
    at Server.setupListenHandle [as _listen2] (node:net:1940:16)
    at listenInCluster (node:net:1997:12)
    at node:net:2206:7
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  code: 'EADDRINUSE',
  errno: -98,
  syscall: 'listen',
  address: '0.0.0.0',
  port: 8080
} 
[2025-09-13 09:54:33.574] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 
[2025-09-13 09:54:33.574] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues 
[2025-09-13 09:54:35.235] [INFO]  
####  System Information  ####
...
```

## after

```
[2025-09-13 09:53:20.151] [LOG]   Starting MagicMirror: v2.33.0-develop 
...
[2025-09-13 09:53:20.928] [LOG]   Starting server on port 8080 ...  
[2025-09-13 09:53:20.931] [WARN]  You're using a full whitelist configuration to allow for all IPs 
[2025-09-13 09:53:20.970] [ERROR] 
────────────────────────────────────────────────────────────────
 PORT IN USE: 0.0.0.0:8080

 Another process (most likely another MagicMirror instance)
 is already using this port.

 Stop the other process (free the port) or use a different port.
──────────────────────────────────────────────────────────────── 
[2025-09-13 09:53:22.471] [INFO]  
####  System Information  ####
...
```
2025-09-13 13:01:55 +02:00
Karsten Hassel
aac85bbb54 improve config check tests (#3889)
see
https://github.com/MagicMirrorOrg/MagicMirror/pull/3886#issuecomment-3280414877
2025-09-11 21:50:11 +02:00
Kristjan ESPERANTO
d81386f3d9 chore: use prettier --write --ignore-unknown in lint-staged to avoid errors on unsupported files (#3888)
This prevents `prettier` from failing when `lint-staged` passes
unknown/binary files, making the pre-commit hook more robust.

In concrete terms this could happen, when we, for example, add a new PNG
file. Since we rarely do this, it has not been noticed so far.

This is recommended when using asterisk:
https://github.com/lint-staged/lint-staged#automatically-fix-code-style-with-prettier-for-any-format-prettier-supports

## before

```bash
$ npx lint-staged <-- after staging a new PNG file
✔ Backed up original state in git stash (c3247d4b)
✔ Hiding unstaged changes to partially staged files...
⚠ Running tasks for staged files...
  ❯ package.json — 2 files
    ❯ * — 2 files
      ✖ prettier --write [FAILED]
    ↓ *.js — no files
    ↓ *.css — no files
↓ Skipped because of errors from tasks.
↓ Skipped because of errors from tasks.
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...

✖ prettier --write:
[error] No parser could be inferred for file "~/MagicMirror/test.png".
...
```

## after

```bash
$ npx lint-staged <-- after staging a new PNG file
✔ Backed up original state in git stash (0c3fe285)
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Cleaning up temporary files...
```
2025-09-11 18:34:08 +02:00
Veeck
08d29c3083 Add Prettier plugin for Nunjuck templates (#3887) 2025-09-11 13:10:53 +02:00
Karsten Hassel
3260b9dfe4 add test for config:check (#3886) 2025-09-11 13:08:56 +02:00
Karsten Hassel
2481bc621f revert changes breaking node --run config:check (#3885) 2025-09-10 07:55:05 +02:00
Karsten Hassel
b1865d8115 refactor: use global.root_path instead relative paths (#3883) 2025-09-09 08:09:45 +02:00
Veeck
31bafc3297 update default icon for calendars (#3879)
While looking at
https://github.com/MagicMirrorOrg/MagicMirror-Documentation/issues/114 I
noticed that the default icon is not named correctly.

`calendar-alt` should be called `calendar-days` which seems to be its
fallback anyways.

I also updated the link to the icon search

---------

Co-authored-by: veeck <gitkraken@veeck.de>
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
2025-09-08 14:42:13 +02:00
Veeck
d277a276e7 Bump github actions and dependencies (#3882)
as suggested by dependabot
[here](https://github.com/MagicMirrorOrg/MagicMirror/pull/3880) and
[here](https://github.com/MagicMirrorOrg/MagicMirror/pull/3881)
also bumped the dependencies while at it

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: veeck <gitkraken@veeck.de>
2025-09-08 14:29:06 +02:00
Karsten Hassel
be957af6a6 bump minimal node version to v22.18.0 (#3877)
electron uses node v22.18 in its [current
releases](https://releases.electronjs.org/), so we should go hand in
hand and use that as the minimal node version
2025-09-04 07:07:15 +02:00
Karsten Hassel
93d5df8d04 update electron to v38 (#3876) 2025-09-03 23:59:54 +02:00
Veeck
6f4eab9535 [core] bump dependencies into september (#3872)
nothing fancy in these though

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: veeck <gitkraken@veeck.de>
2025-09-01 21:23:24 +02:00