Skip to content

Commit

Permalink
fix: Build
Browse files Browse the repository at this point in the history
  • Loading branch information
oodamien committed Jun 17, 2024
1 parent 114327f commit b2a1b0e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/helpers/versionTree.js
Original file line number Diff line number Diff line change
@@ -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) => {
Expand All @@ -25,3 +14,12 @@ function splitVersions (versions) {
preview: preview.length > 0 ? preview : null,
}
}

module.exports = (components) => {
return components?.map((comp) => {
return {
...comp,
versions: splitVersions(comp.versions),
}
})
}

0 comments on commit b2a1b0e

Please sign in to comment.