Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.27.0 (#3410) #2

Merged
merged 2 commits into from
Apr 9, 2024
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
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
modules/default/calendar/vendor/*
modules/*
!modules/default/
18 changes: 14 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": ["eslint:recommended", "plugin:@stylistic/all-extends", "plugin:import/recommended", "plugin:jest/recommended", "plugin:jsdoc/recommended"],
"plugins": [],
"plugins": ["unicorn"],
"env": {
"browser": true,
"es2023": true,
"es2024": true,
"jest/globals": true,
"node": true
},
Expand All @@ -16,7 +16,7 @@
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2023,
"ecmaVersion": "latest",
"ecmaFeatures": {
"globalReturn": true
}
Expand Down Expand Up @@ -62,7 +62,8 @@
"@stylistic/indent": ["error", "tab"],
"@stylistic/semi": ["error", "always"],
"@stylistic/space-before-function-paren": ["error", "always"],
"@stylistic/spaced-comment": "off"
"@stylistic/spaced-comment": "off",
"unicorn/prefer-node-protocol": "error"
},
"overrides": [
{
Expand All @@ -78,6 +79,15 @@
"rules": {
"@stylistic/quotes": "off"
}
},
{
"extends": ["plugin:package-json/recommended"],
"files": ["package.json"],
"parser": "jsonc-eslint-parser",
"plugins": ["package-json"],
"rules": {
"package-json/sort-collections": ["error", ["devDependencies", "dependencies", "peerDependencies", "config"]]
}
}
]
}
10 changes: 0 additions & 10 deletions .github/codecov.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,36 @@ updates:
schedule:
interval: "weekly"
target-branch: "develop"
labels:
- "Skip Changelog"
- "dependencies"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
target-branch: "develop"
labels:
- "Skip Changelog"
- "dependencies"
- "javascript"

- package-ecosystem: "npm"
directory: "/vendor"
schedule:
interval: "monthly"
target-branch: "develop"
labels:
- "Skip Changelog"
- "dependencies"
- "javascript"

- package-ecosystem: "npm"
directory: "/fonts"
schedule:
interval: "monthly"
target-branch: "develop"
labels:
- "Skip Changelog"
- "dependencies"
- "javascript"
2 changes: 1 addition & 1 deletion .github/workflows/depsreview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Dependency Review"
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
20 changes: 20 additions & 0 deletions .github/workflows/electronRebuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Electron Rebuild Testing"

on: [pull_request]

jobs:
rebuild:
name: Run electron-rebuild
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install MagicMirror
run: npm run install-mm
- name: Install @electron/rebuild
run: npm install @electron/rebuild
- name: Install some test library to be rebuilded
run: npm install onoff node-pty drivelist
- name: Run electron-rebuild
run: npx electron-rebuild
continue-on-error: false
2 changes: 1 addition & 1 deletion .github/workflows/enforce-pullrequest-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
changeLogPath: "CHANGELOG.md"
skipLabels: "Skip Changelog"
- name: "Enforce develop branch"
if: ${{ github.base_ref == 'master' && !contains(github.event.pull_request.labels.*.name, 'mastermerge') }}
if: ${{ github.event.pull_request.base.ref == 'master' && !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'."
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ Temporary Items
!/modules/default/**
!/modules/README.md**

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

# Ignore users config file but keep the sample.
!/config/config.js.sample
Expand Down
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/sh

[ -f "$(dirname "$0")/_/husky.sh" ] && . "$(dirname "$0")/_/husky.sh"

if command -v npm &> /dev/null; then
npm run lint:staged
fi
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
engine-strict=true
audit=false
loglevel="error"
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.js
.eslintignore
.husky/pre-commit
.prettierignore
/config
/coverage
Expand Down
199 changes: 127 additions & 72 deletions CHANGELOG.md

Large diffs are not rendered by default.

24 changes: 22 additions & 2 deletions Collaboration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This document describes how collaborators of this repository should work togethe
- never merge your own PR's
- never merge without someone having approved (approving and merging from same person is allowed)
- wait for all approvals requested (or the author decides something different in the comments)
- never merge to `master`, except for releases (because of update notification)
- merge to `master` only for releases or other urgent issues (update notification is only triggered by tags)
- merges to master should be tagged with the "mastermerge" label so that the test runs through

## Issues
Expand All @@ -15,4 +15,24 @@ This document describes how collaborators of this repository should work togethe

## Releases

- are done by @MichMich only
Are done by @rejas or @khassel.

### Deployment steps

- pull latest `develop` branch
- update `package.json` to reflect correct version number
- run `npm install` to generate new `package-lock.json`
- test `develop` branch
- update `CHANGELOG.md` (don't forget to add all contributor names)
- commit and push all changes
- after successful test run via github actions: create pull request to `master` branch
- after PR tests run without issues, merge PR
- create new release with corresponding version tag
- publish release notes with link to github release on forum in new locked topic

### Draft new development release

- checkout `develop` branch
- update `package.json` to reflect correct version number `2.xx.0-develop`
- draft new section in `CHANGELOG.md`
- commit and publish `develop` branch
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-2022 Michael Teeuw
Copyright © 2016-2024 Michael Teeuw

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<a href="https://choosealicense.com/licenses/mit">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
</a>
<img src="https://img.shields.io/github/actions/workflow/status/michmich/magicmirror/automated-tests.yaml" alt="GitHub Actions">
<img src="https://img.shields.io/github/checks-status/michmich/magicmirror/master" alt="Build Status">
<a href="https://github.com/MichMich/MagicMirror">
<img src="https://img.shields.io/github/stars/michmich/magicmirror?style=social">
<img src="https://img.shields.io/github/actions/workflow/status/magicmirrororg/magicmirror/automated-tests.yaml" alt="GitHub Actions">
<img src="https://img.shields.io/github/checks-status/magicmirrororg/magicmirror/master" alt="Build Status">
<a href="https://github.com/MagicMirrorOrg/MagicMirror">
<img src="https://img.shields.io/github/stars/magicmirrororg/magicmirror?style=social">
</a>
</p>

**MagicMirror²** is an open source modular smart mirror platform. With a growing list of installable modules, the **MagicMirror²** allows you to convert your hallway or bathroom mirror into your personal assistant. **MagicMirror²** is built by the creator of [the original MagicMirror](https://michaelteeuw.nl/tagged/magicmirror) with the incredible help of a [growing community of contributors](https://github.com/MichMich/MagicMirror/graphs/contributors).
**MagicMirror²** is an open source modular smart mirror platform. With a growing list of installable modules, the **MagicMirror²** allows you to convert your hallway or bathroom mirror into your personal assistant. **MagicMirror²** is built by the creator of [the original MagicMirror](https://michaelteeuw.nl/tagged/magicmirror) with the incredible help of a [growing community of contributors](https://github.com/MagicMirrorOrg/MagicMirror/graphs/contributors).

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!

Expand Down
4 changes: 2 additions & 2 deletions clientonly/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// Return new pending promise
return new Promise((resolve, reject) => {
// Select http or https module, depending on requested url
const lib = url.startsWith("https") ? require("https") : require("http");
const lib = url.startsWith("https") ? require("node:https") : require("node:http");
const request = lib.get(url, (response) => {
let configData = "";

Expand Down Expand Up @@ -94,7 +94,7 @@

// Spawn electron application
const electron = require("electron");
const child = require("child_process").spawn(electron, ["js/electron.js"], options);
const child = require("node:child_process").spawn(electron, ["js/electron.js"], options);

// Pipe all child process output to current stdout
child.stdout.on("data", function (buf) {
Expand Down
5 changes: 1 addition & 4 deletions config/config.js.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/* MagicMirror² Config Sample
*
* By Michael Teeuw https://michaelteeuw.nl
* MIT Licensed.
/* Config Sample
*
* For more information on how you can configure this file
* see https://docs.magicmirror.builders/configuration/introduction.html
Expand Down
8 changes: 3 additions & 5 deletions css/custom.css.sample
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* MagicMirror² Custom CSS Sample
/* Custom CSS Sample
*
* Change color and fonts here.
*
* Beware that properties cannot be unitless, so for example write '--gap-body: 0px;' instead of just '--gap-body: 0;'
*
* MIT Licensed.
*/

/* Uncomment and adjust accordingly if you want to import another font from the google-fonts-api: */
Expand All @@ -18,14 +16,14 @@

--font-primary: "Roboto Condensed";
--font-secondary: "Roboto";

--font-size: 20px;
--font-size-small: 0.75rem;

--gap-body-top: 60px;
--gap-body-right: 60px;
--gap-body-bottom: 60px;
--gap-body-left: 60px;

--gap-modules: 30px;
}
18 changes: 10 additions & 8 deletions fonts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions fonts/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "magicmirror-fonts",
"description": "Package for fonts use by MagicMirror² Core.",
"version": "1.0.0",
"description": "Package for fonts use by MagicMirror² core.",
"repository": {
"type": "git",
"url": "git+https://github.com/MichMich/MagicMirror.git"
"url": "https://github.com/MagicMirrorOrg/MagicMirror"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/MichMich/MagicMirror/issues"
"url": "https://github.com/MagicMirrorOrg/MagicMirror/issues"
},
"dependencies": {
"@fontsource/roboto": "^5.0.8",
"@fontsource/roboto-condensed": "^5.0.14"
"@fontsource/roboto": "^5.0.12",
"@fontsource/roboto-condensed": "^5.0.15"
}
}
7 changes: 0 additions & 7 deletions js/animateCSS.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/* MagicMirror²
* AnimateCSS System from https://animate.style/
* by @bugsounet
* for Michael Teeuw https://michaelteeuw.nl
* MIT Licensed.
*/

/* enumeration of animations in Array **/
const AnimateCSSIn = [
// Attention seekers
Expand Down
Loading
Loading