Skip to content

Commit d631720

Browse files
committed
Merge branch 'main' of https://github.com/alex-key/npmx.dev into feat/improve-lunaria-status-page
2 parents e4549b9 + 5db5dc6 commit d631720

72 files changed

Lines changed: 75 additions & 369 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/components/BuildEnvironment.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup lang="ts">
2-
import type { BuildInfo } from '#shared/types'
3-
42
const { footer = false, buildInfo: buildInfoProp } = defineProps<{
53
footer?: boolean
64
buildInfo?: BuildInfo

app/components/Code/DirectoryListing.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import type { PackageFileTree } from '#shared/types'
32
import type { RouteLocationRaw } from 'vue-router'
43
import type { RouteNamedMap } from 'vue-router/auto-routes'
54
import { ADDITIONAL_ICONS, getFileIcon } from '~/utils/file-icons'

app/components/Code/FileTree.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import type { PackageFileTree } from '#shared/types'
32
import type { RouteLocationRaw } from 'vue-router'
43
import type { RouteNamedMap } from 'vue-router/auto-routes'
54
import { ADDITIONAL_ICONS, getFileIcon } from '~/utils/file-icons'

app/components/Code/MobileTreeDrawer.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import type { PackageFileTree } from '#shared/types'
32
import type { RouteNamedMap } from 'vue-router/auto-routes'
43
54
defineProps<{

app/components/Compare/FacetCard.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup lang="ts">
2-
import type { FacetValue } from '#shared/types'
3-
42
const props = defineProps<{
53
/** Facet label */
64
label: string

app/components/Compare/FacetRow.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup lang="ts">
2-
import type { FacetValue } from '#shared/types'
3-
42
const props = defineProps<{
53
/** Facet label */
64
label: string

app/components/OgImage/Package.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup lang="ts">
2-
import { joinURL } from 'ufo'
3-
42
const props = withDefaults(
53
defineProps<{
64
name: string
@@ -38,16 +36,7 @@ const { data: pkg, refresh: refreshPkg } = usePackage(
3836
)
3937
const displayVersion = computed(() => pkg.value?.requestedVersion ?? null)
4038
41-
const repositoryUrl = computed(() => {
42-
const repo = displayVersion.value?.repository
43-
if (!repo?.url) return null
44-
let url = normalizeGitUrl(repo.url)
45-
// append `repository.directory` for monorepo packages
46-
if (repo.directory) {
47-
url = joinURL(`${url}/tree/HEAD`, repo.directory)
48-
}
49-
return url
50-
})
39+
const { repositoryUrl } = useRepositoryUrl(displayVersion)
5140
5241
const { data: likes, refresh: refreshLikes } = useFetch(() => `/api/social/likes/${name.value}`, {
5342
default: () => ({ totalLikes: 0, userHasLiked: false }),

app/components/Package/DeprecatedTree.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup lang="ts">
2-
import type { DependencyDepth } from '#shared/types'
3-
42
const props = defineProps<{
53
packageName: string
64
version: string

app/components/Package/Header.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import type { PackumentVersion, ProvenanceDetails, SlimVersion, SlimPackument } from '#shared/types'
32
import type { RouteLocationRaw } from 'vue-router'
43
import { SCROLL_TO_TOP_THRESHOLD } from '~/composables/useScrollToTop'
54
import { useModal } from '~/composables/useModal'

app/components/Package/List.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
<script setup lang="ts">
2-
import type { NpmSearchResult } from '#shared/types'
3-
import type { WindowVirtualizerHandle } from '~/composables/useVirtualInfiniteScroll'
4-
import type {
5-
ColumnConfig,
6-
PageSize,
7-
PaginationMode,
8-
SortOption,
9-
ViewMode,
10-
} from '#shared/types/preferences'
11-
import { DEFAULT_COLUMNS } from '#shared/types/preferences'
122
import { WindowVirtualizer } from 'virtua/vue'
133
144
/** Number of items to render statically during SSR */

0 commit comments

Comments
 (0)