10 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
b9d63d7252
Use "node --run" instead of "npm run" (#3764)
This has the advantage that the package manager is no longer involved
after the installation process.

However, previous start commands such as `npm run start` continue to
work. So we don't even have to adapt the documentation.
2025-05-06 20:33:42 +02:00
Bugsounet - Cédric
4259d7c075
updatenotification: some fixes (#3628)
continue from #3626 

Is it ok for you ?
2024-11-09 09:59:12 +01:00
Bugsounet - Cédric
cd6f10c843
PM2 Fix (again): add pm2_env.unique_id checking and cleaning (#3626)
#3605 : new purpose code with `pm2_env.unique_id` checking
2024-11-07 11:38:46 +01:00
Bugsounet - Cédric
399e2ae1da
[updatenotification] Fix pm2 using detection when pm2 script is inside or outside MagicMirror root folder (#3605)
This will fix #3576 

@FrankBlackMG: 

I don't use `*env.unique_id` because some others modules can use pm2 too
for starting a service and unique_id is the same (this will make
confusion)
So I check `name` and `pm_id` for found it
2024-10-28 10:32:39 +01:00
Bugsounet - Cédric
ee98a0c7e5
[UpdateNotification] Fix pm2 using detection when pm2 script is in MagicMirror root folder (#3576)
I discover this bug:

When pm2 `sh` script is on MagicMirror root folder, updatenotification
is not able to detect pm2 using

```
0|MagicMirror  | [2024-10-02 17:23:09.215] [DEBUG]   Version Compare: 2.30.0-develop 2.30.0-develop --> true 
0|MagicMirror  | [2024-10-02 17:23:09.216] [DEBUG]   Status: online 
0|MagicMirror  | [2024-10-02 17:23:09.216] [DEBUG]   PM2 MagicMirror starting  from Path: /home/bugsounet/MagicMirror-dev 
0|MagicMirror  | [2024-10-02 17:23:09.216] [DEBUG]   MagicMirror Path /home/bugsounet/MagicMirror-dev/
0|MagicMirror  | [2024-10-02 17:23:09.216] [DEBUG]   Compare: false
0|MagicMirror  | [2024-10-02 17:23:09.216] [INFO]  updatenotification: [PM2] You are not using pm2 
```
2024-10-02 18:33:46 +02:00
Veeck
976c8ae00a
Bump stylistic-eslint (#3520)
updates plugin and adjust docs and config for smooth cleaning :-D

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-12 22:52:43 +02:00
Karsten Hassel
92ac3895a7
updatenotification: avoid using pm2 when running in docker container (#3484)
related to #3480 

Change module updatenotification so that it can work without `pm2` in a
docker container.

It now tests if file `/.dockerenv` exists and if so `require("pm2")` is
never called.
2024-06-28 22:33:21 +02:00
Bugsounet - Cédric
c96ced9137
updatenotification: update_helper.js recode with pm2 library (v2.27.x) (#3332)
#3285

Because there is so many conflit with package,
I have rewrite the code with v2.27.0-develop

For remember:

 * recode: `update_helper.js` with `pm2` library
 * fix: default config -> `updates` is a array
 * delete: `command-exists` library (not used)
 * delete: `PM2_GetList()`  function (not used)
 * add: check `updates.length` (prevent crash)
 * add: `[PM2]` tag in log (for better visibility)
 * add: `pm2` library
 
advantage:
  * we use the pm2 library directly
* avoids weird returns from child_process.exec when requesting a json
format from pm2
  * simplified the code

inconvenient:
  * we have vulnerabilities with axios

240120 Fix:
* use `pm2_env.pm_cwd` instead of `pm2_env.PWD` : prevent using `pm2
restart <id> --update-env` in other directory (for enable GPU rendering
for exemple)
 * resolve packages (again)
2024-01-20 17:38:22 +01:00
Kristjan ESPERANTO
4bbd35fa6a
Use node prefix for build-in modules (#3340)
It is basically a cosmetic thing, but has the following advantages:

1. Consistency with the official node documentation. The prefix is used
there.
2. It is easier to recognize the build-in modules.
2024-01-08 17:45:54 +01:00
Michael Teeuw
8c0e7db494
Release 2.26.0 (#3319)
## [2.26.0] - 01-01-2024

Thanks to: @bnitkin, @bugsounet, @dependabot, @jkriegshauser,
@kaennchenstruggle, @KristjanESPERANTO and @Ybbet.

Special thanks to @khassel, @rejas and @sdetweil for taking over most
(if not all) of the work on this release as project collaborators. This
version would not be there without their effort. Thank you guys! You are
awesome!

This release also marks the latest release by Michael Teeuw. For more
info, please read the following post: [A New Chapter for MagicMirror:
The Community Takes the
Lead](https://forum.magicmirror.builders/topic/18329/a-new-chapter-for-magicmirror-the-community-takes-the-lead).

### Added

- Added update notification updater (for 3rd party modules)
- Added node 21 to the test matrix
- Added transform object to calendar:customEvents
- Added ESLint rules for jest (including jest/expect-expect and
jest/no-done-callback)

### Removed

- Removed Codecov workflow (not working anymore, other workflow
required) (#3107)
- Removed titleReplace from calendar, replaced + extended by
customEvents (backward compatibility included) (#3249)
- Removed failing unit test (#3254)
- Removed some unused variables

### Updated

- Update electron to v27 and update other dependencies as well as github
actions
- Update newsfeed: Use `html-to-text` instead of regex for transform
description
- Review ESLint config (#3269)
- Updated dependencies
- Clock module: optionally display current moon phase in addition to
rise/set times
- electron is now per default started without gpu, if needed it must be
enabled with new env var `ELECTRON_ENABLE_GPU=1` on startup (#3226)
- Replace prettier by stylistic in ESLint config to lint JavaScript (and
disable some rules for `config/config.js*` files)
- Update node-ical to v0.17.1 and fix tests

### Fixed

- Avoid fade out/in on updateDom when many calendars are used
- Fix the option eventClass on customEvents.
- Fix yr API version in locationforecast and sunrise call (#3227)
- Fix cloneObject() function to respect RegExp (#3237)
- Fix newsfeed module for feeds using "a10:updated" tag (#3238)
- Fix issue template (#3167)
- Fix #3256 filter out bad results from rrule.between
- Fix calendar events sometimes not respecting deleted events (#3250)
- Fix electron loadurl locally on Windows when address "0.0.0.0" (#2550)
- Fix updatanotification (update_helper.js): catch error if reponse is
not an JSON format (check PM2)
- Fix missing typeof in calendar module
- Fix style issues after prettier update
- Fix calendar test (#3291) by moving "Exdate check" from e2e to
electron to run on a Thursday
- Fix calendar config params `fetchInterval` and `excludedEvents` were
never used from single calendar config (#3297)
- Fix MM_PORT variable not used in electron and allow full path for
MM_CONFIG_FILE variable (#3302)

---------

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Karsten Hassel <hassel@gmx.de>
Co-authored-by: Malte Hallström <46646495+SkySails@users.noreply.github.com>
Co-authored-by: Veeck <github@veeck.de>
Co-authored-by: veeck <michael@veeck.de>
Co-authored-by: dWoolridge <dwoolridge@charter.net>
Co-authored-by: Johan <jojjepersson@yahoo.se>
Co-authored-by: Dario Mratovich <dario_mratovich@hotmail.com>
Co-authored-by: Dario Mratovich <dario.mratovich@outlook.com>
Co-authored-by: Magnus <34011212+MagMar94@users.noreply.github.com>
Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
Co-authored-by: buxxi <buxxi@omfilm.net>
Co-authored-by: Thomas Hirschberger <47733292+Tom-Hirschberger@users.noreply.github.com>
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
Co-authored-by: Andrés Vanegas Jiménez <142350+angeldeejay@users.noreply.github.com>
Co-authored-by: Dave Child <dave@addedbytes.com>
Co-authored-by: grenagit <46225780+grenagit@users.noreply.github.com>
Co-authored-by: Grena <grena@grenabox.fr>
Co-authored-by: Magnus Marthinsen <magmar@online.no>
Co-authored-by: Patrick <psieg@users.noreply.github.com>
Co-authored-by: Piotr Rajnisz <56397164+rajniszp@users.noreply.github.com>
Co-authored-by: Suthep Yonphimai <tomzt@users.noreply.github.com>
Co-authored-by: CarJem Generations (Carter Wallace) <cwallacecs@gmail.com>
Co-authored-by: Nicholas Fogal <nfogal.misc@gmail.com>
Co-authored-by: JakeBinney <126349119+JakeBinney@users.noreply.github.com>
Co-authored-by: OWL4C <124401812+OWL4C@users.noreply.github.com>
Co-authored-by: Oscar Björkman <17575446+oscarb@users.noreply.github.com>
Co-authored-by: Ismar Slomic <ismar@slomic.no>
Co-authored-by: Jørgen Veum-Wahlberg <jorgen.wahlberg@amedia.no>
Co-authored-by: Eddie Hung <6740044+eddiehung@users.noreply.github.com>
Co-authored-by: Bugsounet - Cédric <github@bugsounet.fr>
Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Knapoc <Knapoc@users.noreply.github.com>
Co-authored-by: sam detweiler <sdetweil@gmail.com>
Co-authored-by: veeck <michael.veeck@nebenan.de>
Co-authored-by: Paranoid93 <6515818+Paranoid93@users.noreply.github.com>
Co-authored-by: NolanKingdon <27908974+NolanKingdon@users.noreply.github.com>
Co-authored-by: J. Kenzal Hunter <kenzal.hunter@gmail.com>
Co-authored-by: Teddy <teddy.payet@gmail.com>
Co-authored-by: TeddyStarinvest <teddy.payet@starinvest.com>
Co-authored-by: martingron <61826403+martingron@users.noreply.github.com>
Co-authored-by: dgoth <132394363+dgoth@users.noreply.github.com>
Co-authored-by: kaennchenstruggle <54073894+kaennchenstruggle@users.noreply.github.com>
Co-authored-by: jkriegshauser <jkriegshauser@gmail.com>
Co-authored-by: Ben Nitkin <ben@nitkin.net>
2024-01-01 15:38:08 +01:00