File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed
Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ const numberFormatter = useNumberFormatter()
9696 <div class =" space-y-8" >
9797 <!-- Empty state when no dependencies at all -->
9898 <p
99- v-if =" sortedDependencies.length === 0 && sortedPeerDependencies.length === 0 && sortedOptionalDependencies.length === 0"
99+ v-if ="
100+ sortedDependencies.length === 0 &&
101+ sortedPeerDependencies.length === 0 &&
102+ sortedOptionalDependencies.length === 0
103+ "
100104 class =" text-sm text-fg-subtle"
101105 >
102106 {{ $t('package.dependencies.none') }}
Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ const licenseChanged = computed(() => {
327327 const latestLicense = pkg .value ?.license
328328 if (! currentLicense || ! latestLicense ) return false
329329 const normalize = (l : unknown ): string =>
330- typeof l === ' string' ? l : (l as { type? : string })?.type ?? ' '
330+ typeof l === ' string' ? l : (( l as { type? : string })?.type ?? ' ' )
331331 return normalize (currentLicense ) !== normalize (latestLicense )
332332})
333333
@@ -597,14 +597,19 @@ const showSkeleton = shallowRef(false)
597597 {{ $t('package.stats.license') }}
598598 </dt >
599599 <dd class =" font-mono text-sm text-fg flex items-center gap-2 flex-wrap" >
600- <LicenseDisplay v-if =" displayVersion?.license ?? pkg.license" :license =" (displayVersion?.license ?? pkg.license) as string" />
600+ <LicenseDisplay
601+ v-if =" displayVersion?.license ?? pkg.license"
602+ :license =" (displayVersion?.license ?? pkg.license) as string"
603+ />
601604 <span v-else >{{ $t('package.license.none') }}</span >
602605 <TooltipApp
603606 v-if =" licenseChanged"
604607 :text =" $t('package.license.changed', { latest: pkg.license })"
605608 position =" bottom"
606609 >
607- <span class =" inline-flex items-center gap-1 px-1.5 py-0.5 text-2xs font-sans rounded bg-amber-500/15 text-amber-700 dark:text-amber-400 border border-amber-500/30 cursor-help" >
610+ <span
611+ class =" inline-flex items-center gap-1 px-1.5 py-0.5 text-2xs font-sans rounded bg-amber-500/15 text-amber-700 dark:text-amber-400 border border-amber-500/30 cursor-help"
612+ >
608613 <span class =" i-lucide:triangle-alert w-3 h-3" aria-hidden =" true" />
609614 {{ $t('package.license.changed_badge') }}
610615 </span >
Original file line number Diff line number Diff line change @@ -12,13 +12,10 @@ type LicenseValue = string | { type?: string } | undefined | null
1212
1313function normalize ( l : LicenseValue ) : string {
1414 if ( ! l ) return ''
15- return typeof l === 'string' ? l : ( l as { type ?: string } ) ?. type ?? ''
15+ return typeof l === 'string' ? l : ( ( l as { type ?: string } ) ?. type ?? '' )
1616}
1717
18- function licenseChanged (
19- currentLicense : LicenseValue ,
20- packageLicense : LicenseValue ,
21- ) : boolean {
18+ function licenseChanged ( currentLicense : LicenseValue , packageLicense : LicenseValue ) : boolean {
2219 if ( ! currentLicense || ! packageLicense ) return false
2320 return normalize ( currentLicense ) !== normalize ( packageLicense )
2421}
You can’t perform that action at this time.
0 commit comments