The dependency checker also includes false positives from comment lines:
https://github.com/MagicMirrorOrg/MagicMirror-3rd-Party-Modules/blob/4ee0d8b12a1c1dd04b7ed1e78635857872e05486/scripts/check-modules/dependency-usage.js#L37C1-L42C4
this should be better (proposal by github copilot - needs to be testet)
const DEPENDENCY_CAPTURE_PATTERNS = Object.freeze([
// CommonJS require - with const/let/var declaration
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*(?:const|let|var)\s+.=\srequire\s*(\s*"'["']\s*)/gmu,
// ES6 from import - ONLY with import/export keyword
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*(?:import|export)\s+.*\bfrom\s+"'["']/gmu,
// ES6 side-effect import
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*import\s+"'["']/gmu,
// Dynamic import
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*.import\s(\s*"'["']\s*)/gmu
]);
The dependency checker also includes false positives from comment lines:
https://github.com/MagicMirrorOrg/MagicMirror-3rd-Party-Modules/blob/4ee0d8b12a1c1dd04b7ed1e78635857872e05486/scripts/check-modules/dependency-usage.js#L37C1-L42C4
this should be better (proposal by github copilot - needs to be testet)
const DEPENDENCY_CAPTURE_PATTERNS = Object.freeze([
// CommonJS require - with const/let/var declaration
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*(?:const|let|var)\s+.=\srequire\s*(\s*"'["']\s*)/gmu,
// ES6 from import - ONLY with import/export keyword
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*(?:import|export)\s+.*\bfrom\s+"'["']/gmu,
// ES6 side-effect import
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*import\s+"'["']/gmu,
// Dynamic import
/^(?!\s*//)(?!\s*/*)(?!\s**)\s*.import\s(\s*"'["']\s*)/gmu
]);