Skip to content

Commit 14fe165

Browse files
authored
Merge branch 'main' into byk/feat/md
2 parents 2053f3d + 611cc87 commit 14fe165

241 files changed

Lines changed: 39616 additions & 4112 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.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

.github/workflows/autofix.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
pull_request:
66
branches:
77
- main
8+
merge_group:
9+
branches:
10+
- main
811

912
permissions:
1013
contents: read
@@ -14,9 +17,9 @@ jobs:
1417
runs-on: ubuntu-latest
1518

1619
steps:
17-
- uses: actions/checkout@v6
20+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1821
- run: corepack enable
19-
- uses: actions/setup-node@v6
22+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
2023
with:
2124
node-version: lts/*
2225
cache: 'pnpm'
@@ -27,6 +30,9 @@ jobs:
2730
- name: 📦 Install browsers
2831
run: pnpm playwright install
2932

33+
- name: 🌍 Update lunaria data
34+
run: pnpm build:lunaria
35+
3036
- name: 🔠 Fix lint errors
3137
run: pnpm lint:fix
3238

@@ -36,7 +42,8 @@ jobs:
3642
- name: 🏃 Update component test snapshots
3743
run: pnpm test:nuxt -u
3844

39-
- name: 🖥️ Update browser test snapshots
40-
run: pnpm test:browser --update-snapshots
45+
# TODO: re-enable when we have snapshots in browser tests
46+
# - name: 🖥️ Update browser test snapshots
47+
# run: pnpm test:browser --update-snapshots
4148

4249
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/ci.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
push:
88
branches:
99
- main
10+
merge_group:
11+
branches:
12+
- main
1013

1114
permissions:
1215
contents: read
@@ -16,9 +19,9 @@ jobs:
1619
runs-on: ubuntu-latest
1720

1821
steps:
19-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2023
- run: corepack enable
21-
- uses: actions/setup-node@v6
24+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
2225
with:
2326
node-version: lts/*
2427
cache: pnpm
@@ -33,9 +36,9 @@ jobs:
3336
runs-on: ubuntu-latest
3437

3538
steps:
36-
- uses: actions/checkout@v6
39+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3740
- run: corepack enable
38-
- uses: actions/setup-node@v6
41+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3942
with:
4043
node-version: lts/*
4144
cache: pnpm
@@ -61,9 +64,9 @@ jobs:
6164
image: mcr.microsoft.com/playwright:v1.57.0-noble
6265

6366
steps:
64-
- uses: actions/checkout@v6
67+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
6568
- run: corepack enable
66-
- uses: actions/setup-node@v6
69+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
6770
with:
6871
node-version: lts/*
6972
cache: pnpm
@@ -78,9 +81,9 @@ jobs:
7881
runs-on: ubuntu-latest
7982

8083
steps:
81-
- uses: actions/checkout@v6
84+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
8285
- run: corepack enable
83-
- uses: actions/setup-node@v6
86+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
8487
with:
8588
node-version: lts/*
8689
cache: pnpm
@@ -91,7 +94,24 @@ jobs:
9194
- name: 🏗️ Build project
9295
run: pnpm build
9396

94-
- name: ♿ Accessibility audit (Lighthouse)
95-
run: pnpx @lhci/cli autorun
97+
- name: ♿ Accessibility audit (Lighthouse - dark & light mode)
98+
run: ./scripts/lighthouse-a11y.sh
9699
env:
97100
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
101+
102+
knip:
103+
runs-on: ubuntu-latest
104+
105+
steps:
106+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
107+
- run: corepack enable
108+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
109+
with:
110+
node-version: lts/*
111+
cache: pnpm
112+
113+
- name: 📦 Install dependencies
114+
run: pnpm install
115+
116+
- name: 🔍 Check for unused code
117+
run: pnpm knip:production

.github/workflows/lunaria.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: lunaria
2+
3+
on:
4+
# Trigger the workflow every time a pull request is opened or synchronized at the target `main` branch
5+
pull_request_target:
6+
types: [opened, synchronize]
7+
8+
# Automatically cancel in-progress actions on the same branch
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
11+
cancel-in-progress: true
12+
13+
# Allow this job to clone the repository and comment on the pull request
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
18+
jobs:
19+
lunaria-overview:
20+
name: Generate Lunaria Overview
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
26+
with:
27+
# Necessary for Lunaria to work properly
28+
# Makes the action clone the entire git history
29+
fetch-depth: 0
30+
31+
- run: corepack enable
32+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
33+
with:
34+
node-version: lts/*
35+
cache: pnpm
36+
37+
- name: 📦 Install dependencies
38+
run: pnpm install
39+
40+
- name: Generate Lunaria Overview
41+
uses: lunariajs/action@v1-prerelease

.github/workflows/provenance.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ on:
77
pull_request:
88
branches:
99
- main
10+
merge_group:
11+
branches:
12+
- main
1013
permissions:
1114
contents: read
1215
jobs:
1316
check-provenance:
1417
runs-on: ubuntu-latest
1518
steps:
16-
- uses: actions/checkout@v6
19+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1720
with:
1821
fetch-depth: 0
1922
- name: Check provenance downgrades
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: chore
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions: {}
11+
12+
jobs:
13+
semantic-pr:
14+
permissions:
15+
contents: read
16+
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
17+
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
18+
if: github.repository == 'npmx-dev/npmx.dev'
19+
runs-on: ubuntu-latest
20+
name: semantic-pr
21+
steps:
22+
- name: Validate PR title
23+
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
24+
with:
25+
scopes: |
26+
docs
27+
i18n
28+
deps
29+
subjectPattern: ^(?![A-Z]).+$
30+
subjectPatternError: |
31+
The subject "{subject}" found in the pull request title "{title}"
32+
didn't match the configured pattern. Please ensure that the subject
33+
doesn't start with an uppercase character.
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ test-results/
3636

3737
# Lighthouse
3838
.lighthouseci
39+
40+
# generated files
41+
shared/types/lexicons

.lighthouserc.cjs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const fs = require('fs')
2+
3+
// Auto-detect Chrome executable path
4+
function findChrome() {
5+
const paths = [
6+
// Linux
7+
'/usr/bin/google-chrome-stable',
8+
'/usr/bin/google-chrome',
9+
'/usr/bin/chromium-browser',
10+
// macOS
11+
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
12+
// Windows
13+
'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
14+
'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe',
15+
]
16+
17+
for (const p of paths) {
18+
if (fs.existsSync(p)) return p
19+
}
20+
21+
return undefined
22+
}
23+
24+
module.exports = {
25+
ci: {
26+
collect: {
27+
startServerCommand: 'pnpm preview',
28+
startServerReadyPattern: 'Listening',
29+
url: [
30+
'http://localhost:3000/',
31+
'http://localhost:3000/search?q=nuxt',
32+
'http://localhost:3000/nuxt',
33+
],
34+
numberOfRuns: 1,
35+
chromePath: findChrome(),
36+
puppeteerScript: './lighthouse-setup.cjs',
37+
settings: {
38+
onlyCategories: ['accessibility'],
39+
skipAudits: ['valid-source-maps'],
40+
},
41+
},
42+
assert: {
43+
assertions: {
44+
'categories:accessibility': ['error', { minScore: 1 }],
45+
},
46+
},
47+
upload: {
48+
target: 'temporary-public-storage',
49+
},
50+
},
51+
}

.lighthouserc.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@jsr:registry=https://npm.jsr.io

0 commit comments

Comments
 (0)