refactor: replace module-alias dependency with internal alias resolver (#3893)

- removes the external unmaintained `module-alias` dependency ->
reducing complexity and risk
- introduces a small internal alias mechanism for `logger` and
`node_helper`
- preserves backward compatibility for existing 3rd‑party modules
- should simplify a future ESM migration of MagicMirror

I'm confident that it shouldn't cause any problems, but we could also
consider including it in the release after next. What do you think?

This PR is inspired by PR #2934 - so thanks to @thesebas! 🙇 😃
This commit is contained in:
Kristjan ESPERANTO
2025-09-30 20:12:58 +02:00
committed by GitHub
parent b1a189b238
commit 787cc6bd1f
9 changed files with 49 additions and 24 deletions

View File

@@ -3,8 +3,8 @@
* use this script with `node debug.js` to test the fetcher without the need
* of starting the MagicMirror² core. Adjust the values below to your desire.
*/
// Alias modules mentioned in package.js under _moduleAliases.
require("module-alias/register");
// Load internal alias resolver
require("../../../js/alias-resolver");
const Log = require("logger");
const CalendarFetcher = require("./calendarfetcher");