Skip to content

Commit

Permalink
fix: Do not treat pre-releases as stable
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Sep 15, 2020
1 parent fe39ff7 commit 64b8f92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/resolve-external-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ const getVersions = ({ externalContext: { metadata } }) => Object.keys(metadata.

const resolveStableVersions = ({ externalContext: { metadata } }) =>
Object.entries(metadata.versions)
.filter(([, meta]) => !meta.deprecated)
.filter(([version, meta]) => {
if (meta.deprecated) return false;
const versionData = semver.parse(version);
return !versionData.prerelease.length;
})
.map(([version]) => version);

const getGloballyInstalledVersion = async ({ linkedPath }) => {
Expand Down

0 comments on commit 64b8f92

Please sign in to comment.