Skip to content

Commit 5c167df

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/readme-hash-links
2 parents 43a7035 + 18bcb8a commit 5c167df

File tree

30 files changed

+838
-155
lines changed

30 files changed

+838
-155
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ jobs:
3333

3434
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
3535
name: 🟧 Install pnpm
36-
# pnpm cache skipped deliberately as the project is not actually installed here
36+
with:
37+
cache: true
38+
39+
- name: 📦 Install dependencies (root only, no scripts)
40+
run: pnpm install --filter . --ignore-scripts
3741

3842
- name: 🔠 Lint project
39-
run: node scripts/lint.ts
43+
run: pnpm lint
4044

4145
types:
4246
name: 💪 Type check

.oxlintrc.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://unpkg.com/oxlint/configuration_schema.json",
33
"plugins": ["unicorn", "typescript", "oxc", "vue", "vitest"],
4+
"jsPlugins": ["@e18e/eslint-plugin"],
45
"categories": {
56
"correctness": "error",
67
"suspicious": "warn",
@@ -11,8 +12,27 @@
1112
"no-await-in-loop": "off",
1213
"unicorn/no-array-sort": "off",
1314
"no-restricted-globals": "error",
14-
"typescript/consistent-type-imports": "error"
15+
"typescript/consistent-type-imports": "error",
16+
"e18e/prefer-array-from-map": "error",
17+
"e18e/prefer-timer-args": "error",
18+
"e18e/prefer-date-now": "error",
19+
"e18e/prefer-regex-test": "error",
20+
"e18e/prefer-array-some": "error"
1521
},
22+
"overrides": [
23+
{
24+
"files": [
25+
"server/**/*",
26+
"cli/**/*",
27+
"scripts/**/*",
28+
"modules/**/*",
29+
"app/components/OgImage/*"
30+
],
31+
"rules": {
32+
"no-console": "off"
33+
}
34+
}
35+
],
1636
"ignorePatterns": [
1737
".output/**",
1838
".data/**",

app/components/AppFooter.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ const isHome = computed(() => route.name === 'index')
1818
<NuxtLink to="/about" class="link-subtle font-mono text-xs flex items-center">
1919
{{ $t('footer.about') }}
2020
</NuxtLink>
21+
<NuxtLink
22+
to="/privacy"
23+
class="link-subtle font-mono text-xs min-h-11 flex items-center gap-1 lowercase"
24+
>
25+
{{ $t('privacy_policy.title') }}
26+
</NuxtLink>
2127
<a
2228
href="https://docs.npmx.dev"
2329
target="_blank"

app/components/Header/AccountMenu.client.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function openAuthModal() {
7777
:alt="npmUser || $t('account_menu.npm_cli')"
7878
width="24"
7979
height="24"
80-
class="w-6 h-6 rounded-full ring-2 ring-bg"
80+
class="w-6 h-6 rounded-full ring-2 ring-bg object-cover"
8181
/>
8282
<span
8383
v-else-if="isNpmConnected"
@@ -93,7 +93,7 @@ function openAuthModal() {
9393
:alt="atprotoUser.handle"
9494
width="24"
9595
height="24"
96-
class="w-6 h-6 rounded-full ring-2 ring-bg"
96+
class="w-6 h-6 rounded-full ring-2 ring-bg object-cover"
9797
:class="hasBothConnections ? 'relative z-10' : ''"
9898
/>
9999
<span
@@ -153,7 +153,7 @@ function openAuthModal() {
153153
:alt="npmUser"
154154
width="32"
155155
height="32"
156-
class="w-8 h-8 rounded-full"
156+
class="w-8 h-8 rounded-full object-cover"
157157
/>
158158
<span
159159
v-else
@@ -196,7 +196,7 @@ function openAuthModal() {
196196
:alt="atprotoUser.handle"
197197
width="32"
198198
height="32"
199-
class="w-8 h-8 rounded-full"
199+
class="w-8 h-8 rounded-full object-cover"
200200
/>
201201
<span
202202
v-else

app/components/Header/AuthModal.client.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { useAtproto } from '~/composables/atproto/useAtproto'
33
import { authRedirect } from '~/utils/atproto/helpers'
44
55
const handleInput = shallowRef('')
6-
6+
const route = useRoute()
77
const { user, logout } = useAtproto()
88
99
async function handleBlueskySignIn() {
10-
await authRedirect('https://bsky.social')
10+
await authRedirect('https://bsky.social', { redirectTo: route.fullPath })
1111
}
1212
1313
async function handleCreateAccount() {
14-
await authRedirect('https://npmx.social', true)
14+
await authRedirect('https://npmx.social', { create: true, redirectTo: route.fullPath })
1515
}
1616
1717
async function handleLogin() {

app/components/Header/MobileMenu.client.vue

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ onUnmounted(deactivate)
112112
{{ $t('footer.about') }}
113113
</NuxtLink>
114114

115+
<NuxtLink
116+
to="/privacy"
117+
class="flex items-center gap-3 px-3 py-3 rounded-md font-mono text-sm text-fg hover:bg-bg-subtle transition-colors duration-200"
118+
@click="closeMenu"
119+
>
120+
<span class="i-carbon:security w-5 h-5 text-fg-muted" aria-hidden="true" />
121+
{{ $t('privacy_policy.title') }}
122+
</NuxtLink>
123+
115124
<NuxtLink
116125
to="/compare"
117126
class="flex items-center gap-3 px-3 py-3 rounded-md font-mono text-sm text-fg hover:bg-bg-subtle transition-colors duration-200"
@@ -243,7 +252,7 @@ onUnmounted(deactivate)
243252
:alt="npmUser"
244253
width="20"
245254
height="20"
246-
class="w-5 h-5 rounded-full"
255+
class="w-5 h-5 rounded-full object-cover"
247256
/>
248257
<span
249258
v-else
@@ -262,7 +271,18 @@ onUnmounted(deactivate)
262271
class="w-full flex items-center gap-3 px-3 py-3 rounded-md font-mono text-sm text-fg hover:bg-bg-subtle transition-colors duration-200 text-start"
263272
@click="handleShowAuth"
264273
>
265-
<span class="w-5 h-5 rounded-full bg-bg-muted flex items-center justify-center">
274+
<img
275+
v-if="atprotoUser.avatar"
276+
:src="atprotoUser.avatar"
277+
:alt="atprotoUser.handle"
278+
width="20"
279+
height="20"
280+
class="w-5 h-5 rounded-full object-cover"
281+
/>
282+
<span
283+
v-else
284+
class="w-5 h-5 rounded-full bg-bg-muted flex items-center justify-center"
285+
>
266286
<span class="i-carbon-cloud w-3 h-3 text-fg-muted" aria-hidden="true" />
267287
</span>
268288
<span class="flex-1 truncate">@{{ atprotoUser.handle }}</span>
@@ -281,13 +301,6 @@ onUnmounted(deactivate)
281301
<span class="flex-1">{{ $t('account_menu.connect_atmosphere') }}</span>
282302
</button>
283303
</div>
284-
285-
<!-- Footer -->
286-
<div class="p-4 border-t border-border mt-auto">
287-
<p class="font-mono text-xs text-fg-subtle text-center">
288-
{{ $t('non_affiliation_disclaimer') }}
289-
</p>
290-
</div>
291304
</nav>
292305
</Transition>
293306
</div>

app/components/Settings/Toggle.client.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ const checked = defineModel<boolean>({
2121
{{ label }}
2222
</span>
2323
<span
24-
class="relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border-2 transition-colors duration-200 ease-in-out motion-reduce:transition-none cursor-pointer"
25-
:class="checked ? 'bg-accent border-transparent shadow-sm' : 'bg-bg border border-border/50'"
24+
class="inline-flex items-center h-6 w-11 shrink-0 rounded-full border p-0.25 transition-colors duration-200 shadow-sm ease-in-out motion-reduce:transition-none cursor-pointer"
25+
:class="checked ? 'bg-accent border-accent' : 'bg-fg/50 border-fg/50'"
2626
aria-hidden="true"
2727
>
2828
<span
29-
class="pointer-events-none inline-block h-5 w-5 rounded-full shadow-sm ring-0 transition-transform duration-200 ease-in-out motion-reduce:transition-none"
30-
:class="checked ? 'bg-bg' : 'bg-fg-muted'"
29+
class="block h-5 w-5 rounded-full bg-bg shadow-sm transition-transform duration-200 ease-in-out motion-reduce:transition-none"
3130
/>
3231
</span>
3332
</button>

app/pages/package/[...package].vue

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -882,26 +882,28 @@ onKeyStroke(
882882
<span class="text-fg-muted">{{ getDependencyCount(displayVersion) }}</span>
883883

884884
<!-- Separator and total transitive deps -->
885-
<span class="text-fg-subtle mx-1">/</span>
885+
<template v-if="getDependencyCount(displayVersion) !== totalDepsCount">
886+
<span class="text-fg-subtle mx-1">/</span>
886887

887-
<ClientOnly>
888-
<span
889-
v-if="
890-
vulnTreeStatus === 'pending' || (installSizeStatus === 'pending' && !vulnTree)
891-
"
892-
class="inline-flex items-center gap-1 text-fg-subtle"
893-
>
888+
<ClientOnly>
894889
<span
895-
class="i-carbon:circle-dash w-3 h-3 motion-safe:animate-spin"
896-
aria-hidden="true"
897-
/>
898-
</span>
899-
<span v-else-if="totalDepsCount !== null">{{ totalDepsCount }}</span>
900-
<span v-else class="text-fg-subtle">-</span>
901-
<template #fallback>
902-
<span class="text-fg-subtle">-</span>
903-
</template>
904-
</ClientOnly>
890+
v-if="
891+
vulnTreeStatus === 'pending' || (installSizeStatus === 'pending' && !vulnTree)
892+
"
893+
class="inline-flex items-center gap-1 text-fg-subtle"
894+
>
895+
<span
896+
class="i-carbon:circle-dash w-3 h-3 motion-safe:animate-spin"
897+
aria-hidden="true"
898+
/>
899+
</span>
900+
<span v-else-if="totalDepsCount !== null">{{ totalDepsCount }}</span>
901+
<span v-else class="text-fg-subtle">-</span>
902+
<template #fallback>
903+
<span class="text-fg-subtle">-</span>
904+
</template>
905+
</ClientOnly>
906+
</template>
905907

906908
<a
907909
v-if="getDependencyCount(displayVersion) > 0"
@@ -951,21 +953,23 @@ onKeyStroke(
951953
</span>
952954

953955
<!-- Separator and install size -->
954-
<span class="text-fg-subtle mx-1">/</span>
956+
<template v-if="getDependencyCount(displayVersion) > 0">
957+
<span class="text-fg-subtle mx-1">/</span>
955958

956-
<span
957-
v-if="installSizeStatus === 'pending'"
958-
class="inline-flex items-center gap-1 text-fg-subtle"
959-
>
960959
<span
961-
class="i-carbon:circle-dash w-3 h-3 motion-safe:animate-spin"
962-
aria-hidden="true"
963-
/>
964-
</span>
965-
<span v-else-if="installSize?.totalSize">
966-
{{ formatBytes(installSize.totalSize) }}
967-
</span>
968-
<span v-else class="text-fg-subtle">-</span>
960+
v-if="installSizeStatus === 'pending'"
961+
class="inline-flex items-center gap-1 text-fg-subtle"
962+
>
963+
<span
964+
class="i-carbon:circle-dash w-3 h-3 motion-safe:animate-spin"
965+
aria-hidden="true"
966+
/>
967+
</span>
968+
<span v-else-if="installSize?.totalSize">
969+
{{ formatBytes(installSize.totalSize) }}
970+
</span>
971+
<span v-else class="text-fg-subtle">-</span>
972+
</template>
969973
</dd>
970974
</div>
971975

@@ -1188,17 +1192,11 @@ onKeyStroke(
11881192
<div
11891193
class="sidebar-scroll sticky top-34 space-y-6 sm:space-y-8 min-w-0 overflow-y-auto pe-2.5 lg:(max-h-[calc(100dvh-8.5rem)] overscroll-contain) xl:(top-22 pt-2 max-h-[calc(100dvh-6rem)])"
11901194
>
1191-
<!-- Maintainers (with admin actions when connected) -->
1192-
<PackageMaintainers :package-name="pkg.name" :maintainers="pkg.maintainers" />
1193-
11941195
<!-- Team access controls (for scoped packages when connected) -->
11951196
<ClientOnly>
11961197
<PackageAccessControls :package-name="pkg.name" />
11971198
</ClientOnly>
11981199

1199-
<!-- Keywords -->
1200-
<PackageKeywords :keywords="displayVersion?.keywords" />
1201-
12021200
<!-- Agent Skills -->
12031201
<ClientOnly>
12041202
<PackageSkillsCard
@@ -1246,6 +1244,12 @@ onKeyStroke(
12461244
:peer-dependencies-meta="displayVersion.peerDependenciesMeta"
12471245
:optional-dependencies="displayVersion.optionalDependencies"
12481246
/>
1247+
1248+
<!-- Keywords -->
1249+
<PackageKeywords :keywords="displayVersion?.keywords" />
1250+
1251+
<!-- Maintainers (with admin actions when connected) -->
1252+
<PackageMaintainers :package-name="pkg.name" :maintainers="pkg.maintainers" />
12491253
</div>
12501254
</div>
12511255
</article>

0 commit comments

Comments
 (0)