Skip to content

Commit bfd9550

Browse files
[autofix.ci] apply automated fixes
1 parent 3a0543f commit bfd9550

File tree

2 files changed

+294
-438
lines changed

2 files changed

+294
-438
lines changed

app/components/LicenseDisplay.vue

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
11
<script setup lang="ts">
2-
import { parseLicenseExpression } from "#shared/utils/spdx";
2+
import { parseLicenseExpression } from '#shared/utils/spdx'
33
4-
import { useLicenseChanges } from "~/composables/useLicenseChanges";
5-
import { useI18n } from "vue-i18n";
4+
import { useLicenseChanges } from '~/composables/useLicenseChanges'
5+
import { useI18n } from 'vue-i18n'
66
77
const props = defineProps<{
8-
license: string;
9-
packageName?: string;
10-
}>();
8+
license: string
9+
packageName?: string
10+
}>()
1111
12-
const { t } = useI18n();
12+
const { t } = useI18n()
1313
14-
const tokens = computed(() => parseLicenseExpression(props.license));
15-
const licenseChanges = useLicenseChanges(() => props.packageName);
14+
const tokens = computed(() => parseLicenseExpression(props.license))
15+
const licenseChanges = useLicenseChanges(() => props.packageName)
1616
17-
const changes = computed(() => licenseChanges.data.value?.changes ?? []);
17+
const changes = computed(() => licenseChanges.data.value?.changes ?? [])
1818
1919
const licenseChangeText = computed(() =>
2020
changes.value
21-
.map((item) =>
22-
t("package.versions.license_change_item", {
21+
.map(item =>
22+
t('package.versions.license_change_item', {
2323
from: item.from,
2424
to: item.to,
2525
version: item.version,
2626
}),
2727
)
28-
.join("; "),
29-
);
28+
.join('; '),
29+
)
3030
31-
const hasAnyValidLicense = computed(() =>
32-
tokens.value.some((t) => t.type === "license" && t.url),
33-
);
31+
const hasAnyValidLicense = computed(() => tokens.value.some(t => t.type === 'license' && t.url))
3432
</script>
3533

3634
<template>
@@ -47,20 +45,15 @@ const hasAnyValidLicense = computed(() =>
4745
{{ token.value }}!!
4846
</a>
4947
<span v-else-if="token.type === 'license'">{{ token.value }}</span>
50-
<span v-else-if="token.type === 'operator'" class="text-4xs">{{
51-
token.value
52-
}}</span>
48+
<span v-else-if="token.type === 'operator'" class="text-4xs">{{ token.value }}</span>
5349
</template>
5450
<span
5551
v-if="hasAnyValidLicense"
5652
class="i-lucide:scale w-3.5 h-3.5 text-fg-subtle flex-shrink-0 self-center"
5753
aria-hidden="true"
5854
/>
5955
</span>
60-
<div
61-
v-if="changes.length > 0"
62-
class="text-red-500 flex justify-start items-center gap-x-1"
63-
>
56+
<div v-if="changes.length > 0" class="text-red-500 flex justify-start items-center gap-x-1">
6457
<p>change!</p>
6558
<TooltipApp interactive position="top">
6659
<span

0 commit comments

Comments
 (0)