8000 Merge branch 'main' into feature/allow-scrollToTop-to-be-a-function · nuxt/nuxt@165fa47 · GitHub
[go: up one dir, main page]

Skip to content

Commit 165fa47

Browse files
authored
Merge branch 'main' into feature/allow-scrollToTop-to-be-a-function
2 parents c50840a + fc10da3 commit 165fa47

File tree

242 files changed

+4552
-2835
lines changed

Some content is hidden

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

242 files changed

+4552
-2835
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc",
23
"globals": {
34
"NodeJS": true,
45
"$fetch": true

.github/workflows/autofix-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2121
- run: corepack enable
22-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
22+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
2323
with:
2424
node-version: 20
2525
cache: "pnpm"
@@ -30,4 +30,4 @@ jobs:
3030
- name: Lint (docs)
3131
run: pnpm lint:docs:fix
3232

33-
- uses: autofix-ci/action@8bc06253bec489732e5f9c52884c7cace15c0160
33+
- uses: autofix-ci/action@8caa572fd27b0019a65e4c695447089c8d3138b9

.github/workflows/autofix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1717
- run: corepack enable
18-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
18+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
1919
with:
2020
node-version: 20
2121
cache: "pnpm"
@@ -42,4 +42,4 @@ jobs:
4242
- name: Update bundle size
4343
run: pnpm vitest run bundle -u
4444

45-
- uses: autofix-ci/action@8bc06253bec489732e5f9c52884c7cace15c0160
45+
- uses: autofix-ci/action@8caa572fd27b0019a65e4c695447089c8d3138b9

.github/workflows/changelogensets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525
- run: corepack enable
26-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
26+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
2727
with:
2828
node-version: 20
2929
cache: "pnpm"

.github/workflows/ci.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
push:
55
paths-ignore:
66
- "docs/**"
7+
- "*.md"
78
branches:
89
- main
910
pull_request:
1011
paths-ignore:
1112
- "docs/**"
13+
- "*.md"
1214
branches:
1315
- main
1416
- "!v[0-9]*"
@@ -38,7 +40,7 @@ jobs:
3840
steps:
3941
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
4042
- run: corepack enable
41-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
43+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
4244
with:
4345
node-version: 20
4446
cache: "pnpm"
@@ -75,7 +77,7 @@ jobs:
7577
steps:
7678
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
7779
- run: corepack enable
78-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
80+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
7981
with:
8082
node-version: 20
8183
cache: "pnpm"
@@ -84,7 +86,7 @@ jobs:
8486
run: pnpm install
8587

8688
- name: Initialize CodeQL
87-
uses: github/codeql-action/init@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1
89+
uses: github/codeql-action/init@1813ca74c3faaa3a2da2070b9b8a0b3e7373a0d8 # v2.21.0
8890
with:
8991
languages: javascript
9092
queries: +security-and-quality
@@ -96,7 +98,7 @@ jobs:
9698
path: packages
9799

98100
- name: Perform CodeQL Analysis
99-
uses: github/codeql-action/analyze@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1
101+
uses: github/codeql-action/analyze@1813ca74c3faaa3a2da2070b9b8a0b3e7373a0d8 # v2.21.0
100102
with:
101103
category: "/language:javascript"
102104

@@ -115,7 +117,7 @@ jobs:
115117
steps:
116118
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
117119
- run: corepack enable
118-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
120+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
119121
with:
120122
node-version: 20
121123
cache: "pnpm"
@@ -144,7 +146,7 @@ jobs:
144146
steps:
145147
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
146148
- run: corepack enable
147-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
149+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
148150
with:
149151
node-version: 20
150152
cache: "pnpm"
@@ -180,7 +182,7 @@ jobs:
180182
steps:
181183
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
182184
- run: corepack enable
183-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
185+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
184186
with:
185187
node-version: ${{ matrix.node }}
186188
cache: "pnpm"
@@ -212,8 +214,7 @@ jobs:
212214
${{ runner.os }}-playwright-bin-v1-
213215
214216
- name: Install Playwright
215-
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
216-
run: pnpm playwright install chromium
217+
run: pnpm playwright-core install chromium
217218

218219
- name: Restore dist cache
219220
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
@@ -224,6 +225,9 @@ jobs:
224225
- name: Test (unit)
225226
run: pnpm test:unit
226227

228+
- name: Test (runtime unit)
229+
run: pnpm test:runtime
230+
227231
- name: Test (fixtures)
228232
run: pnpm test:fixtures
229233
env:
@@ -252,7 +256,7 @@ jobs:
252256
with:
253257
fetch-depth: 0
254258
- run: corepack enable
255-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
259+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
256260
with:
257261
node-version: 20
258262
cache: "pnpm"
@@ -291,7 +295,7 @@ jobs:
291295
with:
292296
fetch-depth: 0
293297
- run: corepack enable
294-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
298+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
295299
with:
296300
node-version: 20
297301
cache: "pnpm"

.github/workflows/docs-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2525
- run: corepack enable
26-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
26+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
2727
with:
2828
cache: "pnpm"
2929

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
paths:
66
- "docs/**"
77
- ".github/workflows/docs.yml"
8+
- "*.md"
89
# autofix workflow will be triggered instead for PRs
910
branches:
1011
- main
@@ -21,7 +22,7 @@ jobs:
2122
steps:
2223
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2324
- run: corepack enable
24-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
25+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
2526
with:
2627
node-version: 20
2728
cache: "pnpm"
Lines changed: 96 additions & 0 deletions
+
with:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: ecosystem-ci trigger
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
trigger:
12+
runs-on: ubuntu-latest
13+
if: github.repository == 'nuxt/nuxt' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
14+
steps:
15+
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
16+
with:
17+
script: |
18+
const user = context.payload.sender.login
19+
console.log(`Validate user: ${user}`)
20+
21+
let hasTriagePermission = false
22+
try {
23+
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
username: user,
27+
});
28+
hasTriagePermission = data.user.permissions.triage
29+
} catch (e) {
30+
console.warn(e)
31+
}
32+
33+
if (hasTriagePermission) {
34+
console.log('Allowed')
35+
await github.rest.reactions.createForIssueComment({
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
comment_id: context.payload.comment.id,
39+
content: '+1',
40+
})
41+
} else {
42+
console.log('Not allowed')
43+
await github.rest.reactions.createForIssueComment({
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
comment_id: context.payload.comment.id,
47+
content: '-1',
48+
})
49+
throw new Error('not allowed')
50+
}
51+
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
52+
id: get-pr-data
53+
with:
54+
script: |
55+
console.log(`Get PR info: ${context.repo.owner}/${context.repo.repo}#${context.issue.number}`)
56+
const { data: pr } = await github.rest.pulls.get({
57+
owner: context.repo.owner,
58+
repo: context.repo.repo,
59+
pull_number: context.issue.number
60+
})
61+
return {
62+
num: context.issue.number,
63+
branchName: pr.head.ref,
64+
repo: pr.head.repo.full_name
65+
}
66+
- id: generate-token
67+
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
68+
with:
69+
app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }}
70+
private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }}
71+
repository: "${{ github.repository_owner }}/ecosystem-ci"
72+
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
73+
id: trigger
74+
env:
75+
COMMENT: ${{ github.event.comment.body }}
76
77+
github-token: ${{ steps.generate-token.outputs.token }}
78+
result-encoding: string
79+
script: |
80+
const comment = process.env.COMMENT.trim()
81+
const prData = ${{ steps.get-pr-data.outputs.result }}
82+
83+
const suite = comment.split('\n')[0].replace(/^\/ecosystem-ci run/, '').trim()
84+
85+
await github.rest.actions.createWorkflowDispatch({
86+
owner: context.repo.owner,
87+
repo: 'ecosystem-ci',
88+
workflow_id: 'ecosystem-ci-from-pr.yml',
89+
ref: 'main',
90+
inputs: {
91+
prNumber: '' + prData.num,
92+
branchName: prData.branchName,
93+
repo: prData.repo,
94+
suite: suite === '' ? '-' : suite
95+
}
96+
})

.github/workflows/introspect.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ jobs:
2525
# From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
2626
- name: Check workflow files
2727
run: |
28-
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
28+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/590d3bd9dde0c91f7a66071d40eb84716526e5a6/scripts/download-actionlint.bash)
2929
./actionlint -color -shellcheck=""

.github/workflows/nuxt2-edge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fetch-depth: 0 # All history
2828
- name: fetch tags
2929
run: git fetch --depth=1 origin "+refs/tags/*:refs/tags/*"
30-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
30+
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
3131
with:
3232
node-version: 16
3333
registry-url: 'https://registry.npmjs.org'

0 commit comments

Comments
 (0)
0