Skip to content

Commit 8867ee5

Browse files
committed
Merge remote-tracking branch 'origin/main' into align-skeleton
2 parents 3932474 + bf0c8f7 commit 8867ee5

16 files changed

Lines changed: 571 additions & 35 deletions

File tree

.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: 23 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
115+
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 }}
109121

110-
- name: Upload coverage reports to Codecov
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

.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

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
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<script setup lang="ts">
2+
import type { ProvenanceDetails } from '#shared/types'
3+
4+
defineProps<{
5+
details: ProvenanceDetails
6+
}>()
7+
</script>
8+
9+
<template>
10+
<section aria-labelledby="provenance-heading" class="scroll-mt-20">
11+
<h2 id="provenance-heading" class="group text-xs text-fg-subtle uppercase tracking-wider mb-3">
12+
<a
13+
href="#provenance"
14+
class="inline-flex items-center gap-1.5 text-fg-subtle hover:text-fg-muted transition-colors duration-200 no-underline"
15+
>
16+
{{ $t('package.provenance_section.title') }}
17+
<span
18+
class="i-carbon-link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
19+
aria-hidden="true"
20+
/>
21+
</a>
22+
</h2>
23+
24+
<div class="space-y-3 border border-border rounded-lg p-5">
25+
<p class="flex items-center gap-2 text-sm text-fg m-0">
26+
<span class="i-lucide-shield-check w-4 h-4 shrink-0 text-emerald-500" aria-hidden="true" />
27+
<i18n-t keypath="package.provenance_section.built_and_signed_on" tag="span">
28+
<template #provider>
29+
<strong>{{ details.providerLabel }}</strong>
30+
</template>
31+
</i18n-t>
32+
</p>
33+
<a
34+
v-if="details.buildSummaryUrl"
35+
:href="details.buildSummaryUrl"
36+
target="_blank"
37+
rel="noopener noreferrer"
38+
class="link text-sm text-fg-muted block mt-1"
39+
>
40+
{{ $t('package.provenance_section.view_build_summary') }}
41+
</a>
42+
43+
<dl class="m-0 mt-4 flex justify-between">
44+
<div v-if="details.sourceCommitUrl" class="flex flex-col gap-0.5">
45+
<dt class="font-mono text-xs text-fg-muted m-0">
46+
{{ $t('package.provenance_section.source_commit') }}
47+
</dt>
48+
<dd class="m-0">
49+
<a
50+
:href="details.sourceCommitUrl"
51+
target="_blank"
52+
rel="noopener noreferrer"
53+
class="link font-mono text-sm break-all"
54+
>
55+
{{
56+
details.sourceCommitSha
57+
? `${details.sourceCommitSha.slice(0, 12)}`
58+
: details.sourceCommitUrl
59+
}}
60+
</a>
61+
</dd>
62+
</div>
63+
<div v-if="details.buildFileUrl" class="flex flex-col gap-0.5">
64+
<dt class="font-mono text-xs text-fg-muted m-0">
65+
{{ $t('package.provenance_section.build_file') }}
66+
</dt>
67+
<dd class="m-0">
68+
<a
69+
:href="details.buildFileUrl"
70+
target="_blank"
71+
rel="noopener noreferrer"
72+
class="link font-mono text-sm break-all"
73+
>
74+
{{ details.buildFilePath ?? details.buildFileUrl }}
75+
</a>
76+
</dd>
77+
</div>
78+
<div v-if="details.publicLedgerUrl" class="flex flex-col gap-0.5">
79+
<dt class="font-mono text-xs text-fg-muted m-0">
80+
{{ $t('package.provenance_section.public_ledger') }}
81+
</dt>
82+
<dd class="m-0">
83+
<a
84+
:href="details.publicLedgerUrl"
85+
target="_blank"
86+
rel="noopener noreferrer"
87+
class="link text-sm"
88+
>
89+
{{ $t('package.provenance_section.transparency_log_entry') }}
90+
</a>
91+
</dd>
92+
</div>
93+
</dl>
94+
</div>
95+
</section>
96+
</template>

0 commit comments

Comments
 (0)