Skip to content

Commit 3cb3f1f

Browse files
committed
Merge branch 'main' into fix/delete-defined-undefined-slots
2 parents 5babb1d + 650f5c2 commit 3cb3f1f

File tree

361 files changed

+12410
-8778
lines changed

Some content is hidden

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

361 files changed

+12410
-8778
lines changed

.eslintrc.js renamed to .eslintrc.cjs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
parserOptions: {
77
sourceType: 'module'
88
},
9-
plugins: ["jest"],
9+
plugins: ['jest'],
1010
rules: {
1111
'no-debugger': 'error',
1212
'no-unused-vars': [
@@ -17,20 +17,22 @@ module.exports = {
1717
],
1818
// most of the codebase are expected to be env agnostic
1919
'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
20-
// since we target ES2015 for baseline support, we need to forbid object
21-
// rest spread usage in destructure as it compiles into a verbose helper.
22-
// TS now compiles assignment spread into Object.assign() calls so that
23-
// is allowed.
20+
2421
'no-restricted-syntax': [
2522
'error',
23+
// since we target ES2015 for baseline support, we need to forbid object
24+
// rest spread usage in destructure as it compiles into a verbose helper.
2625
'ObjectPattern > RestElement',
26+
// tsc compiles assignment spread into Object.assign() calls, but esbuild
27+
// still generates verbose helpers, so spread assignment is also prohiboted
28+
'ObjectExpression > SpreadElement',
2729
'AwaitExpression'
2830
]
2931
},
3032
overrides: [
3133
// tests, no restrictions (runs in Node / jest with jsdom)
3234
{
33-
files: ['**/__tests__/**', 'test-dts/**'],
35+
files: ['**/__tests__/**', 'packages/dts-test/**'],
3436
rules: {
3537
'no-restricted-globals': 'off',
3638
'no-restricted-syntax': 'off',
@@ -69,6 +71,19 @@ module.exports = {
6971
'no-restricted-globals': ['error', ...NodeGlobals],
7072
'no-restricted-syntax': 'off'
7173
}
74+
},
75+
// Node scripts
76+
{
77+
files: [
78+
'scripts/**',
79+
'./*.js',
80+
'packages/**/index.js',
81+
'packages/size-check/**'
82+
],
83+
rules: {
84+
'no-restricted-globals': 'off',
85+
'no-restricted-syntax': 'off'
86+
}
7287
}
7388
]
7489
}

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ body:
3030
description: |
3131
The easiest way to provide a reproduction is by showing the bug in [The SFC Playground](https://sfc.vuejs.org/).
3232
If it cannot be reproduced in the playground and requires a proper build setup, try [StackBlitz](https://vite.new/vue).
33-
If neither of these are suitable, you can always provide a GitHub reporistory.
33+
If neither of these are suitable, you can always provide a GitHub repository.
3434
3535
The reproduction should be **minimal** - i.e. it should contain only the bare minimum amount of code needed
3636
to show the bug. See [Bug Reproduction Guidelines](https://github.com/vuejs/core/blob/main/.github/bug-repro-guidelines.md) for more details.

.github/contributing.md

Lines changed: 108 additions & 50 deletions
Large diffs are not rendered by default.

.github/workflows/canary.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: canary release
2+
on:
3+
# Runs every Monday at 1 AM UTC (9:00 AM in Singapore)
4+
schedule:
5+
- cron: 0 1 * * MON
6+
workflow_dispatch:
7+
8+
jobs:
9+
canary:
10+
# prevents this action from running on forks
11+
if: github.repository == 'vuejs/core'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v2
18+
19+
- name: Set node version to 18
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 18
23+
registry-url: 'https://registry.npmjs.org'
24+
cache: 'pnpm'
25+
26+
- run: pnpm install
27+
28+
- run: pnpm release --canary
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/ci.yml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,48 @@ on:
66
pull_request:
77
branches:
88
- main
9+
10+
permissions:
11+
contents: read # to fetch code (actions/checkout)
12+
913
jobs:
1014
unit-test:
1115
runs-on: ubuntu-latest
1216
steps:
13-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1418

1519
- name: Install pnpm
1620
uses: pnpm/action-setup@v2
1721

18-
- name: Set node version to 16
19-
uses: actions/setup-node@v2
22+
- name: Set node version to 18
23+
uses: actions/setup-node@v3
2024
with:
21-
node-version: 16
25+
node-version: 18
2226
cache: 'pnpm'
2327

24-
- run: pnpm install
28+
- run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
2529

2630
- name: Run unit tests
2731
run: pnpm run test-unit
2832

2933
e2e-test:
3034
runs-on: ubuntu-latest
3135
steps:
32-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v3
37+
38+
- name: Setup cache for Chromium binary
39+
uses: actions/cache@v3
40+
with:
41+
path: ~/.cache/puppeteer/chrome
42+
key: chromium-${{ hashFiles('pnpm-lock.yaml') }}
3343

3444
- name: Install pnpm
3545
uses: pnpm/action-setup@v2
3646

37-
- name: Set node version to 16
38-
uses: actions/setup-node@v2
47+
- name: Set node version to 18
48+
uses: actions/setup-node@v3
3949
with:
40-
node-version: 16
50+
node-version: 18
4151
cache: 'pnpm'
4252

4353
- run: pnpm install
@@ -48,22 +58,25 @@ jobs:
4858
lint-and-test-dts:
4959
runs-on: ubuntu-latest
5060
steps:
51-
- uses: actions/checkout@v2
61+
- uses: actions/checkout@v3
5262

5363
- name: Install pnpm
5464
uses: pnpm/action-setup@v2
5565

56-
- name: Set node version to 16
57-
uses: actions/setup-node@v2
66+
- name: Set node version to 18
67+
uses: actions/setup-node@v3
5868
with:
59-
node-version: 16
69+
node-version: 18
6070
cache: 'pnpm'
6171

62-
- run: pnpm install
72+
- run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
6373

6474
- name: Run eslint
6575
run: pnpm run lint
6676

77+
# - name: Run prettier
78+
# run: pnpm run format-check
79+
6780
- name: Run type declaration tests
6881
run: pnpm run test-dts
6982

@@ -72,18 +85,18 @@ jobs:
7285
env:
7386
CI_JOB_NUMBER: 1
7487
steps:
75-
- uses: actions/checkout@v2
88+
- uses: actions/checkout@v3
7689

7790
- name: Install pnpm
7891
uses: pnpm/action-setup@v2
7992

80-
- name: Set node version to 16
81-
uses: actions/setup-node@v2
93+
- name: Set node version to 18
94+
uses: actions/setup-node@v3
8295
with:
83-
node-version: 16
96+
node-version: 18
8497
cache: 'pnpm'
8598

86-
- run: pnpm install
99+
- run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
87100
- run: pnpm run size
88101

89102
# - name: Check build size
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: ecosystem-ci trigger
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
trigger:
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'vuejs/core' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
11+
steps:
12+
- uses: actions/github-script@v6
13+
with:
14+
script: |
15+
const user = context.payload.sender.login
16+
console.log(`Validate user: ${user}`)
17+
18+
let isVuejsMember = false
19+
try {
20+
const { status } = await github.rest.orgs.checkMembershipForUser({
21+
org: 'vuejs',
22+
username: user
23+
});
24+
25+
isVuejsMember = (status === 204)
26+
} catch (e) {}
27+
28+
if (isVuejsMember) {
29+
console.log('Allowed')
30+
await github.rest.reactions.createForIssueComment({
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
comment_id: context.payload.comment.id,
34+
content: '+1',
35+
})
36+
} else {
37+
console.log('Not allowed')
38+
await github.rest.reactions.createForIssueComment({
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
comment_id: context.payload.comment.id,
42+
content: '-1',
43+
})
44+
throw new Error('not allowed')
45+
}
46+
- uses: actions/github-script@v6
47+
id: get-pr-data
48+
with:
49+
script: |
50+
console.log(`Get PR info: ${context.repo.owner}/${context.repo.repo}#${context.issue.number}`)
51+
const { data: pr } = await github.rest.pulls.get({
52+
owner: context.repo.owner,
53+
repo: context.repo.repo,
54+
pull_number: context.issue.number
55+
})
56+
return {
57+
num: context.issue.number,
58+
branchName: pr.head.ref,
59+
repo: pr.head.repo.full_name
60+
}
61+
- uses: actions/github-script@v6
62+
id: trigger
63+
env:
64+
COMMENT: ${{ github.event.comment.body }}
65+
with:
66+
github-token: ${{ secrets.ECOSYSTEM_CI_ACCESS_TOKEN }}
67+
result-encoding: string
68+
script: |
69+
const comment = process.env.COMMENT.trim()
70+
const prData = ${{ steps.get-pr-data.outputs.result }}
71+
72+
const suite = comment.replace(/^\/ecosystem-ci run/, '').trim()
73+
74+
await github.rest.actions.createWorkflowDispatch({
75+
owner: context.repo.owner,
76+
repo: 'ecosystem-ci',
77+
workflow_id: 'ecosystem-ci-from-pr.yml',
78+
ref: 'main',
79+
inputs: {
80+
prNumber: '' + prData.num,
81+
branchName: prData.branchName,
82+
repo: prData.repo,
83+
suite: suite === '' ? '-' : suite
84+
}
85+
})

.github/workflows/release-tag.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ on:
55

66
name: Create Release
77

8+
permissions: {}
89
jobs:
910
build:
11+
permissions:
12+
contents: write # to create release (yyx990803/release-tag)
13+
1014
name: Create Release
1115
runs-on: ubuntu-latest
1216
steps:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ explorations
77
TODOs.md
88
*.log
99
.idea
10+
.eslintcache
11+
dts-build/packages
12+
*.tsbuildinfo

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

BACKERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 align="center">Sponsors &amp; Backers</h1>
22

3-
Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of the awesome sponsors and backers listed in this file. If you'd like to join them, please consider [ sponsor Vue's development](https://vuejs.org/sponsor/).
3+
Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of the awesome sponsors and backers listed in this file. If you'd like to join them, please consider [ sponsoring Vue's development](https://vuejs.org/sponsor/).
44

55
<p align="center">
66
<a target="_blank" href="https://sponsors.vuejs.org/backers.svg">

0 commit comments

Comments
 (0)