mirror of
				https://github.com/MichMich/MagicMirror.git
				synced 2025-10-31 10:48:10 +00:00 
			
		
		
		
	chore: update dependencies (#3891)
Since receiving a security warning about `axios` in `node-ical` (https://github.com/MagicMirrorOrg/MagicMirror/security/dependabot/70), I've created [a pull request to remove `axios` from `node-ical`](https://github.com/jens-maus/node-ical/pull/397) — it was accepted and we now have a new version 🙂
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							fb2aa438d8
						
					
				
				
					commit
					777b49c566
				
			| @@ -45,7 +45,7 @@ Thanks to: @dathbe. | |||||||
| ### Updated | ### Updated | ||||||
|  |  | ||||||
| - [calendar] Update defaultSymbol name and also the link to the icon search site (#3879) | - [calendar] Update defaultSymbol name and also the link to the icon search site (#3879) | ||||||
| - [core] Update dependencies including electron to v38 as well as github actions (#3831, #3849, #3857, #3858, #3872, #3876, #3882) | - [core] Update dependencies including electron to v38 as well as github actions (#3831, #3849, #3857, #3858, #3872, #3876, #3882, #3891) | ||||||
| - [weather] Update feels_like temperature calculation formula (#3869) | - [weather] Update feels_like temperature calculation formula (#3869) | ||||||
|  |  | ||||||
| ### Fixed | ### Fixed | ||||||
| @@ -56,6 +56,7 @@ Thanks to: @dathbe. | |||||||
| - [calendar] Fix regression handling of limit days (#3840) | - [calendar] Fix regression handling of limit days (#3840) | ||||||
| - [calendar] Fixed regression of calendarfetcherutils.shouldEventBeExcluded (#3841) | - [calendar] Fixed regression of calendarfetcherutils.shouldEventBeExcluded (#3841) | ||||||
| - [core] Fixed socket.io timeout when server is slow to send notification, notification lost at client (#3380) | - [core] Fixed socket.io timeout when server is slow to send notification, notification lost at client (#3380) | ||||||
|  | - [tests] refactor AnimateCSS tests after jsdom 27 upgrade (#3891) | ||||||
| - [weather] Use `apparent_temperature` data from openmeteo's hourly weather for current feelsLikeTemp (#3868). | - [weather] Use `apparent_temperature` data from openmeteo's hourly weather for current feelsLikeTemp (#3868). | ||||||
|  |  | ||||||
| ## [2.32.0] - 2025-07-01 | ## [2.32.0] - 2025-07-01 | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ import globals from "globals"; | |||||||
| import {flatConfigs as importX} from "eslint-plugin-import-x"; | import {flatConfigs as importX} from "eslint-plugin-import-x"; | ||||||
| import jest from "eslint-plugin-jest"; | import jest from "eslint-plugin-jest"; | ||||||
| import js from "@eslint/js"; | import js from "@eslint/js"; | ||||||
| import jsdoc from "eslint-plugin-jsdoc"; | import jsdocPlugin from "eslint-plugin-jsdoc"; | ||||||
| import packageJson from "eslint-plugin-package-json"; | import packageJson from "eslint-plugin-package-json"; | ||||||
| import stylistic from "@stylistic/eslint-plugin"; | import stylistic from "@stylistic/eslint-plugin"; | ||||||
|  |  | ||||||
| @@ -23,8 +23,8 @@ export default defineConfig([ | |||||||
| 				moment: "readonly" | 				moment: "readonly" | ||||||
| 			} | 			} | ||||||
| 		}, | 		}, | ||||||
| 		plugins: {js, jsdoc, stylistic}, | 		plugins: {js, stylistic}, | ||||||
| 		extends: [importX.recommended, jest.configs["flat/recommended"], "js/recommended", jsdoc.configs["flat/recommended"], "stylistic/all"], | 		extends: [importX.recommended, jest.configs["flat/recommended"], "js/recommended", jsdocPlugin.configs["flat/recommended"], "stylistic/all"], | ||||||
| 		rules: { | 		rules: { | ||||||
| 			"@stylistic/array-element-newline": ["error", "consistent"], | 			"@stylistic/array-element-newline": ["error", "consistent"], | ||||||
| 			"@stylistic/arrow-parens": ["error", "always"], | 			"@stylistic/arrow-parens": ["error", "always"], | ||||||
|   | |||||||
							
								
								
									
										4254
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4254
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										20
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								package.json
									
									
									
									
									
								
							| @@ -69,8 +69,8 @@ | |||||||
| 		"*.css": "stylelint --fix" | 		"*.css": "stylelint --fix" | ||||||
| 	}, | 	}, | ||||||
| 	"dependencies": { | 	"dependencies": { | ||||||
| 		"@fontsource/roboto": "^5.2.6", | 		"@fontsource/roboto": "^5.2.7", | ||||||
| 		"@fontsource/roboto-condensed": "^5.2.6", | 		"@fontsource/roboto-condensed": "^5.2.7", | ||||||
| 		"@fortawesome/fontawesome-free": "^7.0.1", | 		"@fortawesome/fontawesome-free": "^7.0.1", | ||||||
| 		"ajv": "^8.17.1", | 		"ajv": "^8.17.1", | ||||||
| 		"animate.css": "^4.1.1", | 		"animate.css": "^4.1.1", | ||||||
| @@ -87,13 +87,13 @@ | |||||||
| 		"module-alias": "^2.2.3", | 		"module-alias": "^2.2.3", | ||||||
| 		"moment": "^2.30.1", | 		"moment": "^2.30.1", | ||||||
| 		"moment-timezone": "^0.6.0", | 		"moment-timezone": "^0.6.0", | ||||||
| 		"node-ical": "^0.20.1", | 		"node-ical": "^0.21.0", | ||||||
| 		"nunjucks": "^3.2.4", | 		"nunjucks": "^3.2.4", | ||||||
| 		"pm2": "^6.0.10", | 		"pm2": "^6.0.11", | ||||||
| 		"socket.io": "^4.8.1", | 		"socket.io": "^4.8.1", | ||||||
| 		"suncalc": "^1.9.0", | 		"suncalc": "^1.9.0", | ||||||
| 		"systeminformation": "^5.27.8", | 		"systeminformation": "^5.27.9", | ||||||
| 		"undici": "^7.15.0", | 		"undici": "^7.16.0", | ||||||
| 		"weathericons": "^2.1.0" | 		"weathericons": "^2.1.0" | ||||||
| 	}, | 	}, | ||||||
| 	"devDependencies": { | 	"devDependencies": { | ||||||
| @@ -101,12 +101,12 @@ | |||||||
| 		"cspell": "^9.2.1", | 		"cspell": "^9.2.1", | ||||||
| 		"eslint-plugin-import-x": "^4.16.1", | 		"eslint-plugin-import-x": "^4.16.1", | ||||||
| 		"eslint-plugin-jest": "^29.0.1", | 		"eslint-plugin-jest": "^29.0.1", | ||||||
| 		"eslint-plugin-jsdoc": "^54.5.0", | 		"eslint-plugin-jsdoc": "^57.0.8", | ||||||
| 		"eslint-plugin-package-json": "^0.56.2", | 		"eslint-plugin-package-json": "^0.56.3", | ||||||
| 		"express-basic-auth": "^1.2.1", | 		"express-basic-auth": "^1.2.1", | ||||||
| 		"husky": "^9.1.7", | 		"husky": "^9.1.7", | ||||||
| 		"jest": "^30.1.3", | 		"jest": "^30.1.3", | ||||||
| 		"jsdom": "^26.1.0", | 		"jsdom": "^27.0.0", | ||||||
| 		"lint-staged": "^16.1.6", | 		"lint-staged": "^16.1.6", | ||||||
| 		"markdownlint-cli2": "^0.18.1", | 		"markdownlint-cli2": "^0.18.1", | ||||||
| 		"playwright": "^1.55.0", | 		"playwright": "^1.55.0", | ||||||
| @@ -117,7 +117,7 @@ | |||||||
| 		"stylelint-prettier": "^5.0.3" | 		"stylelint-prettier": "^5.0.3" | ||||||
| 	}, | 	}, | ||||||
| 	"optionalDependencies": { | 	"optionalDependencies": { | ||||||
| 		"electron": "^38.0.0" | 		"electron": "^38.1.0" | ||||||
| 	}, | 	}, | ||||||
| 	"engines": { | 	"engines": { | ||||||
| 		"node": ">=22.18.0" | 		"node": ">=22.18.0" | ||||||
|   | |||||||
| @@ -1,43 +1,79 @@ | |||||||
| const helpers = require("./helpers/global-setup"); | const helpers = require("./helpers/global-setup"); | ||||||
|  |  | ||||||
|  | // Validate Animate.css integration for compliments module using class toggling. | ||||||
|  | // We intentionally ignore computed animation styles (jsdom doesn't simulate real animations). | ||||||
| describe("AnimateCSS integration Test", () => { | describe("AnimateCSS integration Test", () => { | ||||||
| 	// define config file for testing | 	// Config variants under test | ||||||
| 	let testConfigFile = "tests/configs/modules/compliments/compliments_animateCSS.js"; | 	const TEST_CONFIG_ANIM = "tests/configs/modules/compliments/compliments_animateCSS.js"; | ||||||
| 	// define config file to fallback to default: wrong animation name (must return no animation) | 	const TEST_CONFIG_FALLBACK = "tests/configs/modules/compliments/compliments_animateCSS_fallbackToDefault.js"; // invalid animation names | ||||||
| 	let testConfigFileFallbackToDefault = "tests/configs/modules/compliments/compliments_animateCSS_fallbackToDefault.js"; | 	const TEST_CONFIG_INVERTED = "tests/configs/modules/compliments/compliments_animateCSS_invertedAnimationName.js"; // in/out swapped | ||||||
| 	// define config file with an inverted name animation : in for out and vice versa (must return no animation) | 	const TEST_CONFIG_NONE = "tests/configs/modules/compliments/compliments_anytime.js"; // no animations defined | ||||||
| 	let testConfigFileInvertedAnimationName = "tests/configs/modules/compliments/compliments_animateCSS_invertedAnimationName.js"; |  | ||||||
| 	// define config file with no animation defined |  | ||||||
| 	let testConfigByDefault = "tests/configs/modules/compliments/compliments_anytime.js"; |  | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * move similar tests in function doTest | 	 * Get the compliments container element (waits until available). | ||||||
| 	 * @param {string} [animationIn] animation in name of AnimateCSS to test. | 	 * @returns {Promise<HTMLElement>} compliments root element | ||||||
| 	 * @param {string} [animationOut] animation out name of AnimateCSS to test. |  | ||||||
| 	 * @returns {boolean} result |  | ||||||
| 	 */ | 	 */ | ||||||
| 	const doTest = async (animationIn, animationOut) => { | 	async function getComplimentsElement () { | ||||||
| 		await helpers.getDocument(); | 		await helpers.getDocument(); | ||||||
| 		let elem = await helpers.waitForElement(".compliments"); | 		const el = await helpers.waitForElement(".compliments"); | ||||||
| 		expect(elem).not.toBeNull(); | 		expect(el).not.toBeNull(); | ||||||
| 		let styles = window.getComputedStyle(elem); | 		return el; | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 		if (animationIn && animationIn !== "") { | 	/** | ||||||
| 			expect(styles._values.get("animation-name")).toBe(animationIn); | 	 * Wait for an Animate.css class to appear and persist briefly. | ||||||
| 		} else { | 	 * @param {string} cls Animation class name without leading dot (e.g. animate__flipInX) | ||||||
| 			expect(styles._values.get("animation-name")).toBeUndefined(); | 	 * @param {{timeout?: number}} [options] Poll timeout in ms (default 6000) | ||||||
|  | 	 * @returns {Promise<boolean>} true if class detected in time | ||||||
|  | 	 */ | ||||||
|  | 	async function waitForAnimationClass (cls, { timeout = 6000 } = {}) { | ||||||
|  | 		const start = Date.now(); | ||||||
|  | 		while (Date.now() - start < timeout) { | ||||||
|  | 			if (document.querySelector(`.compliments.animate__animated.${cls}`)) { | ||||||
|  | 				// small stability wait | ||||||
|  | 				await new Promise((r) => setTimeout(r, 50)); | ||||||
|  | 				if (document.querySelector(`.compliments.animate__animated.${cls}`)) return true; | ||||||
|  | 			} | ||||||
|  | 			await new Promise((r) => setTimeout(r, 100)); | ||||||
| 		} | 		} | ||||||
|  | 		throw new Error(`Timeout waiting for class ${cls}`); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 		if (animationOut && animationOut !== "") { | 	/** | ||||||
| 			elem = await helpers.waitForElement(`.compliments.animate__animated.animate__${animationOut}`); | 	 * Assert that no Animate.css animation class is applied within a time window. | ||||||
| 			expect(elem).not.toBeNull(); | 	 * @param {number} [ms] Observation period in ms (default 2000) | ||||||
| 			styles = window.getComputedStyle(elem); | 	 * @returns {Promise<void>} | ||||||
| 			expect(styles._values.get("animation-name")).toBe(animationOut); | 	 */ | ||||||
| 		} else { | 	async function assertNoAnimationWithin (ms = 2000) { | ||||||
| 			expect(styles._values.get("animation-name")).toBeUndefined(); | 		const start = Date.now(); | ||||||
|  | 		while (Date.now() - start < ms) { | ||||||
|  | 			if (document.querySelector(".compliments.animate__animated")) { | ||||||
|  | 				throw new Error("Unexpected animate__animated class present in non-animation scenario"); | ||||||
|  | 			} | ||||||
|  | 			await new Promise((r) => setTimeout(r, 100)); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Run one animation test scenario. | ||||||
|  | 	 * @param {string} [animationIn] Expected animate-in name | ||||||
|  | 	 * @param {string} [animationOut] Expected animate-out name | ||||||
|  | 	 * @returns {Promise<boolean>} true when scenario assertions pass | ||||||
|  | 	 */ | ||||||
|  | 	async function runAnimationTest (animationIn, animationOut) { | ||||||
|  | 		await getComplimentsElement(); | ||||||
|  | 		if (!animationIn && !animationOut) { | ||||||
|  | 			await assertNoAnimationWithin(2000); | ||||||
|  | 			return true; | ||||||
|  | 		} | ||||||
|  | 		if (animationIn) await waitForAnimationClass(`animate__${animationIn}`); | ||||||
|  | 		if (animationOut) { | ||||||
|  | 			// Wait just beyond one update cycle (updateInterval=2000ms) before expecting animateOut. | ||||||
|  | 			await new Promise((r) => setTimeout(r, 2100)); | ||||||
|  | 			await waitForAnimationClass(`animate__${animationOut}`); | ||||||
| 		} | 		} | ||||||
| 		return true; | 		return true; | ||||||
| 	}; | 	} | ||||||
|  |  | ||||||
| 	afterEach(async () => { | 	afterEach(async () => { | ||||||
| 		await helpers.stopApplication(); | 		await helpers.stopApplication(); | ||||||
| @@ -45,29 +81,29 @@ describe("AnimateCSS integration Test", () => { | |||||||
|  |  | ||||||
| 	describe("animateIn and animateOut Test", () => { | 	describe("animateIn and animateOut Test", () => { | ||||||
| 		it("with flipInX and flipOutX animation", async () => { | 		it("with flipInX and flipOutX animation", async () => { | ||||||
| 			await helpers.startApplication(testConfigFile); | 			await helpers.startApplication(TEST_CONFIG_ANIM); | ||||||
| 			await expect(doTest("flipInX", "flipOutX")).resolves.toBe(true); | 			await expect(runAnimationTest("flipInX", "flipOutX")).resolves.toBe(true); | ||||||
| 		}); | 		}); | ||||||
| 	}); | 	}); | ||||||
|  |  | ||||||
| 	describe("use animateOut name for animateIn (vice versa) Test", () => { | 	describe("use animateOut name for animateIn (vice versa) Test", () => { | ||||||
| 		it("without animation", async () => { | 		it("without animation (inverted names)", async () => { | ||||||
| 			await helpers.startApplication(testConfigFileInvertedAnimationName); | 			await helpers.startApplication(TEST_CONFIG_INVERTED); | ||||||
| 			await expect(doTest()).resolves.toBe(true); | 			await expect(runAnimationTest()).resolves.toBe(true); | ||||||
| 		}); | 		}); | ||||||
| 	}); | 	}); | ||||||
|  |  | ||||||
| 	describe("false Animation name test", () => { | 	describe("false Animation name test", () => { | ||||||
| 		it("without animation", async () => { | 		it("without animation (invalid names)", async () => { | ||||||
| 			await helpers.startApplication(testConfigFileFallbackToDefault); | 			await helpers.startApplication(TEST_CONFIG_FALLBACK); | ||||||
| 			await expect(doTest()).resolves.toBe(true); | 			await expect(runAnimationTest()).resolves.toBe(true); | ||||||
| 		}); | 		}); | ||||||
| 	}); | 	}); | ||||||
|  |  | ||||||
| 	describe("no Animation defined test", () => { | 	describe("no Animation defined test", () => { | ||||||
| 		it("without animation", async () => { | 		it("without animation (no config)", async () => { | ||||||
| 			await helpers.startApplication(testConfigByDefault); | 			await helpers.startApplication(TEST_CONFIG_NONE); | ||||||
| 			await expect(doTest()).resolves.toBe(true); | 			await expect(runAnimationTest()).resolves.toBe(true); | ||||||
| 		}); | 		}); | ||||||
| 	}); | 	}); | ||||||
| }); | }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user