@@ -3,15 +3,15 @@ import type { CompareResponse, FileChange } from '#shared/types'
33import { getFileIcon } from ' ~/utils/file-icons'
44
55definePageMeta ({
6- name: ' compare ' ,
6+ name: ' diff ' ,
77})
88
9- const route = useRoute (' compare ' )
9+ const route = useRoute (' diff ' )
1010
1111// Parse package name and version range from URL
1212// Patterns:
13- // - /compare /nuxt/v/4.0.0...4.2.0
14- // - /compare /@nuxt/kit/v/1.0.0...2.0.0
13+ // - /diff /nuxt/v/4.0.0...4.2.0
14+ // - /diff /@nuxt/kit/v/1.0.0...2.0.0
1515const parsedRoute = computed (() => {
1616 const segments = route .params .path || []
1717
@@ -148,10 +148,10 @@ function getChangeIcon(type: FileChange['type']): string {
148148}
149149
150150const fromVersionUrlPattern = computed (() => {
151- return ` /compare /${packageName .value }/v/{version}...${toVersion .value } `
151+ return ` /diff /${packageName .value }/v/{version}...${toVersion .value } `
152152})
153153const toVersionUrlPattern = computed (() => {
154- return ` /compare /${packageName .value }/v/${fromVersion .value }...{version} `
154+ return ` /diff /${packageName .value }/v/${fromVersion .value }...{version} `
155155})
156156
157157function packageRoute(ver ? : string | null ) {
@@ -225,7 +225,7 @@ useSeoMeta({
225225 <!-- Error: invalid route -->
226226 <div v-if =" !parsedRoute.range" class =" container py-20 text-center" >
227227 <p class =" text-fg-muted mb-4" >
228- Invalid comparison URL. Use format: /compare /package/v/from...to
228+ Invalid comparison URL. Use format: /diff /package/v/from...to
229229 </p >
230230 <NuxtLink :to =" packageRoute()" class =" btn" >Go to package</NuxtLink >
231231 </div >
0 commit comments