Skip to content

Commit 747012a

Browse files
authored
Merge branch 'main' into style/improve-border-in-select-package-section
2 parents b6958af + 98c68f5 commit 747012a

File tree

288 files changed

+16938
-7955
lines changed

Some content is hidden

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

288 files changed

+16938
-7955
lines changed

.github/workflows/autofix.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
- name: 📦 Install dependencies
3333
run: pnpm install
3434

35+
- name: 🎨 Check for non-RTL/non-a11y CSS classes
36+
run: pnpm lint:css
37+
3538
- name: 🌐 Compare translations
3639
run: pnpm i18n:check
3740

.github/workflows/ci.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
run: pnpm install
8585

8686
- name: 🧪 Unit tests
87-
run: pnpm test:unit run --coverage --reporter=junit --outputFile=test-report.junit.xml
87+
run: pnpm test:unit run --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
8888

8989
- name: ⬆︎ Upload test results to Codecov
9090
if: ${{ !cancelled() }}
@@ -115,13 +115,14 @@ jobs:
115115
run: pnpm playwright install chromium-headless-shell
116116

117117
- name: 🧪 Component tests
118-
run: pnpm test:nuxt run --coverage --reporter=junit --outputFile=test-report.junit.xml
118+
run: pnpm test:nuxt run --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
119119

120-
- name: ⬆︎ Upload test results to Codecov
121-
if: ${{ !cancelled() }}
122-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
120+
- name: ⬆︎ Upload coverage reports to Codecov
121+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
123122
with:
124-
token: ${{ secrets.CODECOV_TOKEN }}
123+
report_type: test_results
124+
env:
125+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
125126

126127
- name: ⬆︎ Upload coverage reports to Codecov
127128
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
@@ -150,7 +151,9 @@ jobs:
150151
run: pnpm install
151152

152153
- name: 🏗️ Build project
153-
run: pnpm build:playwright
154+
run: pnpm build:test
155+
env:
156+
VALIDATE_HTML: true
154157

155158
- name: 🖥️ Test project (browser)
156159
run: pnpm test:browser:prebuilt
@@ -178,10 +181,10 @@ jobs:
178181
run: pnpm install
179182

180183
- name: 🏗️ Build project
181-
run: NODE_ENV=test pnpm build
184+
run: pnpm build:test
182185

183186
- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
184-
run: ./scripts/lighthouse-a11y.sh
187+
run: pnpm test:a11y:prebuilt
185188
env:
186189
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
187190
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
@@ -210,3 +213,25 @@ jobs:
210213

211214
- name: 🧹 Check for unused production code
212215
run: pnpm knip --production
216+
217+
i18n:
218+
name: 🌐 i18n validation
219+
runs-on: ubuntu-24.04-arm
220+
221+
steps:
222+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
223+
224+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
225+
with:
226+
node-version: lts/*
227+
228+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
229+
name: 🟧 Install pnpm
230+
with:
231+
cache: true
232+
233+
- name: 📦 Install dependencies (root only, no scripts)
234+
run: pnpm install --filter . --ignore-scripts
235+
236+
- name: 🌐 Check for missing or dynamic i18n keys
237+
run: pnpm i18n:report

.github/workflows/welcome.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: welcome
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
8+
permissions: {}
9+
10+
jobs:
11+
welcome:
12+
permissions:
13+
pull-requests: write # to comment on PRs
14+
if: github.repository == 'npmx-dev/npmx.dev' && github.event.pull_request.merged == true
15+
runs-on: ubuntu-slim
16+
name: 🎉 Welcome new contributor
17+
steps:
18+
- name: 🎉 Welcome new contributor
19+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
20+
with:
21+
script: |
22+
const pr = context.payload.pull_request;
23+
const author = pr.user.login;
24+
25+
// Check if this is the author's first merged PR
26+
const { data: prs } = await github.rest.search.issuesAndPullRequests({
27+
q: `repo:${context.repo.owner}/${context.repo.repo} type:pr is:merged author:${author}`,
28+
});
29+
30+
// If the only merged PR is this one, it's their first contribution
31+
if (prs.total_count !== 1) {
32+
console.log(`@${author} already has ${prs.total_count} merged PRs — skipping welcome comment.`);
33+
return;
34+
}
35+
36+
const emojis = ['🎉', '🥳', '🎊', '🚀', '⭐', '💫', '✨', '💪', '👏', '🙌', '🤩', '💥'];
37+
const emoji = emojis[Math.floor(Math.random() * emojis.length)];
38+
39+
const body = [
40+
`Thanks for your first contribution, @${author}! ${emoji}`,
41+
'',
42+
`We'd love to welcome you to the npmx community. Come and say hi on [Discord](https://chat.npmx.dev)! And once you've joined, visit [npmx.wamellow.com](https://npmx.wamellow.com/) to claim the **contributor** role.`,
43+
].join('\n');
44+
45+
await github.rest.issues.createComment({
46+
owner: context.repo.owner,
47+
repo: context.repo.repo,
48+
issue_number: pr.number,
49+
body,
50+
});
51+
52+
console.log(`Welcomed new contributor @${author} on PR #${pr.number}`);

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@ test-results/
3939

4040
# generated files
4141
shared/types/lexicons
42+
43+
**/__screenshots__/**
44+
45+
# output
46+
.vercel

.nuxtrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
setups.@nuxt/test-utils="3.23.0"
1+
setups.@nuxt/test-utils="4.0.0"

.oxlintrc.json

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://unpkg.com/oxlint/configuration_schema.json",
33
"plugins": ["unicorn", "typescript", "oxc", "vue", "vitest"],
4-
"jsPlugins": ["@e18e/eslint-plugin"],
4+
"jsPlugins": ["@e18e/eslint-plugin", "eslint-plugin-regexp"],
55
"categories": {
66
"correctness": "error",
77
"suspicious": "warn",
@@ -17,7 +17,72 @@
1717
"e18e/prefer-timer-args": "error",
1818
"e18e/prefer-date-now": "error",
1919
"e18e/prefer-regex-test": "error",
20-
"e18e/prefer-array-some": "error"
20+
"e18e/prefer-array-some": "error",
21+
// RegExp - Possible Errors (most critical)
22+
"regexp/no-contradiction-with-assertion": "error",
23+
"regexp/no-dupe-disjunctions": "error",
24+
"regexp/no-empty-alternative": "error",
25+
"regexp/no-empty-capturing-group": "error",
26+
"regexp/no-empty-character-class": "error",
27+
"regexp/no-empty-group": "error",
28+
"regexp/no-empty-lookarounds-assertion": "error",
29+
"regexp/no-escape-backspace": "error",
30+
"regexp/no-invalid-regexp": "error",
31+
"regexp/no-lazy-ends": "error",
32+
"regexp/no-misleading-capturing-group": "error",
33+
"regexp/no-misleading-unicode-character": "error",
34+
"regexp/no-missing-g-flag": "error",
35+
"regexp/no-optional-assertion": "error",
36+
"regexp/no-potentially-useless-backreference": "error",
37+
"regexp/no-super-linear-backtracking": "error",
38+
"regexp/no-useless-assertions": "error",
39+
"regexp/no-useless-backreference": "error",
40+
"regexp/no-useless-dollar-replacements": "error",
41+
"regexp/strict": "error",
42+
// RegExp - Best Practices
43+
"regexp/confusing-quantifier": "warn",
44+
"regexp/control-character-escape": "error",
45+
"regexp/negation": "error",
46+
"regexp/no-dupe-characters-character-class": "error",
47+
"regexp/no-empty-string-literal": "error",
48+
"regexp/no-extra-lookaround-assertions": "error",
49+
"regexp/no-invisible-character": "error",
50+
"regexp/no-legacy-features": "error",
51+
"regexp/no-non-standard-flag": "error",
52+
"regexp/no-obscure-range": "error",
53+
"regexp/no-octal": "error",
54+
"regexp/no-standalone-backslash": "error",
55+
"regexp/no-trivially-nested-assertion": "error",
56+
"regexp/no-trivially-nested-quantifier": "error",
57+
"regexp/no-unused-capturing-group": "warn",
58+
"regexp/no-useless-character-class": "error",
59+
"regexp/no-useless-flag": "error",
60+
"regexp/no-useless-lazy": "error",
61+
"regexp/no-useless-quantifier": "error",
62+
"regexp/no-useless-range": "error",
63+
"regexp/no-useless-set-operand": "error",
64+
"regexp/no-useless-string-literal": "error",
65+
"regexp/no-useless-two-nums-quantifier": "error",
66+
"regexp/no-zero-quantifier": "error",
67+
"regexp/optimal-lookaround-quantifier": "warn",
68+
"regexp/optimal-quantifier-concatenation": "error",
69+
"regexp/prefer-predefined-assertion": "error",
70+
"regexp/prefer-range": "error",
71+
"regexp/prefer-set-operation": "error",
72+
"regexp/simplify-set-operations": "error",
73+
"regexp/use-ignore-case": "error",
74+
// RegExp - Stylistic Issues (less critical, focused on consistency)
75+
"regexp/match-any": "warn",
76+
"regexp/no-useless-escape": "warn",
77+
"regexp/no-useless-non-capturing-group": "warn",
78+
"regexp/prefer-character-class": "warn",
79+
"regexp/prefer-d": "warn",
80+
"regexp/prefer-plus-quantifier": "warn",
81+
"regexp/prefer-question-quantifier": "warn",
82+
"regexp/prefer-star-quantifier": "warn",
83+
"regexp/prefer-unicode-codepoint-escapes": "warn",
84+
"regexp/prefer-w": "warn",
85+
"regexp/sort-flags": "warn"
2186
},
2287
"overrides": [
2388
{

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"editor.defaultFormatter": "oxc.oxc-vscode",
3+
"editor.formatOnSave": true,
4+
"i18n-ally.keystyle": "nested",
25
"i18n-ally.localesPaths": ["./i18n/locales"],
3-
"i18n-ally.keystyle": "nested"
6+
"typescript.tsdk": "node_modules/typescript/lib"
47
}

0 commit comments

Comments
 (0)