Skip to content

Commit d7ae340

Browse files
committed
Merge branch 'main' into feat/atproto-blog-fe
2 parents bf9009a + 517d021 commit d7ae340

File tree

327 files changed

+58430
-5023
lines changed

Some content is hidden

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

327 files changed

+58430
-5023
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#secure password, can use openssl rand --hex 32
1+
#secure password, can use openssl rand -hex 32
22
NUXT_SESSION_PASSWORD=""

.github/workflows/autofix.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414

1515
jobs:
1616
code:
17+
name: 🤖 Autofix code
1718
runs-on: ubuntu-latest
1819

1920
steps:
@@ -24,16 +25,13 @@ jobs:
2425
node-version: lts/*
2526

2627
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
27-
name: Install pnpm
28+
name: 🟧 Install pnpm
2829
with:
2930
cache: true
3031

3132
- name: 📦 Install dependencies
3233
run: pnpm install
3334

34-
- name: 📦 Install browsers
35-
run: pnpm playwright install
36-
3735
- name: 🌐 Compare translations
3836
run: pnpm i18n:check
3937

@@ -43,14 +41,4 @@ jobs:
4341
- name: 🔠 Fix lint errors
4442
run: pnpm lint:fix
4543

46-
- name: 🧪 Update unit test snapshots
47-
run: pnpm test:unit -u
48-
49-
- name: 🏃 Update component test snapshots
50-
run: pnpm test:nuxt -u
51-
52-
# TODO: re-enable when we have snapshots in browser tests
53-
# - name: 🖥️ Update browser test snapshots
54-
# run: pnpm test:browser --update-snapshots
55-
5644
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/ci.yml

Lines changed: 70 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ permissions:
2121

2222
jobs:
2323
lint:
24+
name: 🔠 Lint project
2425
runs-on: ubuntu-latest
2526

2627
steps:
@@ -31,17 +32,58 @@ jobs:
3132
node-version: lts/*
3233

3334
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
34-
name: Install pnpm
35+
name: 🟧 Install pnpm
36+
# pnpm cache skipped deliberately as the project is not actually installed here
37+
38+
- name: 🔠 Lint project
39+
run: node scripts/lint.ts
40+
41+
types:
42+
name: 💪 Type check
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
47+
48+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
49+
with:
50+
node-version: lts/*
51+
52+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
53+
name: 🟧 Install pnpm
3554
with:
3655
cache: true
3756

3857
- name: 📦 Install dependencies
3958
run: pnpm install
4059

41-
- name: 🔠 Lint project
42-
run: pnpm lint
60+
- name: 💪 Type check
61+
run: pnpm test:types
62+
63+
unit:
64+
name: 🧪 Unit tests
65+
runs-on: ubuntu-latest
66+
67+
steps:
68+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
69+
70+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
71+
with:
72+
node-version: lts/*
73+
74+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
75+
name: 🟧 Install pnpm
76+
with:
77+
cache: true
78+
79+
- name: 📦 Install dependencies
80+
run: pnpm install
81+
82+
- name: 🧪 Unit tests
83+
run: pnpm test:unit --project unit run --coverage
4384

4485
test:
86+
name: 🧪 Component tests
4587
runs-on: ubuntu-latest
4688

4789
steps:
@@ -52,26 +94,26 @@ jobs:
5294
node-version: lts/*
5395

5496
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
55-
name: Install pnpm
97+
name: 🟧 Install pnpm
5698
with:
5799
cache: true
58100

59101
- name: 📦 Install dependencies
60102
run: pnpm install
61103

62104
- name: 🌐 Install browser
63-
run: pnpm playwright install
105+
run: pnpm playwright install chromium-headless-shell
64106

65-
- name: 💪 Type check
66-
run: pnpm test:types
107+
- name: 🧪 Component tests
108+
run: pnpm vite test --project nuxt run --coverage
67109

68-
- name: 🧪 Unit test
69-
run: pnpm test:unit
70-
71-
- name: 🏃 Component tests
72-
run: pnpm test:nuxt
110+
- name: Upload coverage reports to Codecov
111+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
112+
env:
113+
CODECOV_TOKEN: 17b4bed9-d407-4ce2-9c10-2ccd4328a1d9
73114

74115
browser:
116+
name: 🖥️ Browser tests
75117
runs-on: ubuntu-latest
76118
container:
77119
image: mcr.microsoft.com/playwright:v1.58.0-noble
@@ -84,18 +126,25 @@ jobs:
84126
node-version: lts/*
85127

86128
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
87-
name: Install pnpm
129+
name: 🟧 Install pnpm
88130
with:
89131
cache: true
90132

91133
- name: 📦 Install dependencies
92134
run: pnpm install
93135

136+
- name: 🏗️ Build project
137+
run: pnpm build:playwright
138+
94139
- name: 🖥️ Test project (browser)
95-
run: pnpm test:browser
140+
run: pnpm test:browser:prebuilt
96141

97142
a11y:
143+
name: ♿ Accessibility audit
98144
runs-on: ubuntu-latest
145+
strategy:
146+
matrix:
147+
mode: [dark, light]
99148

100149
steps:
101150
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -105,22 +154,24 @@ jobs:
105154
node-version: lts/*
106155

107156
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
108-
name: Install pnpm
157+
name: 🟧 Install pnpm
109158
with:
110159
cache: true
111160

112161
- name: 📦 Install dependencies
113162
run: pnpm install
114163

115164
- name: 🏗️ Build project
116-
run: pnpm build
165+
run: NODE_ENV=test pnpm build
117166

118-
- name: ♿ Accessibility audit (Lighthouse - dark & light mode)
167+
- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
119168
run: ./scripts/lighthouse-a11y.sh
120169
env:
121170
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
171+
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
122172

123173
knip:
174+
name: 🧹 Unused code check
124175
runs-on: ubuntu-latest
125176

126177
steps:
@@ -131,12 +182,12 @@ jobs:
131182
node-version: lts/*
132183

133184
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
134-
name: Install pnpm
185+
name: 🟧 Install pnpm
135186
with:
136187
cache: true
137188

138189
- name: 📦 Install dependencies
139190
run: pnpm install
140191

141-
- name: 🔍 Check for unused code
192+
- name: 🧹 Check for unused code
142193
run: pnpm knip

.github/workflows/lunaria.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
jobs:
1919
lunaria-overview:
20-
name: Generate Lunaria Overview
20+
name: 🌝 Generate Lunaria Overview
2121
runs-on: ubuntu-latest
2222

2323
steps:
@@ -33,7 +33,7 @@ jobs:
3333
node-version: lts/*
3434

3535
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
36-
name: Install pnpm
36+
name: 🟧 Install pnpm
3737
with:
3838
cache: true
3939

.github/workflows/provenance.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,29 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- pnpm-lock.yaml
79
pull_request:
810
branches:
911
- main
12+
paths:
13+
- pnpm-lock.yaml
1014
merge_group:
1115
branches:
1216
- main
17+
1318
permissions:
1419
contents: read
20+
1521
jobs:
1622
check-provenance:
17-
runs-on: ubuntu-latest
23+
name: 🔒 Check provenance downgrades
24+
runs-on: ubuntu-slim
1825
steps:
1926
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2027
with:
2128
fetch-depth: 0
29+
2230
- name: Check provenance downgrades
2331
uses: danielroe/provenance-action@41bcc969e579d9e29af08ba44fcbfdf95cee6e6c # v0.1.1
2432
with:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
1717
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
1818
if: github.repository == 'npmx-dev/npmx.dev'
19-
runs-on: ubuntu-latest
20-
name: semantic-pr
19+
runs-on: ubuntu-slim
20+
name: 🏷️ Validate PR title
2121
steps:
2222
- name: Validate PR title
2323
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1

.lighthouserc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = {
2929
url: [
3030
'http://localhost:3000/',
3131
'http://localhost:3000/search?q=nuxt',
32-
'http://localhost:3000/nuxt',
32+
'http://localhost:3000/package/nuxt',
3333
],
3434
numberOfRuns: 1,
3535
chromePath: findChrome(),

0 commit comments

Comments
 (0)