Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <script>` (or `npm run <script>`). Individual files can still be targeted directly, e.g. `npx vitest run tests/e2e/env_spec.js`.
4 changes: 1 addition & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Hello and thank you for wanting to contribute to the MagicMirror² project!

**Please make sure that you have followed these 4 rules before submitting your Pull Request:**
**Please make sure that you have followed these 3 rules before submitting your Pull Request:**

> 1. Base your pull requests against the `develop` branch.
> 2. Include these infos in the description:
Expand All @@ -12,8 +12,6 @@ Hello and thank you for wanting to contribute to the MagicMirror² project!
>
> 3. Please run `node --run lint:prettier` before submitting so that
> style issues are fixed.
> 4. Don't forget to add an entry about your changes to
> the CHANGELOG.md file.

**Note**: Sometimes the development moves very fast. It is highly
recommended that you update your branch of `develop` before creating a
Expand Down
2 changes: 0 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ updates:
interval: "weekly"
target-branch: "develop"
labels:
- "Skip Changelog"
- "dependencies"

- package-ecosystem: "npm"
Expand All @@ -15,6 +14,5 @@ updates:
interval: "monthly"
target-branch: "develop"
labels:
- "Skip Changelog"
- "dependencies"
- "javascript"
17 changes: 12 additions & 5 deletions .github/workflows/automated-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
code-style-check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: "Checkout code"
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: "Use Node.js"
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: "npm"
Expand All @@ -38,23 +42,26 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
node-version: [22.18.0, 22.x, 24.x]
node-version: [22.21.1, 22.x, 24.x]
steps:
- name: Install electron dependencies and labwc
run: |
sudo apt-get update
sudo apt-get install -y libnss3 libasound2t64 labwc
- name: "Checkout code"
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: "Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
check-latest: true
cache: "npm"
- name: "Install MagicMirror²"
run: |
node --run install-mm:dev
- name: "Install Playwright browsers"
run: |
npx playwright install --with-deps chromium
- name: "Prepare environment for tests"
run: |
# Fix chrome-sandbox permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dep-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: "Dependency Review"
uses: actions/dependency-review-action@v4
14 changes: 5 additions & 9 deletions .github/workflows/electron-rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.18.0, 22.x, 24.x]
node-version: [22.21.1, 22.x, 24.x]
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: "Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Install MagicMirror
run: node --run install-mm
- name: Install @electron/rebuild
run: npm install @electron/rebuild
- name: Install node-libgpiod deps
run: |
sudo apt-get update
sudo apt-get install gpiod libgpiod2 libgpiod-dev
- name: Install test library (node-libgpiod) to be rebuilded
run: npm install node-libgpiod
- name: Install test library (serialport) to be rebuilt
run: npm install serialport
- name: Run electron-rebuild
run: npx electron-rebuild
continue-on-error: false
28 changes: 13 additions & 15 deletions .github/workflows/enforce-pullrequest-rules.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
# This workflow enforces on every pull request:
# - the update of our CHANGELOG.md file, see: https://github.com/dangoslen/changelog-enforcer
# - that the PR is not based against master, taken from https://github.com/oppia/oppia-android/pull/2832/files
# This workflow enforces on every pull request that the PR is not based against master,
# taken from https://github.com/oppia/oppia-android/blob/develop/.github/workflows/static_checks.yml

name: "Enforce Pull-Request Rules"

on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
pull_request:
push:
branches-ignore:
- develop
- master

jobs:
check:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
timeout-minutes: 10
steps:
- name: "Enforce changelog"
uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: "CHANGELOG.md"
skipLabels: "Skip Changelog"
- name: "Enforce develop branch"
if: ${{ github.event.pull_request.base.ref == 'master' && !contains(github.event.pull_request.labels.*.name, 'mastermerge') }}
- name: "Branch is not based on develop"
if: ${{ github.base_ref != 'develop' && !contains(github.event.pull_request.labels.*.name, 'mastermerge') }}
run: |
echo "This PR is based against the master branch and not a release or hotfix."
echo "Please don't do this. Switch the branch to 'develop'."
echo "Current base branch: $BASE_BRANCH"
echo "Note: PRs should only ever be merged into develop so please rebase your branch on develop and try again."
exit 1
env:
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
BASE_BRANCH: ${{ github.base_ref }}
33 changes: 33 additions & 0 deletions .github/workflows/release-notes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow writes a draft release on GitHub named `unreleased` after every push on develop

name: "Create Release Notes"

on:
push:
branches: [develop]

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release-notes:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: "Checkout code"
uses: actions/checkout@v6
with:
fetch-depth: "0"
- name: "Use Node.js"
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: "npm"
- name: "Create Markdown content"
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
node js/releasenotes.js
4 changes: 2 additions & 2 deletions .github/workflows/spellcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: develop
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: lts/*
check-latest: true
Expand Down
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ lib-cov
coverage
.lock-wscript
build/Release
/node_modules/**/*
!/tests/node_modules/**/*
node_modules
jspm_modules
.npm
.node_repl_history
Expand Down Expand Up @@ -56,21 +55,19 @@ Temporary Items
.Trash-*

# Ignore all modules except the default modules.
/modules/**
/modules/*
!/modules/default
!/modules/default/**
!/modules/README.md**

# Ignore changes to the custom css files but keep the sample and main.
/css/*
!/css/custom.css.sample
!/css/font-awesome.css
!/css/main.css
!/css/roboto.css
!/css/font-awesome.css

# Ignore users config file but keep the sample.
/config/*
!/config/config.js.sample
config
!config/config.js.sample

# Vim
## swap
Expand All @@ -88,3 +85,6 @@ js/positions.js
# Ignore lock files other than package-lock.json
pnpm-lock.yaml
yarn.lock

# Vitest temporary test files
tests/**/.tmp/
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

## Obsolete

This file is no longer being updated. Release notes are now automatically generated via a GitHub action.

## [2.33.0] - 2025-10-01

Thanks to: @Crazylegstoo, @dathbe, @m-idler, @plebcity, @khassel, @KristjanESPERANTO, @rejas and @sdetweil!
Expand Down Expand Up @@ -335,7 +339,7 @@ For more info, please read the following post: [A New Chapter for MagicMirror: T
### Fixed

- [weather] Correct apiBase of weathergov weatherProvider to match documentation (#2926)
- Worked around several issues in the RRULE library that were causing deleted calender events to still show, some
- Worked around several issues in the RRULE library that were causing deleted calendar events to still show, some
initial and recurring events to not show, and some event times to be off an hour. (#3291)
- Skip changelog requirement when running tests for dependency updates (#3320)
- Display precipitation probability when it is 0% instead of blank/empty (#3345)
Expand Down
26 changes: 15 additions & 11 deletions Collaboration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Are done by
- [ ] @rejas
- [ ] @sdetweil
- [ ] @khassel
- [ ] @KristjanESPERANTO

### Pre-Deployment steps

Expand All @@ -33,29 +34,28 @@ Are done by
- [ ] create `prep-release` branch from `develop`
- [ ] update `package.json` and `package-lock.json` to reflect correct version number `2.xx.0`
- [ ] test `prep-release` branch
- [ ] update `CHANGELOG.md`
- [ ] add all contributor names: `...`
- [ ] add min. node version: > ⚠️ This release needs nodejs version `v22.18.0` or higher
- [ ] check release link at the bottom of the file
- [ ] commit and push all changes
- [ ] create pull request from `prep-release` to `develop` branch with title `Prepare Release 2.xx.0`
- [ ] after successful test run via github actions: merge pull request to `develop`
- [ ] review the content of the automatically generated draft release named `unreleased`
- [ ] check contributor names
- [ ] check auto generated min. node version and adjust it for better readability if necessary
- [ ] check if all elements are assigned to the correct category
- [ ] change release name to `v2.xx.0`
- [ ] after successful test run via github actions: create pull request from `develop` to `master` branch
- [ ] add label `mastermerge`
- [ ] title of the PR is `Release 2.xx.0`
- [ ] description of the PR is the section of the `CHANGELOG.md`
- [ ] description of the PR is the body of the draft release with name `v2.xx.0`
- [ ] after PR tests run without issues, merge PR
- [ ] create new release with
- [ ] corresponding version tag `v2.xx.0`
- [ ] a release name: `...`
- [ ] description of the release is the section of the `CHANGELOG.md`
- [ ] edit draft release with name `v2.xx.0`
- [ ] set corresponding version tag `v2.xx.0` (with `Select tag` and then `Create new tag`)
- [ ] update release link in `Compare to previous Release` by replacing `develop` with new tag `v2.xx.0`
- [ ] publish the release (button at the bottom)

### Draft new development release

- [ ] checkout `develop` branch
- [ ] update `package.json` and `package-lock.json` to reflect correct version number `2.xx.0-develop`
- [ ] draft new section in `CHANGELOG.md`
- [ ] create new release link at the bottom of the file
- [ ] commit and push `develop` branch
- [ ] if new release will be in January, update the year in LICENSE.md

Expand All @@ -65,3 +65,7 @@ Are done by
- [ ] close all issues with label `ready (coming with next release)`
- [ ] release new documentation by merging `develop` on `master` in documentation repository
- [ ] publish new version on [npm](https://www.npmjs.com/package/magicmirror)
- [ ] use a clean environment (e.g. container)
- [ ] clone this repository with the new `master` branch and `cd` into the local repository directory
- [ ] log in to npm with `npm login --auth-type legacy` which will ask for username and password and one-time-password which is sent via mail
- [ ] execute `npm publish`
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)

Copyright © 2016-2025 Michael Teeuw
Copyright © 2016-2026 Michael Teeuw

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

MagicMirror² focuses on a modular plugin system and uses [Electron](https://www.electronjs.org/) as an application wrapper. So no more web server or browser installs necessary!

![Animated demonstration of MagicMirror²](https://magicmirror.builders/img/demo.gif)

## Documentation

For the full documentation including **[installation instructions](https://docs.magicmirror.builders/getting-started/installation.html)**, please visit our dedicated documentation website: [https://docs.magicmirror.builders](https://docs.magicmirror.builders).
Expand Down
Loading
Loading