mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-10-16 17:32:43 +00:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b0c5924019 |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -7,25 +7,6 @@ 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².
|
||||
|
||||
## [2.34.0] - unreleased
|
||||
|
||||
planned for 2026-01-01
|
||||
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
|
||||
- [core] refactor: replace `module-alias` dependency with internal alias resolver (#3893)
|
||||
|
||||
### Fixed
|
||||
|
||||
- feat: add ESlint rule `no-sparse-arrays` for config check to fix #3910 (#3911)
|
||||
- fixed eslint warnings shown in #3911 and updated npm publish docs (#3913)
|
||||
|
||||
### Updated
|
||||
|
||||
- [core] Update dependencies (#3909)
|
||||
|
||||
## [2.33.0] - 2025-10-01
|
||||
|
||||
Thanks to: @Crazylegstoo, @dathbe, @m-idler, @plebcity, @khassel, @KristjanESPERANTO, @rejas and @sdetweil!
|
||||
@@ -1843,7 +1824,6 @@ It includes (but is not limited to) the following features:
|
||||
|
||||
This was part of the blogpost: [https://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the](https://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the)
|
||||
|
||||
[2.34.0]: https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.33.0...develop
|
||||
[2.33.0]: https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.32.0...v2.33.0
|
||||
[2.32.0]: https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.31.0...v2.32.0
|
||||
[2.31.0]: https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.30.0...v2.31.0
|
||||
|
@@ -22,7 +22,6 @@ Are done by
|
||||
- [ ] @rejas
|
||||
- [ ] @sdetweil
|
||||
- [ ] @khassel
|
||||
- [ ] @KristjanESPERANTO
|
||||
|
||||
### Pre-Deployment steps
|
||||
|
||||
@@ -66,7 +65,3 @@ 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`
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# The MIT License (MIT)
|
||||
|
||||
Copyright © 2016-2026 Michael Teeuw
|
||||
Copyright © 2016-2025 Michael Teeuw
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
@@ -1,7 +1,3 @@
|
||||
const aliasMapper = {
|
||||
logger: "<rootDir>/js/logger.js"
|
||||
};
|
||||
|
||||
const config = {
|
||||
verbose: true,
|
||||
testTimeout: 20000,
|
||||
@@ -10,21 +6,21 @@ const config = {
|
||||
{
|
||||
displayName: "unit",
|
||||
globalSetup: "<rootDir>/tests/unit/helpers/global-setup.js",
|
||||
moduleNameMapper: aliasMapper,
|
||||
moduleNameMapper: {
|
||||
logger: "<rootDir>/js/logger.js"
|
||||
},
|
||||
testMatch: ["**/tests/unit/**/*.[jt]s?(x)"],
|
||||
testPathIgnorePatterns: ["<rootDir>/tests/unit/mocks", "<rootDir>/tests/unit/helpers"]
|
||||
},
|
||||
{
|
||||
displayName: "electron",
|
||||
testMatch: ["**/tests/electron/**/*.[jt]s?(x)"],
|
||||
moduleNameMapper: aliasMapper,
|
||||
testPathIgnorePatterns: ["<rootDir>/tests/electron/helpers"]
|
||||
},
|
||||
{
|
||||
displayName: "e2e",
|
||||
testMatch: ["**/tests/e2e/**/*.[jt]s?(x)"],
|
||||
modulePaths: ["<rootDir>/js/"],
|
||||
moduleNameMapper: aliasMapper,
|
||||
testPathIgnorePatterns: ["<rootDir>/tests/e2e/helpers", "<rootDir>/tests/e2e/mocks"]
|
||||
}
|
||||
],
|
||||
|
@@ -1,31 +0,0 @@
|
||||
// Internal alias mapping for default and 3rd party modules.
|
||||
// Provides short require identifiers: "logger" and "node_helper".
|
||||
// For a future ESM migration, replace this with a public export/import surface.
|
||||
|
||||
const path = require("node:path");
|
||||
const Module = require("module");
|
||||
|
||||
const root = path.join(__dirname, "..");
|
||||
|
||||
// Keep this list minimal; do not add new aliases without architectural review.
|
||||
const ALIASES = {
|
||||
logger: "js/logger.js",
|
||||
node_helper: "js/node_helper.js"
|
||||
};
|
||||
|
||||
// Resolve to absolute paths now.
|
||||
const resolved = Object.fromEntries(
|
||||
Object.entries(ALIASES).map(([k, rel]) => [k, path.join(root, rel)])
|
||||
);
|
||||
|
||||
// Prevent multiple patching if this file is required more than once.
|
||||
if (!Module._mmAliasPatched) {
|
||||
const origResolveFilename = Module._resolveFilename;
|
||||
Module._resolveFilename = function (request, parent, isMain, options) {
|
||||
if (Object.prototype.hasOwnProperty.call(resolved, request)) {
|
||||
return resolved[request];
|
||||
}
|
||||
return origResolveFilename.call(this, request, parent, isMain, options);
|
||||
};
|
||||
Module._mmAliasPatched = true; // non-enumerable marker would be overkill here
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
// Load lightweight internal alias resolver
|
||||
require("./alias-resolver");
|
||||
// Alias modules mentioned in package.js under _moduleAliases.
|
||||
require("module-alias/register");
|
||||
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
|
@@ -1,15 +1,12 @@
|
||||
// Ensure internal require aliases (e.g., "logger") resolve when this file is run as a standalone script
|
||||
require("./alias-resolver");
|
||||
|
||||
const path = require("node:path");
|
||||
const fs = require("node:fs");
|
||||
const { styleText } = require("node:util");
|
||||
const Ajv = require("ajv");
|
||||
const globals = require("globals");
|
||||
const { Linter } = require("eslint");
|
||||
const Log = require("logger");
|
||||
|
||||
const rootPath = path.resolve(`${__dirname}/../`);
|
||||
const Log = require(`${rootPath}/js/logger.js`);
|
||||
const Utils = require(`${rootPath}/js/utils.js`);
|
||||
|
||||
const linter = new Linter({ configType: "flat" });
|
||||
@@ -58,10 +55,7 @@ function checkConfigFile () {
|
||||
...globals.node
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
"no-sparse-arrays": "error",
|
||||
"no-undef": "error"
|
||||
}
|
||||
rules: { "no-undef": "error" }
|
||||
},
|
||||
configFileName
|
||||
);
|
||||
|
@@ -415,7 +415,7 @@ const Module = Class.extend({
|
||||
});
|
||||
|
||||
/**
|
||||
* Merging MagicMirror² (or other) default/config script by `@bugsounet`
|
||||
* Merging MagicMirror² (or other) default/config script by @bugsounet
|
||||
* Merge 2 objects or/with array
|
||||
*
|
||||
* Usage:
|
||||
|
@@ -1,7 +1,10 @@
|
||||
const path = require("node:path");
|
||||
|
||||
const rootPath = path.resolve(`${__dirname}/../`);
|
||||
const Log = require(`${rootPath}/js/logger.js`);
|
||||
const os = require("node:os");
|
||||
const fs = require("node:fs");
|
||||
const si = require("systeminformation");
|
||||
const Log = require("logger");
|
||||
|
||||
const modulePositions = []; // will get list from index.html
|
||||
const regionRegEx = /"region ([^"]*)/i;
|
||||
|
@@ -876,7 +876,7 @@ Module.register("calendar", {
|
||||
* @param {string} url The calendar url
|
||||
* @param {string} property The property to look for
|
||||
* @param {string} defaultValue The value if the property is not found
|
||||
* @returns {string} The property
|
||||
* @returns {property} The property
|
||||
*/
|
||||
getCalendarProperty (url, property, defaultValue) {
|
||||
for (const calendar of this.config.calendars) {
|
||||
|
@@ -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.
|
||||
*/
|
||||
// Load internal alias resolver
|
||||
require("../../../js/alias-resolver");
|
||||
// Alias modules mentioned in package.js under _moduleAliases.
|
||||
require("module-alias/register");
|
||||
const Log = require("logger");
|
||||
|
||||
const CalendarFetcher = require("./calendarfetcher");
|
||||
|
@@ -181,7 +181,7 @@ Module.register("newsfeed", {
|
||||
* Gets a feed property by name
|
||||
* @param {object} feed A feed object.
|
||||
* @param {string} property The name of the property.
|
||||
* @returns {string} The value of the specified property for the feed.
|
||||
* @returns {property} The value of the specified property for the feed.
|
||||
*/
|
||||
getFeedProperty (feed, property) {
|
||||
let res = this.config[property];
|
||||
|
711
package-lock.json
generated
711
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
17
package.json
17
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "magicmirror",
|
||||
"version": "2.34.0-develop",
|
||||
"version": "2.33.0",
|
||||
"description": "The open source modular smart mirror platform.",
|
||||
"keywords": [
|
||||
"magic mirror",
|
||||
@@ -84,6 +84,7 @@
|
||||
"helmet": "^8.1.0",
|
||||
"html-to-text": "^9.0.5",
|
||||
"iconv-lite": "^0.7.0",
|
||||
"module-alias": "^2.2.3",
|
||||
"moment": "^2.30.1",
|
||||
"moment-timezone": "^0.6.0",
|
||||
"node-ical": "^0.21.0",
|
||||
@@ -100,15 +101,15 @@
|
||||
"cspell": "^9.2.1",
|
||||
"eslint-plugin-import-x": "^4.16.1",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-jsdoc": "^60.7.0",
|
||||
"eslint-plugin-jsdoc": "^60.1.1",
|
||||
"eslint-plugin-package-json": "^0.56.3",
|
||||
"express-basic-auth": "^1.2.1",
|
||||
"husky": "^9.1.7",
|
||||
"jest": "^30.2.0",
|
||||
"jest": "^30.1.3",
|
||||
"jsdom": "^27.0.0",
|
||||
"lint-staged": "^16.2.3",
|
||||
"lint-staged": "^16.2.0",
|
||||
"markdownlint-cli2": "^0.18.1",
|
||||
"playwright": "^1.55.1",
|
||||
"playwright": "^1.55.0",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-plugin-jinja-template": "^2.1.0",
|
||||
"stylelint": "^16.24.0",
|
||||
@@ -116,9 +117,13 @@
|
||||
"stylelint-prettier": "^5.0.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"electron": "^38.2.0"
|
||||
"electron": "^38.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.18.0"
|
||||
},
|
||||
"_moduleAliases": {
|
||||
"node_helper": "js/node_helper.js",
|
||||
"logger": "js/logger.js"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user