1- import { type ReactNode } from 'react' ;
1+ import { Fragment , type ReactNode } from 'react' ;
22import { View } from 'react-native' ;
33import semverClean from 'semver/functions/clean' ;
44import semverDiff from 'semver/functions/diff' ;
@@ -23,7 +23,7 @@ export default function DependencyRow({ name, data, packageVersion }: Props) {
2323 isDataString ? data : data . version ,
2424 typeof packageVersion === 'string' ? packageVersion : undefined
2525 ) ;
26- const hasLongVersion = typeof versionLabel === 'string' && versionLabel . length > 18 ;
26+ const hasLongVersion = typeof versionLabel !== 'string' || versionLabel . length > 18 ;
2727
2828 return (
2929 < View
@@ -78,7 +78,7 @@ export default function DependencyRow({ name, data, packageVersion }: Props) {
7878 </ span >
7979 < Label
8080 style = { [
81- tw `font-mono flex-shrink-0 text-right text-xs leading-[14px] text-secondary` ,
81+ tw `font-mono max-w-[93%] flex-shrink-0 text-right text-xs leading-[14px] text-secondary` ,
8282 hasLongVersion && tw `ml-auto flex-shrink` ,
8383 ] } >
8484 { versionLabel }
@@ -100,6 +100,14 @@ function getVersionLabel(version: string, latestVersion?: string): ReactNode {
100100 return `${ patchedVersion } (patched)` ;
101101 }
102102 return 'patched' ;
103+ } else if ( version . includes ( '||' ) ) {
104+ const versionChunks = version . split ( ' || ' ) ;
105+ return versionChunks . map ( ( v , index ) => (
106+ < Fragment key = { `v-${ v } ` } >
107+ { v }
108+ { index !== versionChunks . length - 1 && < span style = { tw `text-tertiary` } > { ` || ` } </ span > }
109+ </ Fragment >
110+ ) ) ;
103111 }
104112
105113 if ( latestVersion ) {
0 commit comments