Skip to content

Commit 9c6398a

Browse files
authored
Merge branch 'main' into feat/npmx-connector-add-debug-and-new-otp-case
2 parents a5dd3b2 + 704987b commit 9c6398a

File tree

95 files changed

+1973
-745
lines changed

Some content is hidden

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

95 files changed

+1973
-745
lines changed

.github/workflows/autofix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
node-version: lts/*
2626

27-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
27+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
2828
name: 🟧 Install pnpm
2929
with:
3030
cache: true
@@ -41,4 +41,4 @@ jobs:
4141
- name: 🔠 Fix lint errors
4242
run: pnpm lint:fix
4343

44-
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
44+
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # 635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/ci.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
node-version: lts/*
3333

34-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
34+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
3535
name: 🟧 Install pnpm
3636
# pnpm cache skipped deliberately as the project is not actually installed here
3737

@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
node-version: lts/*
5151

52-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
52+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
5353
name: 🟧 Install pnpm
5454
with:
5555
cache: true
@@ -71,7 +71,7 @@ jobs:
7171
with:
7272
node-version: lts/*
7373

74-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
74+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
7575
name: 🟧 Install pnpm
7676
with:
7777
cache: true
@@ -80,7 +80,13 @@ jobs:
8080
run: pnpm install
8181

8282
- name: 🧪 Unit tests
83-
run: pnpm test:unit --project unit run --coverage
83+
run: pnpm test:unit run --coverage --reporter=junit --outputFile=test-report.junit.xml
84+
85+
- name: ⬆︎ Upload test results to Codecov
86+
if: ${{ !cancelled() }}
87+
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
88+
with:
89+
token: ${{ secrets.CODECOV_TOKEN }}
8490

8591
test:
8692
name: 🧪 Component tests
@@ -93,7 +99,7 @@ jobs:
9399
with:
94100
node-version: lts/*
95101

96-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
102+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
97103
name: 🟧 Install pnpm
98104
with:
99105
cache: true
@@ -105,12 +111,18 @@ jobs:
105111
run: pnpm playwright install chromium-headless-shell
106112

107113
- name: 🧪 Component tests
108-
run: pnpm vite test --project nuxt run --coverage
114+
run: pnpm test:nuxt run --coverage --reporter=junit --outputFile=test-report.junit.xml
109115

110-
- name: Upload coverage reports to Codecov
116+
- name: ⬆︎ Upload test results to Codecov
117+
if: ${{ !cancelled() }}
118+
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
119+
with:
120+
token: ${{ secrets.CODECOV_TOKEN }}
121+
122+
- name: ⬆︎ Upload coverage reports to Codecov
111123
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
112124
env:
113-
CODECOV_TOKEN: 17b4bed9-d407-4ce2-9c10-2ccd4328a1d9
125+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
114126

115127
browser:
116128
name: 🖥️ Browser tests
@@ -125,7 +137,7 @@ jobs:
125137
with:
126138
node-version: lts/*
127139

128-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
140+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
129141
name: 🟧 Install pnpm
130142
with:
131143
cache: true
@@ -153,7 +165,7 @@ jobs:
153165
with:
154166
node-version: lts/*
155167

156-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
168+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
157169
name: 🟧 Install pnpm
158170
with:
159171
cache: true
@@ -181,7 +193,7 @@ jobs:
181193
with:
182194
node-version: lts/*
183195

184-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
196+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
185197
name: 🟧 Install pnpm
186198
with:
187199
cache: true
@@ -191,3 +203,6 @@ jobs:
191203

192204
- name: 🧹 Check for unused code
193205
run: pnpm knip
206+
207+
- name: 🧹 Check for unused production code
208+
run: pnpm knip --production

.github/workflows/lunaria.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
node-version: lts/*
3434

35-
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
35+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
3636
name: 🟧 Install pnpm
3737
with:
3838
cache: true
@@ -41,4 +41,4 @@ jobs:
4141
run: pnpm install
4242

4343
- name: Generate Lunaria Overview
44-
uses: lunariajs/action@v1-prerelease
44+
uses: lunariajs/action@4911ad0736d1e3b20af4cb70f5079aea2327ed8e # v1-prerelease

.github/workflows/semantic-pull-requests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
a11y
2727
deps
2828
docs
29+
cli
2930
i18n
3031
ui
3132
subjectPattern: ^(?![A-Z]).+$

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ What npmx offers:
4444
- **Fast search** – quick package search with instant results
4545
- **Package details** – READMEs, versions, dependencies, and metadata
4646
- **Code viewer** – browse package source code with syntax highlighting and permalink to specific lines
47-
- **Provenance indicators** – verified build badges for packages with npm provenance
47+
- **Provenance indicators** – verified build badges and provenance section below the README
4848
- **Multi-provider repository support** – stars/forks from GitHub, GitLab, Bitbucket, Codeberg, Gitee, Sourcehut, Forgejo, Gitea, Radicle, and Tangled
4949
- **JSR availability** – see if scoped packages are also available on JSR
5050
- **Package badges** – module format (ESM/CJS/dual), TypeScript types (with `@types/*` links), and engine constraints

app/assets/main.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ a:hover {
196196
}
197197

198198
a:focus-visible {
199-
outline: 2px solid var(--border);
199+
outline: 2px solid var(--accent);
200200
outline-offset: 2px;
201-
border-radius: 2px;
201+
border-radius: 4px;
202202
}
203203

204204
/* Reset dd margin (browser default is margin-left: 40px) */
@@ -215,6 +215,13 @@ button {
215215
padding: 0;
216216
}
217217

218+
button:focus-visible,
219+
select:focus-visible {
220+
outline: 2px solid var(--accent);
221+
outline-offset: 2px;
222+
border-radius: 4px;
223+
}
224+
218225
/* Selection */
219226
::selection {
220227
background-color: var(--fg-muted);

app/components/AppFooter.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ const isHome = computed(() => route.name === 'index')
1515
</div>
1616
<!-- Desktop: Show all links. Mobile: Links are in MobileMenu -->
1717
<div class="hidden sm:flex items-center gap-6">
18-
<NuxtLink to="/about" class="link-subtle font-mono text-xs min-h-11 flex items-center">
18+
<NuxtLink to="/about" class="link-subtle font-mono text-xs flex items-center">
1919
{{ $t('footer.about') }}
2020
</NuxtLink>
2121
<a
2222
href="https://docs.npmx.dev"
2323
target="_blank"
2424
rel="noopener noreferrer"
25-
class="link-subtle font-mono text-xs min-h-11 flex items-center gap-1"
25+
class="link-subtle font-mono text-xs flex items-center gap-1"
2626
>
2727
{{ $t('footer.docs') }}
2828
<span class="i-carbon:launch rtl-flip w-3 h-3" aria-hidden="true" />
@@ -31,7 +31,7 @@ const isHome = computed(() => route.name === 'index')
3131
href="https://repo.npmx.dev"
3232
target="_blank"
3333
rel="noopener noreferrer"
34-
class="link-subtle font-mono text-xs min-h-11 flex items-center gap-1"
34+
class="link-subtle font-mono text-xs flex items-center gap-1"
3535
>
3636
{{ $t('footer.source') }}
3737
<span class="i-carbon:launch rtl-flip w-3 h-3" aria-hidden="true" />
@@ -40,7 +40,7 @@ const isHome = computed(() => route.name === 'index')
4040
href="https://social.npmx.dev"
4141
target="_blank"
4242
rel="noopener noreferrer"
43-
class="link-subtle font-mono text-xs min-h-11 flex items-center gap-1"
43+
class="link-subtle font-mono text-xs flex items-center gap-1"
4444
>
4545
{{ $t('footer.social') }}
4646
<span class="i-carbon:launch rtl-flip w-3 h-3" aria-hidden="true" />
@@ -49,7 +49,7 @@ const isHome = computed(() => route.name === 'index')
4949
href="https://chat.npmx.dev"
5050
target="_blank"
5151
rel="noopener noreferrer"
52-
class="link-subtle font-mono text-xs min-h-11 flex items-center gap-1"
52+
class="link-subtle font-mono text-xs flex items-center gap-1"
5353
>
5454
{{ $t('footer.chat') }}
5555
<span class="i-carbon:launch rtl-flip w-3 h-3" aria-hidden="true" />

app/components/AppHeader.vue

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,11 @@ onKeyStroke(
9595
<button
9696
v-if="!isSearchExpanded && !isOnHomePage"
9797
type="button"
98-
class="sm:hidden flex-shrink-0 inline-flex items-center gap-2 font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 focus-ring rounded"
98+
class="sm:hidden flex-shrink-0 inline-flex items-center gap-2 font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 rounded"
9999
:aria-label="$t('nav.tap_to_search')"
100100
@click="expandMobileSearch"
101101
>
102-
<img
103-
aria-hidden="true"
104-
:alt="$t('alt_logo')"
105-
src="/logo.svg"
106-
width="96"
107-
height="96"
108-
class="w-8 h-8 rounded-lg"
109-
/>
102+
<AppLogo class="w-8 h-8 rounded-lg" />
110103
<span class="i-carbon:search w-4 h-4 text-fg-subtle" aria-hidden="true" />
111104
</button>
112105

@@ -116,16 +109,9 @@ onKeyStroke(
116109
to="/"
117110
:aria-label="$t('header.home')"
118111
dir="ltr"
119-
class="inline-flex items-center gap-2 header-logo font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 focus-ring rounded"
112+
class="inline-flex items-center gap-2 header-logo font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 rounded"
120113
>
121-
<img
122-
aria-hidden="true"
123-
:alt="$t('alt_logo')"
124-
src="/logo.svg"
125-
width="96"
126-
height="96"
127-
class="w-8 h-8 rounded-lg"
128-
/>
114+
<AppLogo class="w-8 h-8 rounded-lg" />
129115
<span>npmx</span>
130116
</NuxtLink>
131117
</div>
@@ -163,11 +149,11 @@ onKeyStroke(
163149
</div>
164150

165151
<!-- End: Desktop nav items + Mobile menu button -->
166-
<div class="flex-shrink-0 flex items-center gap-4 sm:gap-6">
152+
<div class="flex-shrink-0 flex items-center gap-0.5 sm:gap-2">
167153
<!-- Desktop: Compare link -->
168154
<NuxtLink
169155
to="/compare"
170-
class="hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 rounded"
156+
class="hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-2 px-2 py-1.5 hover:bg-bg-subtle focus-visible:outline-accent/70 rounded"
171157
aria-keyshortcuts="c"
172158
>
173159
{{ $t('nav.compare') }}
@@ -182,7 +168,7 @@ onKeyStroke(
182168
<!-- Desktop: Settings link -->
183169
<NuxtLink
184170
to="/settings"
185-
class="hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 rounded"
171+
class="hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-2 px-2 py-1.5 hover:bg-bg-subtle focus-visible:outline-accent/70 rounded"
186172
aria-keyshortcuts=","
187173
>
188174
{{ $t('nav.settings') }}
@@ -202,7 +188,7 @@ onKeyStroke(
202188
<!-- Mobile: Menu button (always visible, toggles menu) -->
203189
<button
204190
type="button"
205-
class="sm:hidden flex items-center p-2 -m-2 text-fg-subtle hover:text-fg transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 rounded"
191+
class="sm:hidden flex items-center p-2 -m-2 text-fg-subtle hover:text-fg transition-colors duration-200 focus-visible:outline-accent/70 rounded"
206192
:aria-label="showMobileMenu ? $t('common.close') : $t('nav.open_menu')"
207193
:aria-expanded="showMobileMenu"
208194
@click="showMobileMenu = !showMobileMenu"

app/components/AppLogo.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
class?: string
4+
}>()
5+
</script>
6+
7+
<template>
8+
<svg
9+
aria-hidden="true"
10+
xmlns="http://www.w3.org/2000/svg"
11+
viewBox="0 0 512 512"
12+
width="96"
13+
height="96"
14+
:class="class"
15+
>
16+
<title>{{ $t('alt_logo') }}</title>
17+
<rect fill="var(--bg)" width="512" height="512" rx="64" />
18+
<rect fill="var(--fg)" x="110" y="310" width="60" height="60" />
19+
<text
20+
fill="var(--accent)"
21+
x="320"
22+
y="370"
23+
font-family="'Geist Mono',ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace"
24+
font-size="420"
25+
font-weight="500"
26+
text-anchor="middle"
27+
>
28+
<tspan>/</tspan>
29+
</text>
30+
</svg>
31+
</template>

app/components/CollapsibleSection.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ useHead({
7676

7777
<template>
7878
<section class="scroll-mt-20" :data-anchor-id="id">
79-
<div class="flex items-center justify-between mb-3">
79+
<div class="flex items-center justify-between mb-3 px-1">
8080
<component
8181
:is="headingLevel"
8282
:id="headingId"
@@ -85,7 +85,7 @@ useHead({
8585
<button
8686
:id="buttonId"
8787
type="button"
88-
class="w-4 h-4 flex items-center justify-center text-fg-subtle hover:text-fg-muted transition-colors duration-200 shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50 rounded"
88+
class="w-4 h-4 flex items-center justify-center text-fg-subtle hover:text-fg-muted transition-colors duration-200 shrink-0 focus-visible:outline-accent/70 rounded"
8989
:aria-expanded="isOpen"
9090
:aria-controls="contentId"
9191
:aria-label="ariaLabel"
@@ -118,14 +118,17 @@ useHead({
118118
</component>
119119

120120
<!-- Actions slot for buttons or other elements -->
121-
<slot name="actions" />
121+
<div class="pe-1">
122+
<slot name="actions" />
123+
</div>
122124
</div>
123125

124126
<div
125127
:id="contentId"
126128
class="grid ms-6 transition-[grid-template-rows] duration-200 ease-in-out collapsible-content overflow-hidden"
129+
:inert="!isOpen"
127130
>
128-
<div class="min-h-0 min-w-0">
131+
<div class="min-h-0 min-w-0 p-1">
129132
<slot />
130133
</div>
131134
</div>

0 commit comments

Comments
 (0)