Skip to content

Commit

Permalink
fix(docs): update version generator to remove graduated alpha versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellier committed Sep 4, 2024
1 parent 21fa967 commit dbd7ad0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/storybook/scripts/generate-version-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const fs = require('fs').promises;
const fetch = require('node-fetch');
const currentVersion = require('../package.json').version;

const EXCLUDED_VERSIONS = ['16.0.0'];

Expand All @@ -17,7 +18,7 @@ async function getVersions() {
.filter((version) => EXCLUDED_VERSIONS.indexOf(version) < 0)
.sort()
.reverse()
.filter((version, idx) => idx === 0 || !/-alpha\.\d+$/gi.test(version));
.filter((version) => version === currentVersion || !/-alpha\.\d+$/gi.test(version));
} catch(error) {
console.error('Something went wrong while fetching release version on npm', error);
}
Expand Down

0 comments on commit dbd7ad0

Please sign in to comment.