Skip to content

v3.0.0

Latest

Choose a tag to compare

@angeldeejay angeldeejay released this 11 May 00:17
df80a49
  • MM Version domain — new sidebar domain for nvm-style MagicMirror core version management. Displays the active core version, a list of locally cached installations, and available GitHub releases. Per-version actions: activate, re-download, and delete. A capability table surfaces runtime flags for the active version (Express version, default modules directory, config loading strategy, hook support, CORS proxy, and more).
  • Topbar version badge — MmVersionBadge component in the topbar shows the active core version at a glance. Displays the builtInVersion number when using sandbox-bundled shims, or the installed version key when an mmvm version is active. Clicking the badge opens the MM Version domain. Updates in real time on module-sandbox:mm-version-changed events.
  • server/mm-version-manager.ts — server-side nvm-style version store under ~/.mmvm/. Implements install, activate, delete, re-download, and capability-introspection operations. Exposes /api/mm-versions, POST /api/mm-versions/activate, POST /api/mm-versions/reset, POST /api/mm-versions/download, POST /api/mm-versions/redownload/:key, and DELETE /api/mm-versions/:key routes consumed by the MM Version domain.
  • scripts/sync-mmcore-source.ts — new build step that downloads a pinned MagicMirror release from npm into mmcore-source/ using a version manifest. Skips the GitHub API call entirely when the manifest already records the current version, avoiding rate-limit failures in CI and offline environments. Falls back gracefully to the existing manifest when the API is unreachable.
  • bin/sync-magicmirror-assets.ts mmcore-source fallback — copyReferencedAsset now tries mmcore-source/node_modules/ as a second fallback when a CSS ../node_modules/ reference is not found in packageRoot/node_modules/. Fixes font-sync failures when MagicMirror is sourced from mmcore-source/ rather than the devDependency.
  • jsonc-parser integration — client/vendor/jsonc-parser-bundle.ts bundles jsonc-parser as window.jsoncParser (same esbuild pattern as js-beautify). Replaces ~205 lines of hand-rolled comment-aware JSON parsing in module-config-editor.ts with a well-tested library implementation.
  • CJS dist fix for mm-version-manager — replaced the bare fileURLToPath(import.meta.url) call with typeof __filename === "string" ? __filename : fileURLToPath(import.meta.url) so the module loads correctly from the CommonJS dist package. Previously the module crashed on startup in consumer installs with ERR_INVALID_ARG_TYPE: The "path" argument must be of type string. Received undefined.
  • Domain order extended to seven — mmversion is inserted between quality and about in the canonical domain sequence across Sidebar.tsx, the topbar DomainNav dropdown, the Eta sidebar template, and the CANONICAL_DOMAIN_ORDER constant in the UI test suite.
  • semver added as a runtime dependency — used in MmVersionDomain for release sorting and pre-release filtering.
  • Build pipeline extended — build:00-sync-mmcore-source and build:02-sync-analyzer steps added to run-s build:*; client:shell and client:runtime now also bundle jsonc-parser-bundle.ts.
  • Documentation — added docs/mmversion.md operator manual; updated docs/README.md to list seven sidebar domains and note the topbar version badge; updated ARCHITECTURE.md to document mm-version-manager.ts, MmVersionDomain, MmVersionBadge, jsonc-parser-bundle.ts, and sidebar-mmversion.eta; fixed script drift in AGENTS.md (build:00-sync-mm-assets → correct three-step sequence).
  • Screenshots — scripts/take-screenshots.ts now captures docs/screenshots/mmversion.png; docs/mmversion.md references the screenshot from the coverage branch.
  • Test coverage — 92%+ branch coverage maintained across the full unit suite (451 tests, 28 files). New test files: mm-version-domain.test.tsx (32 tests), mm-version-domain-branches-a.test.tsx (11 tests), mm-version-domain-branches-b1.test.tsx (6 tests), mm-version-domain-branches-b2.test.tsx (4 tests), topbar-mm-badge.test.tsx (15 tests), sidebar-domain-nav.test.tsx (10 tests). UI journey coverage: 15 new journey IDs for the mmversion domain; 100% journeys/transitions/outcomes across the full UI suite (37 tests).
  • tests/unit/server/routes.test.ts — extended with coverage for all six mm-versions API endpoints.
  • tests/unit/bin/sync-magicmirror-assets.test.ts — updated to cover the mmcore-source/node_modules/ sibling fallback path.

What's Changed

  • feat: MM Version domain, nvm-style version manager, and build hardeniong (v3.0.0) by @angeldeejay in #2

Full Changelog: v2.0.0...v3.0.0