Skip to content

Commit cf20ee6

Browse files
authored
Revert "feat: Vapor mode (#12359)" (#13578)
This reverts commit bfe5ce3.
1 parent bfe5ce3 commit cf20ee6

File tree

303 files changed

+2100
-35157
lines changed

Some content is hidden

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

303 files changed

+2100
-35157
lines changed

.github/contributing.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,20 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
3838
### Pull Request Checklist
3939

4040
- Vue core has two primary work branches: `main` and `minor`.
41+
4142
- If your pull request is a feature that adds new API surface, it should be submitted against the `minor` branch.
4243

4344
- Otherwise, it should be submitted against the `main` branch.
4445

4546
- [Make sure to tick the "Allow edits from maintainers" box](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork). This allows us to directly make minor edits / refactors and saves a lot of time.
4647

4748
- If adding a new feature:
49+
4850
- Add accompanying test case.
4951
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
5052

5153
- If fixing a bug:
54+
5255
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
5356
- Provide a detailed description of the bug in the PR. Live demo preferred.
5457
- Add appropriate test coverage if applicable. You can check the coverage of your code addition by running `nr test-coverage`.
@@ -66,7 +69,9 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
6669
- The PR should fix the intended bug **only** and not introduce unrelated changes. This includes unnecessary refactors - a PR should focus on the fix and not code style, this makes it easier to trace changes in the future.
6770

6871
- Consider the performance / size impact of the changes, and whether the bug being fixes justifies the cost. If the bug being fixed is a very niche edge case, we should try to minimize the size / perf cost to make it worthwhile.
72+
6973
- Is the code perf-sensitive (e.g. in "hot paths" like component updates or the vdom patch function?)
74+
7075
- If the branch is dev-only, performance is less of a concern.
7176

7277
- Check how much extra bundle size the change introduces.
@@ -260,6 +265,7 @@ This repository employs a [monorepo](https://en.wikipedia.org/wiki/Monorepo) set
260265
- `vue`: The public facing "full build" which includes both the runtime AND the compiler.
261266

262267
- Private utility packages:
268+
263269
- `dts-test`: Contains type-only tests against generated dts files.
264270

265271
- `sfc-playground`: The playground continuously deployed at https://play.vuejs.org. To run the playground locally, use [`nr dev-sfc`](#nr-dev-sfc).
@@ -284,39 +290,27 @@ This is made possible via several configurations:
284290

285291
```mermaid
286292
flowchart LR
287-
vue["vue"]
288293
compiler-sfc["@vue/compiler-sfc"]
289294
compiler-dom["@vue/compiler-dom"]
290-
compiler-vapor["@vue/compiler-vapor"]
291295
compiler-core["@vue/compiler-core"]
296+
vue["vue"]
292297
runtime-dom["@vue/runtime-dom"]
293-
runtime-vapor["@vue/runtime-vapor"]
294298
runtime-core["@vue/runtime-core"]
295299
reactivity["@vue/reactivity"]
296300
297301
subgraph "Runtime Packages"
298302
runtime-dom --> runtime-core
299-
runtime-vapor --> runtime-core
300303
runtime-core --> reactivity
301304
end
302305
303306
subgraph "Compiler Packages"
304307
compiler-sfc --> compiler-core
305308
compiler-sfc --> compiler-dom
306-
compiler-sfc --> compiler-vapor
307309
compiler-dom --> compiler-core
308-
compiler-vapor --> compiler-core
309310
end
310311
311-
vue --> compiler-sfc
312312
vue ---> compiler-dom
313313
vue --> runtime-dom
314-
vue --> compiler-vapor
315-
vue --> runtime-vapor
316-
317-
%% Highlight class
318-
classDef highlight stroke:#35eb9a,stroke-width:3px;
319-
class compiler-vapor,runtime-vapor highlight;
320314
```
321315

322316
There are some rules to follow when importing across package boundaries:

.github/maintenance.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ Depending on the type of the PR, different considerations need to be taken into
4848
- Performance: if a refactor PR claims to improve performance, there should be benchmarks showcasing said performance unless the improvement is self-explanatory.
4949

5050
- Code quality / stylistic PRs: we should be conservative on merging this type PRs because (1) they can be subjective in many cases, and (2) they often come with large git diffs, causing merge conflicts with other pending PRs, and leading to unwanted noise when tracing changes through git history. Use your best judgement on this type of PRs on whether they are worth it.
51+
5152
- For PRs in this category that are approved, do not merge immediately. Group them before releasing a new minor, after all feature-oriented PRs are merged.
5253

5354
### Reviewing a Feature
5455

5556
- Feature PRs should always have clear context and explanation on why the feature should be added, ideally in the form of an RFC. If the PR doesn't explain what real-world problem it is solving, ask the contributor to clarify.
5657

5758
- Decide if the feature should require an RFC process. The line isn't always clear, but a rough criteria is whether it is augmenting an existing API vs. adding a new API. Some examples:
59+
5860
- Adding a new built-in component or directive is "significant" and definitely requires an RFC.
5961
- Template syntax additions like adding a new `v-on` modifier or a new `v-bind` syntax sugar are "substantial". It would be nice to have an RFC for it, but a detailed explanation on the use case and reasoning behind the design directly in the PR itself can be acceptable.
6062
- Small, low-impact additions like exposing a new utility type or adding a new app config option can be self-explanatory, but should still provide enough context in the PR.
@@ -68,6 +70,7 @@ Depending on the type of the PR, different considerations need to be taken into
6870
- Implementation: code style should be consistent with the rest of the codebase, follow common best practices. Prefer code that is boring but easy to understand over "clever" code.
6971

7072
- Size: bundle size matters. We have a GitHub action that compares the size change for every PR. We should always aim to realize the desired changes with the smallest amount of code size increase.
73+
7174
- Sometimes we need to compare the size increase vs. perceived benefits to decide whether a change is justifiable. Also take extra care to make sure added code can be tree-shaken if not needed.
7275

7376
- Make sure to put dev-only code in `__DEV__` branches so they are tree-shakable.
@@ -77,6 +80,7 @@ Depending on the type of the PR, different considerations need to be taken into
7780
- 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`.
7881

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

8286
- Potential Breakage

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ on:
99
branches:
1010
- main
1111
- minor
12-
- vapor
1312

1413
jobs:
1514
test:
1615
if: ${{ ! startsWith(github.event.head_commit.message, 'release:') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }}
1716
uses: ./.github/workflows/test.yml
1817

1918
continuous-release:
20-
if: github.repository == 'vuejs/core' && github.ref_name != 'vapor'
19+
if: github.repository == 'vuejs/core'
2120
runs-on: ubuntu-latest
2221
steps:
2322
- name: Checkout

.github/workflows/test.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -80,32 +80,6 @@ jobs:
8080
- name: verify treeshaking
8181
run: node scripts/verify-treeshaking.js
8282

83-
e2e-vapor:
84-
runs-on: ubuntu-latest
85-
steps:
86-
- uses: actions/checkout@v4
87-
88-
- name: Setup cache for Chromium binary
89-
uses: actions/cache@v4
90-
with:
91-
path: ~/.cache/puppeteer
92-
key: chromium-${{ hashFiles('pnpm-lock.yaml') }}
93-
94-
- name: Install pnpm
95-
uses: pnpm/action-setup@v4.0.0
96-
97-
- name: Install Node.js
98-
uses: actions/setup-node@v4
99-
with:
100-
node-version-file: '.node-version'
101-
cache: 'pnpm'
102-
103-
- run: pnpm install
104-
- run: node node_modules/puppeteer/install.mjs
105-
106-
- name: Run e2e tests
107-
run: pnpm run test-e2e-vapor
108-
10983
lint-and-test-dts:
11084
runs-on: ubuntu-latest
11185
env:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ TODOs.md
1111
dts-build/packages
1212
*.tsbuildinfo
1313
*.tgz
14-
packages-private/benchmark/reference

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414
"[json]": {
1515
"editor.defaultFormatter": "esbenp.prettier-vscode"
1616
},
17-
"editor.formatOnSave": true,
18-
"vitest.disableWorkspaceWarning": true
17+
"editor.formatOnSave": true
1918
}

eslint.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default tseslint.config(
106106

107107
// Packages targeting DOM
108108
{
109-
files: ['packages/{vue,vue-compat,runtime-dom,runtime-vapor}/**'],
109+
files: ['packages/{vue,vue-compat,runtime-dom}/**'],
110110
rules: {
111111
'no-restricted-globals': ['error', ...NodeGlobals],
112112
},
@@ -126,7 +126,6 @@ export default tseslint.config(
126126
files: [
127127
'packages-private/template-explorer/**',
128128
'packages-private/sfc-playground/**',
129-
'packages-private/local-playground/**',
130129
],
131130
rules: {
132131
'no-restricted-globals': ['error', ...NodeGlobals],
@@ -153,8 +152,6 @@ export default tseslint.config(
153152
'./*.{js,ts}',
154153
'packages/*/*.js',
155154
'packages/vue/*/*.js',
156-
'packages-private/benchmark/*',
157-
'packages-private/e2e-utils/*',
158155
],
159156
rules: {
160157
'no-restricted-globals': 'off',

package.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,16 @@
99
"build-dts": "tsc -p tsconfig.build.json --noCheck && rollup -c rollup.dts.config.js",
1010
"clean": "rimraf --glob packages/*/dist temp .eslintcache",
1111
"size": "run-s \"size-*\" && node scripts/usage-size.js",
12-
"size-global": "node scripts/build.js vue runtime-dom compiler-dom -f global -p --size",
12+
"size-global": "node scripts/build.js vue runtime-dom -f global -p --size",
1313
"size-esm-runtime": "node scripts/build.js vue -f esm-bundler-runtime",
14-
"size-esm": "node scripts/build.js runtime-shared runtime-dom runtime-core reactivity shared runtime-vapor -f esm-bundler",
14+
"size-esm": "node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler",
1515
"check": "tsc --incremental --noEmit",
1616
"lint": "eslint --cache .",
1717
"format": "prettier --write --cache .",
1818
"format-check": "prettier --check --cache .",
1919
"test": "vitest",
20-
"test-unit": "vitest --project unit --project unit-jsdom",
20+
"test-unit": "vitest --project unit",
2121
"test-e2e": "node scripts/build.js vue -f global -d && vitest --project e2e",
22-
"test-e2e-vapor": "pnpm run prepare-e2e-vapor && vitest --project e2e-vapor",
23-
"prepare-e2e-vapor": "node scripts/build.js -f cjs+esm-bundler+esm-bundler-runtime && pnpm run -C packages-private/vapor-e2e-test build",
2422
"test-dts": "run-s build-dts test-dts-only",
2523
"test-dts-only": "tsc -p packages-private/dts-built-test/tsconfig.json && tsc -p ./packages-private/dts-test/tsconfig.test.json",
2624
"test-coverage": "vitest run --project unit --coverage",
@@ -31,17 +29,19 @@
3129
"release": "node scripts/release.js",
3230
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
3331
"dev-esm": "node scripts/dev.js -if esm-bundler-runtime",
34-
"dev-prepare-cjs": "node scripts/prepare-cjs.js || node scripts/build.js -f cjs",
35-
"dev-compiler": "run-p \"dev template-explorer\" serve open",
36-
"dev-sfc": "run-s dev-prepare-cjs dev-sfc-run",
37-
"dev-sfc-serve": "vite packages-private/sfc-playground",
38-
"dev-sfc-run": "run-p \"dev compiler-sfc -f esm-browser\" \"dev vue -if esm-browser-vapor\" \"dev vue -ipf esm-browser-vapor\" \"dev server-renderer -if esm-bundler\" dev-sfc-serve",
39-
"dev-vapor": "pnpm -C packages-private/local-playground run dev",
32+
"dev-compiler": "run-p \"dev template-explorer\" serve",
33+
"dev-sfc": "run-s dev-sfc-prepare dev-sfc-run",
34+
"dev-sfc-prepare": "node scripts/pre-dev-sfc.js || npm run build-all-cjs",
35+
"dev-sfc-serve": "vite packages-private/sfc-playground --host",
36+
"dev-sfc-run": "run-p \"dev compiler-sfc -f esm-browser\" \"dev vue -if esm-bundler-runtime\" \"dev vue -ipf esm-browser-runtime\" \"dev server-renderer -if esm-bundler\" dev-sfc-serve",
4037
"serve": "serve",
4138
"open": "open http://localhost:3000/packages-private/template-explorer/local.html",
42-
"build-sfc-playground": "run-s build-sfc-deps build-sfc-playground-self",
43-
"build-sfc-deps": "node scripts/build.js -f ~global+global-runtime",
44-
"build-sfc-playground-self": "pnpm run -C packages-private/sfc-playground build",
39+
"build-sfc-playground": "run-s build-all-cjs build-runtime-esm build-browser-esm build-ssr-esm build-sfc-playground-self",
40+
"build-all-cjs": "node scripts/build.js vue runtime compiler reactivity shared -af cjs",
41+
"build-runtime-esm": "node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js vue -f esm-browser-runtime",
42+
"build-browser-esm": "node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler && node scripts/build.js vue -f esm-browser",
43+
"build-ssr-esm": "node scripts/build.js compiler-sfc server-renderer -f esm-browser",
44+
"build-sfc-playground-self": "cd packages-private/sfc-playground && npm run build",
4545
"preinstall": "npx only-allow pnpm",
4646
"postinstall": "simple-git-hooks"
4747
},
@@ -74,7 +74,6 @@
7474
"@types/node": "^22.16.0",
7575
"@types/semver": "^7.7.0",
7676
"@types/serve-handler": "^6.1.4",
77-
"@vitest/ui": "^3.0.2",
7877
"@vitest/coverage-v8": "^3.1.4",
7978
"@vitest/eslint-plugin": "^1.2.1",
8079
"@vue/consolidate": "1.0.0",

packages-private/benchmark/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages-private/benchmark/client/App.vue

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

0 commit comments

Comments
 (0)