Skip to content

Commit 722b3bd

Browse files
committed
chore: remove reexport
1 parent 458ba1a commit 722b3bd

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

app/components/DocsVersionSelector.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { onClickOutside } from '@vueuse/core'
3-
import { compareVersions } from '~/utils/versions'
3+
import { compare } from 'semver'
44
55
const props = defineProps<{
66
packageName: string
@@ -24,7 +24,7 @@ const MAX_VERSIONS = 10
2424
/** Safe version comparison that falls back to string comparison on error */
2525
function safeCompareVersions(a: string, b: string): number {
2626
try {
27-
return compareVersions(a, b)
27+
return compare(a, b)
2828
} catch {
2929
return a.localeCompare(b)
3030
}

app/utils/versions.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ import { compare, valid } from 'semver'
44
* Utilities for handling npm package versions and dist-tags
55
*/
66

7-
/**
8-
* Compare two version strings for sorting
9-
* @param a - First version string
10-
* @param b - Second version string
11-
* @returns -1 if a < b, 0 if a == b, 1 if a > b
12-
*/
13-
export const compareVersions = compare
14-
157
/**
168
* Check if a version string is an exact semver version.
179
* Returns true for "1.2.3", "1.0.0-beta.1", etc.

0 commit comments

Comments
 (0)