Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into bwsy/fix/vOnceAndvIf
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/compiler-core/src/utils.ts
  • Loading branch information
baiwusanyu-c committed Sep 5, 2024
2 parents 5ca1018 + 1b6bc23 commit fe3d99a
Show file tree
Hide file tree
Showing 492 changed files with 31,055 additions and 13,852 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

126 changes: 0 additions & 126 deletions .eslintrc.cjs

This file was deleted.

10 changes: 5 additions & 5 deletions .github/commit-convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Messages must be matched by the following regex:

``` js
```regexp
/^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,50}/
```

Expand Down Expand Up @@ -44,7 +44,7 @@ This reverts commit 667ecc1654a317a13331b17617d973392f415f02.

### Full Message Format

A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:

```
<type>(<scope>): <subject>
Expand Down Expand Up @@ -74,9 +74,9 @@ The scope could be anything specifying the place of the commit change. For examp

The subject contains a succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end

### Body

Expand Down
26 changes: 23 additions & 3 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before

## Pull Request Guidelines

### What kinds of Pull Requests are accepted?

- Bug fix that addresses a clearly identified bug. **"Clearly identified bug"** means the bug has a proper reproduction either from a related open issue, or is included in the PR itself. Avoid submitting PRs that claim to fix something but do not sufficiently explain what is being fixed.

- New feature that addresses a clearly explained and widely applicable use case. **"Widely applicable"** means the new feature should provide non-trivial improvements to the majority of the user base. Vue already has a large API surface so we are quite cautious about adding new features - if the use case is niche and can be addressed via userland implementations, it likely isn't suitable to go into core.

The feature implementation should also consider the trade-off between the added complexity vs. the benefits gained. For example, if a small feature requires significant changes that spreads across the codebase, it is likely not worth it, or the approach should be reconsidered.

If the feature has a non-trivial API surface addition, or significantly affects the way a common use case is approached by the users, it should go through a discussion first in the [RFC repo](https://github.com/vuejs/rfcs/discussions). PRs of such features without prior discussion make it really difficult to steer / adjust the API design due to coupling with concrete implementations, and can lead to wasted work.

- Chore: typos, comment improvements, build config, CI config, etc. For typos and comment changes, try to combine multiple of them into a single PR.

- **It should be noted that we discourage contributors from submitting code refactors that are largely stylistic.** Code refactors are only accepted if it improves performance, or comes with sufficient explanations on why it objectively improves the code quality (e.g. makes a related feature implementation easier).

The reason is that code readability is subjective. The maintainers of this project have chosen to write the code in its current style based on our preferences, and we do not want to spend time explaining our stylistic preferences. Contributors should just respect the established conventions when contributing code.

Another aspect of it is that large scale stylistic changes result in massive diffs that touch multiple files, adding noise to the git history and makes tracing behavior changes across commits more cumbersome.

### Pull Request Checklist

- Vue core has two primary work branches: `main` and `minor`.

- If your pull request is a feature that adds new API surface, it should be submitted against the `minor` branch.
Expand Down Expand Up @@ -61,7 +81,7 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before

## Development Setup

You will need [Node.js](https://nodejs.org) **version 18.12+**, and [PNPM](https://pnpm.io) **version 8+**.
You will need [Node.js](https://nodejs.org) with minimum version as specified in the [`.node-version`](https://github.com/vuejs/core/blob/main/.node-version) file, and [PNPM](https://pnpm.io) with minimum version as specified in the [`"packageManager"` field in `package.json`](https://github.com/vuejs/core/blob/main/package.json#L4).

We also recommend installing [@antfu/ni](https://github.com/antfu/ni) to help switching between repos using different package managers. `ni` also provides the handy `nr` command which running npm scripts easier.

Expand Down Expand Up @@ -216,7 +236,7 @@ Tests that test against source code are grouped under `nr test-unit`, while test

### `nr test-dts`

Runs `nr build-dts` first, then verify the type tests in `packages/dts-test` are working correctly against the actual built type declarations.
Runs `nr build-dts` first, then verify the type tests in `packages-private/dts-test` are working correctly against the actual built type declarations.

## Project Structure

Expand Down Expand Up @@ -315,7 +335,7 @@ Test coverage is continuously deployed at https://coverage.vuejs.org. PRs that i

### Testing Type Definition Correctness

Type tests are located in the `packages/dts-test` directory. To run the dts tests, run `nr test-dts`. Note that the type test requires all relevant `*.d.ts` files to be built first (and the script does it for you). Once the `d.ts` files are built and up-to-date, the tests can be re-run by running `nr test-dts-only`.
Type tests are located in the `packages-private/dts-test` directory. To run the dts tests, run `nr test-dts`. Note that the type test requires all relevant `*.d.ts` files to be built first (and the script does it for you). Once the `d.ts` files are built and up-to-date, the tests can be re-run by running `nr test-dts-only`.

## Financial Contribution

Expand Down
1 change: 1 addition & 0 deletions .github/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Depending on the type of the PR, different considerations need to be taken into
- Make sure it doesn't accidentally cause dev-only or compiler-only code branches to be included in the runtime build. Notable case is that some functions in @vue/shared are compiler-only and should not be used in runtime code, e.g. `isHTMLTag` and `isSVGTag`.

- Performance

- Be careful about code changes in "hot paths", in particular the Virtual DOM renderer (`runtime-core/src/renderer.ts`) and component instantiation code.

- Potential Breakage
Expand Down
24 changes: 20 additions & 4 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
{
groupName: 'playground',
matchFileNames: [
'packages/sfc-playground/package.json',
'packages/template-explorer/package.json',
'packages-private/sfc-playground/package.json',
'packages-private/template-explorer/package.json',
],
},
{
Expand All @@ -28,13 +28,13 @@
},
{
groupName: 'build',
matchPackageNames: ['vite', 'terser'],
matchPackageNames: ['vite', '@swc/core'],
matchPackagePrefixes: ['rollup', 'esbuild', '@rollup', '@vitejs'],
},
{
groupName: 'lint',
matchPackageNames: ['simple-git-hooks', 'lint-staged'],
matchPackagePrefixes: ['@typescript-eslint', 'eslint', 'prettier'],
matchPackagePrefixes: ['typescript-eslint', 'eslint', 'prettier'],
},
],
ignoreDeps: [
Expand All @@ -46,5 +46,21 @@

// ESM only
'estree-walker',

// pinned
// https://github.com/vuejs/core/issues/10300#issuecomment-1940855364
'lru-cache',

// pinned
// https://github.com/vuejs/core/commit/a012e39b373f1b6918e5c89856e8f902e1bfa14d
'@rollup/plugin-replace',

// pinned
// only used in example for e2e tests
'marked',

// pinned, 5.0+ has exports issues
// https://github.com/vuejs/core/issues/11603
'entities',
],
}
11 changes: 6 additions & 5 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ jobs:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4.0.0

- name: Set node version to 18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
node-version-file: '.node-version'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- run: pnpm install

Expand All @@ -30,4 +31,4 @@ jobs:
- name: Run prettier
run: pnpm run format

- uses: autofix-ci/action@ea32e3a12414e6d3183163c3424a7d7a8631ad84
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
8 changes: 4 additions & 4 deletions .github/workflows/canary-minor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
ref: minor

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4.0.0

- name: Set node version to 18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: '.node-version'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- run: pnpm install

- run: pnpm release --canary --tag minor
- run: pnpm release --canary --publish --tag minor
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4.0.0

- name: Install Node.js
uses: actions/setup-node@v4
Expand All @@ -26,6 +26,6 @@ jobs:

- run: pnpm install

- run: pnpm release --canary
- run: pnpm release --canary --publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit fe3d99a

Please sign in to comment.