In the latest versions of ESLint, more and more formatting rules were
removed or declared deprecated. These rules have been integrated into
the new Stylistic package (https://eslint.style/guide/why) and expanded.
Stylistic acts as a better formatter for JavaScript as Prettier.
With this PR there are many changes that make the code more uniform, but
it may be difficult to review due to the large amount. Even if I have no
worries about the changes, perhaps this would be something for the
release after next.
Let me know what you think.
Added my (modified) updater main core into updatenotification default
module
Missing: callback display in MM² (i will code it after)
new part of configuration added:
```
updates: [
// array of module update commands
{
// with embed npm script
"MMM-Test": "npm run update"
},
{
// with "complex" process
"MMM-OtherSample": "rm -rf package-lock.json && git reset --hard && git pull && npm install"
},
{
// with git pull && npm install
"MMM-OtherSample2": "git pull && npm install"
},
{
// with a simple git pull
"MMM-OtherSample3": "git pull"
}
],
updateTimeout: 2 * 60 * 1000, // max update duration
updateAutorestart: false // autoRestart MM when update done ?
```
@khassel: i need your help
I don't use docker, maybe you can help me for this:
How can i check if MM² is running inside a docker ? (from MM² main core)
Actually, I check if we use pm2 or not.
I have to check if docker is used or not too
last time you tell me: "you can't use updater with docker", so I want to
check and deny any update if docker used
---------
Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
Hi,
Like some default modules, I propose to send an `UPDATES` notification
in an array with the git information of these modules
This allows developers to create their own auto-update system (which
I've been using in my case since 3 years, with automatic things)
Of course, for security reasons `MagicMirror` is excluded
---------
Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
was [requested in the
forum](https://forum.magicmirror.builders/topic/17519/updatenotification).
- added possibility to exclude MagicMirror Repo and renamed it from
`default` to `MagicMirror`
- improved getting `behind` in case a hard `git fetch` was already done
- removed test "excludes repo if refs don't match regex" because of
above improvement this case is obsolete
- improved `git fetch --dry-run` with `-n` option to exclude tags (noise
reduction)