From 196c2939103da2d42432a747bccb08f4b9ac174f Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Mon, 17 Jun 2024 13:26:57 +0200 Subject: [PATCH] fix: Build --- src/helpers/versionTree.js | 20 ++++++------- src/partials/version.hbs | 61 ++++++++++---------------------------- 2 files changed, 25 insertions(+), 56 deletions(-) diff --git a/src/helpers/versionTree.js b/src/helpers/versionTree.js index 3384a7d..d5810b1 100644 --- a/src/helpers/versionTree.js +++ b/src/helpers/versionTree.js @@ -1,16 +1,5 @@ 'use strict' -module.exports = (components) => versionTree(components) - -function versionTree (components) { - return components.map((comp) => { - return { - ...comp, - versions: splitVersions(comp.versions), - } - }) -} - function splitVersions (versions) { const snapshot = versions.filter((v) => v.version.includes('SNAPSHOT')) const stable = versions.filter((v) => { @@ -25,3 +14,12 @@ function splitVersions (versions) { preview: preview.length > 0 ? preview : null, } } + +module.exports = (components) => { + return Object.values(components)?.map((comp) => { + return { + ...comp, + versions: splitVersions(comp.versions), + } + }) +} diff --git a/src/partials/version.hbs b/src/partials/version.hbs index 3a54416..0da5636 100644 --- a/src/partials/version.hbs +++ b/src/partials/version.hbs @@ -7,52 +7,23 @@
-