Skip to content

Commit

Permalink
Merge pull request #102 from woocommerce/tweak/prevent-unstable-releases
Browse files Browse the repository at this point in the history
Get Plugin Releases - Prevent unstable releases
  • Loading branch information
puntope authored Apr 23, 2024
2 parents e89cb26 + 8db7d34 commit a96bf28
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ function parsePluginVersions( releases = {} ) {
const output = [];

if ( slug !== 'wordpress' ) {
const latest = releases.version;
const versions = Object.keys( releases.versions )
.filter(
( version ) =>
version !== 'trunk' &&
version !== 'other' &&
! version.includes( 'beta' )
! version.includes( 'beta' ) &&
( isRC( version ) || semverCompare( latest, version ) <= 0 )
)
.sort( semverCompare );

Expand Down

0 comments on commit a96bf28

Please sign in to comment.