From b742e839becf106c400c18d49480b61fcfc47a0d Mon Sep 17 00:00:00 2001 From: sam detweiler Date: Thu, 1 Jan 2026 08:45:36 -0600 Subject: [PATCH] Release 2.34.0 (#3999) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to: @Blackspirits, @Crazylegstoo, @jarnoml, @jboucly, @JHWelch, @khassel, @KristjanESPERANTO, @rejas, @sdetweil, @xsorifc28 ⚠️ This release needs nodejs version >=22.21.1 <23 || >=24 [Compare to previous Release v2.33.0](https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.33.0...develop) [core] Prepare Release 2.34.0 (https://github.com/MagicMirrorOrg/MagicMirror/pull/3998) dependency update + adjust Playwright setup + fix linter issue (https://github.com/MagicMirrorOrg/MagicMirror/pull/3994) demo with gif (https://github.com/MagicMirrorOrg/MagicMirror/pull/3995) [core] fix: allow browser globals in config files (https://github.com/MagicMirrorOrg/MagicMirror/pull/3992) [core] fix: restore --ozone-platform=wayland flag for reliable Wayland support (https://github.com/MagicMirrorOrg/MagicMirror/pull/3989) [core] auto create release notes with every push on develop (https://github.com/MagicMirrorOrg/MagicMirror/pull/3985) [core] chore: simplify Wayland start script (https://github.com/MagicMirrorOrg/MagicMirror/pull/3974) [gitignore] restore the old Git behavior for the default modules (https://github.com/MagicMirrorOrg/MagicMirror/pull/3968) [core] configure cspell to check default modules only and fix typos (https://github.com/MagicMirrorOrg/MagicMirror/pull/3955) [gitignore] restoring the old Git behavior for the CSS directory (https://github.com/MagicMirrorOrg/MagicMirror/pull/3954) feat(core): add server:watch script with automatic restart on file changes (https://github.com/MagicMirrorOrg/MagicMirror/pull/3920) [check_config] refactor: improve error handling (https://github.com/MagicMirrorOrg/MagicMirror/pull/3927) refactor: replace express-ipfilter with lightweight custom middleware (https://github.com/MagicMirrorOrg/MagicMirror/pull/3917) refactor: replace module-alias dependency with internal alias resolver (https://github.com/MagicMirrorOrg/MagicMirror/pull/3893) [dependencies] [chore] update dependencies and min. node version (https://github.com/MagicMirrorOrg/MagicMirror/pull/3986) [core] bump dependencies into december (https://github.com/MagicMirrorOrg/MagicMirror/pull/3982) Bump actions/checkout from 5 to 6 (https://github.com/MagicMirrorOrg/MagicMirror/pull/3972) Update deps, unpin parse5 (https://github.com/MagicMirrorOrg/MagicMirror/pull/3934) [core] Update deps and pin jsdom to v27.0.0 (https://github.com/MagicMirrorOrg/MagicMirror/pull/3925) chore: update dependencies (https://github.com/MagicMirrorOrg/MagicMirror/pull/3921) update deps, exclude node v23 (https://github.com/MagicMirrorOrg/MagicMirror/pull/3916) remove eslint warnings, add npm publish process to Collaboration.md (https://github.com/MagicMirrorOrg/MagicMirror/pull/3913) feat: add ESlint rule no-sparse-arrays for config check (https://github.com/MagicMirrorOrg/MagicMirror/pull/3911) chore: bump dependencies into october (https://github.com/MagicMirrorOrg/MagicMirror/pull/3909) [logging] logger: add calling filename as prefix on server side (https://github.com/MagicMirrorOrg/MagicMirror/pull/3926) [logger] Add prefixes to most Log messages (https://github.com/MagicMirrorOrg/MagicMirror/pull/3923) [modules/alert] Add new pt and pt-BR translations for Alert module and update global PT strings (https://github.com/MagicMirrorOrg/MagicMirror/pull/3965) [modules/calendar] add checksum to test whether calendar event list changed (https://github.com/MagicMirrorOrg/MagicMirror/pull/3988) [calendar] fix: prevent excessive fetching on client reload and refactor calendarfetcherutils.js (https://github.com/MagicMirrorOrg/MagicMirror/pull/3976) [calendar] refactor: migrate CalendarFetcher to ES6 class and improve error handling (https://github.com/MagicMirrorOrg/MagicMirror/pull/3959) [calendar] Show repeatingCountTitle only if yearDiff > 0 (https://github.com/MagicMirrorOrg/MagicMirror/pull/3949) [tests] suppress debug logs in CI environment + improve calendar symbol test stability (https://github.com/MagicMirrorOrg/MagicMirror/pull/3941) [calendar] chore: remove requiresVersion: "2.1.0" (https://github.com/MagicMirrorOrg/MagicMirror/pull/3932) [calendar] test: remove "Recurring event per timezone" test (https://github.com/MagicMirrorOrg/MagicMirror/pull/3929) [modules/compliments] [compliments] refactor: optimize loadComplimentFile method and add unit tests (https://github.com/MagicMirrorOrg/MagicMirror/pull/3969) fix: set compliments remote file minimum delay to 15 minutes (https://github.com/MagicMirrorOrg/MagicMirror/pull/3970) [compliments] fix: duplicate query param "?" in compliments module refresh url (https://github.com/MagicMirrorOrg/MagicMirror/pull/3967) [modules/newsfeed] [newsfeed] fix header layout issue (https://github.com/MagicMirrorOrg/MagicMirror/pull/3946) [modules/weather] [weatherprovider] update subclass language use override (https://github.com/MagicMirrorOrg/MagicMirror/pull/3914) [weather] fix wind-icon not showing in pirateweather (https://github.com/MagicMirrorOrg/MagicMirror/pull/3957) [weather] add error handling to weather fetch functions, including cors (https://github.com/MagicMirrorOrg/MagicMirror/pull/3791) remove deprecated ukmetoffice datapoint provider, cleanup .gitignore (https://github.com/MagicMirrorOrg/MagicMirror/pull/3952) fixes problems with daylight-saving-time in weather provider openmeteo (https://github.com/MagicMirrorOrg/MagicMirror/pull/3931) Fix for envcanada Provider to use updated Env Canada URL (https://github.com/MagicMirrorOrg/MagicMirror/pull/3919) [weather] feat: add configurable forecast date format option (https://github.com/MagicMirrorOrg/MagicMirror/pull/3918) [testing] testing: update "Enforce Pull-Request Rules" workflow (https://github.com/MagicMirrorOrg/MagicMirror/pull/3987) [core] refactor: replace XMLHttpRequest with fetch and migrate e2e tests to Playwright (https://github.com/MagicMirrorOrg/MagicMirror/pull/3950) [test] replace node-libgpiod with serialport in electron-rebuild workflow (https://github.com/MagicMirrorOrg/MagicMirror/pull/3945) [ci] Add concurrency to automated tests workflow to cancel outdated runs (https://github.com/MagicMirrorOrg/MagicMirror/pull/3943) [tests] migrate from jest to vitest (https://github.com/MagicMirrorOrg/MagicMirror/pull/3940) --------- Signed-off-by: dependabot[bot] Co-authored-by: Karsten Hassel Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Co-authored-by: Ryan Williams <65094007+ryan-d-williams@users.noreply.github.com> Co-authored-by: Veeck Co-authored-by: Bugsounet - Cédric Co-authored-by: Marc Landis Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HeikoGr <20295490+HeikoGr@users.noreply.github.com> Co-authored-by: Pedro Lamas Co-authored-by: veeck Co-authored-by: Magnus <34011212+MagMar94@users.noreply.github.com> Co-authored-by: Ikko Eltociear Ashimine Co-authored-by: DevIncomin <56730075+Developer-Incoming@users.noreply.github.com> Co-authored-by: Nathan Co-authored-by: mixasgr Co-authored-by: Savvas Adamtziloglou Co-authored-by: Konstantinos Co-authored-by: OWL4C <124401812+OWL4C@users.noreply.github.com> Co-authored-by: BugHaver <43462320+bughaver@users.noreply.github.com> Co-authored-by: BugHaver <43462320+lsaadeh@users.noreply.github.com> Co-authored-by: Koen Konst Co-authored-by: Koen Konst Co-authored-by: dathbe Co-authored-by: Marcel Co-authored-by: Kevin G. Co-authored-by: Jboucly <33218155+jboucly@users.noreply.github.com> Co-authored-by: Jboucly Co-authored-by: Jarno <54169345+jarnoml@users.noreply.github.com> Co-authored-by: Jordan Welch Co-authored-by: Blackspirits Co-authored-by: Samed Ozdemir --- .github/CONTRIBUTING.md | 16 +- .github/PULL_REQUEST_TEMPLATE.md | 4 +- .github/dependabot.yaml | 2 - .github/workflows/automated-tests.yaml | 17 +- .github/workflows/dep-review.yaml | 2 +- .github/workflows/electron-rebuild.yaml | 14 +- .../workflows/enforce-pullrequest-rules.yaml | 28 +- .github/workflows/release-notes.yaml | 33 + .github/workflows/spellcheck.yaml | 4 +- .gitignore | 16 +- CHANGELOG.md | 6 +- Collaboration.md | 26 +- LICENSE.md | 2 +- README.md | 2 + cspell.config.json | 103 +- eslint.config.mjs | 38 +- jest.config.js | 10 +- js/alias-resolver.js | 31 + js/animateCSS.js | 4 +- js/app.js | 20 +- js/check_config.js | 49 +- js/electron.js | 12 +- js/ip_access_control.js | 63 + js/loader.js | 29 +- js/logger.js | 32 +- js/main.js | 15 +- js/module.js | 31 +- js/module_functions.js | 4 +- js/node_helper.js | 7 +- js/releasenotes.js | 198 + js/server.js | 22 +- js/server_functions.js | 47 +- js/translator.js | 46 +- js/utils.js | 13 +- modules/default/alert/alert.js | 4 +- modules/default/alert/notificationFx.js | 2 +- modules/default/alert/translations/pt-br.json | 4 + modules/default/alert/translations/pt.json | 4 + modules/default/calendar/calendar.js | 58 +- modules/default/calendar/calendarfetcher.js | 271 +- .../default/calendar/calendarfetcherutils.js | 367 +- modules/default/calendar/calendarutils.js | 2 +- modules/default/calendar/debug.js | 10 +- modules/default/calendar/node_helper.js | 26 +- modules/default/compliments/compliments.js | 46 +- modules/default/helloworld/helloworld.njk | 2 +- modules/default/newsfeed/newsfeed.js | 18 +- modules/default/newsfeed/newsfeed.njk | 4 +- modules/default/newsfeed/newsfeedfetcher.js | 11 +- modules/default/newsfeed/node_helper.js | 4 +- .../default/updatenotification/git_helper.js | 5 +- .../updatenotification/update_helper.js | 46 +- .../updatenotification/updatenotification.njk | 2 +- modules/default/utils.js | 32 +- modules/default/weather/forecast.njk | 2 +- .../default/weather/providers/envcanada.js | 41 +- .../default/weather/providers/openmeteo.js | 25 +- .../weather/providers/openweathermap.js | 8 +- .../weather/providers/overrideWrapper.js | 4 +- .../weather/providers/pirateweather.js | 56 +- modules/default/weather/providers/smhi.js | 12 +- .../default/weather/providers/ukmetoffice.js | 211 - .../weather/providers/ukmetofficedatahub.js | 12 +- .../default/weather/providers/weatherbit.js | 6 +- .../default/weather/providers/weatherflow.js | 6 +- .../default/weather/providers/weathergov.js | 21 +- modules/default/weather/providers/yr.js | 56 +- modules/default/weather/weather.js | 11 +- modules/default/weather/weatherprovider.js | 16 +- package-lock.json | 9451 +++++++---------- package.json | 84 +- serveronly/watcher.js | 261 + tests/configs/modules/calendar/symboltest.js | 3 +- tests/e2e/animateCSS_spec.js | 44 +- tests/e2e/custom_module_regions_spec.js | 13 +- tests/e2e/env_spec.js | 8 +- tests/e2e/helpers/global-setup.js | 204 +- tests/e2e/helpers/weather-functions.js | 12 - tests/e2e/ipWhitelist_spec.js | 14 +- tests/e2e/modules/alert_spec.js | 17 +- tests/e2e/modules/calendar_spec.js | 94 +- tests/e2e/modules/clock_de_spec.js | 9 +- tests/e2e/modules/clock_es_spec.js | 22 +- tests/e2e/modules/clock_spec.js | 73 +- tests/e2e/modules/compliments_spec.js | 41 +- tests/e2e/modules/helloworld_spec.js | 13 +- tests/e2e/modules/newsfeed_spec.js | 39 +- tests/e2e/modules/weather_current_spec.js | 42 +- tests/e2e/modules/weather_forecast_spec.js | 46 +- tests/e2e/modules/weather_hourly_spec.js | 25 +- tests/e2e/modules_display_spec.js | 12 +- tests/e2e/modules_empty_spec.js | 12 +- tests/e2e/modules_position_spec.js | 10 +- tests/e2e/port_spec.js | 6 +- tests/e2e/serveronly_spec.js | 12 +- tests/e2e/template_spec.js | 3 +- tests/e2e/translations_spec.js | 11 +- tests/electron/env_spec.js | 5 +- tests/electron/helpers/global-setup.js | 46 +- tests/mocks/calendar_duplicates_1.ics | 87 + tests/mocks/calendar_duplicates_2.ics | 87 + tests/mocks/fullday_until.ics | 2 +- tests/unit/classes/translator_spec.js | 3 +- .../updatenotification_spec.js.snap | 40 +- tests/unit/functions/server_functions_spec.js | 36 +- .../unit/functions/updatenotification_spec.js | 245 +- .../calendar_fetcher_utils_bad_rrule.js | 9 +- .../calendar/calendar_fetcher_utils_spec.js | 1 - .../default/compliments/compliments_spec.js | 152 + tests/unit/modules/default/utils_spec.js | 2 +- tests/utils/test_sequencer.js | 30 - tests/utils/vitest-setup.js | 35 + translations/pt.json | 43 +- vitest.config.mjs | 103 + 114 files changed, 6729 insertions(+), 7129 deletions(-) create mode 100644 .github/workflows/release-notes.yaml create mode 100644 js/alias-resolver.js create mode 100644 js/ip_access_control.js create mode 100644 js/releasenotes.js create mode 100644 modules/default/alert/translations/pt-br.json create mode 100644 modules/default/alert/translations/pt.json delete mode 100644 modules/default/weather/providers/ukmetoffice.js create mode 100644 serveronly/watcher.js create mode 100644 tests/mocks/calendar_duplicates_1.ics create mode 100644 tests/mocks/calendar_duplicates_2.ics create mode 100644 tests/unit/modules/default/compliments/compliments_spec.js delete mode 100644 tests/utils/test_sequencer.js create mode 100644 tests/utils/vitest-setup.js create mode 100644 vitest.config.mjs diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 37d01ccc4f..2f22cbf24d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -30,9 +30,19 @@ To run markdownlint, use `node --run lint:markdown`. ## Testing -We use [Jest](https://jestjs.io) for JavaScript testing. +We use [Vitest](https://vitest.dev) for JavaScript testing. To run all tests, use `node --run test`. -The specific test commands are defined in `package.json`. -So you can also run the specific tests with other commands, e.g. `node --run test:unit` or `npx jest tests/e2e/env_spec.js`. +The `package.json` scripts expose finer-grained test commands: + +- `test:unit` – run unit tests only +- `test:e2e` – execute browser-driven end-to-end tests +- `test:electron` – launch the Electron-based regression suite +- `test:coverage` – collect coverage while running every suite +- `test:watch` – keep Vitest in watch mode for fast local feedback +- `test:ui` – open the Vitest UI dashboard (needs OS file-watch support enabled) +- `test:calendar` – run the legacy calendar debug helper +- `test:css`, `test:markdown`, `test:prettier`, `test:spelling`, `test:js` – lint-only scripts that enforce formatting, spelling, markdown style, and ESLint. + +You can invoke any script with `node --run