Skip to content

Commit d028928

Browse files
authored
Merge branch 'main' into fix-slots-level
2 parents d57c4c8 + fab9917 commit d028928

File tree

144 files changed

+3244
-2229
lines changed

Some content is hidden

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

144 files changed

+3244
-2229
lines changed

.github/renovate.json5

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
{
22
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3-
extends: ['config:base', 'schedule:weekly', 'group:allNonMajor'],
3+
extends: ['config:recommended', 'schedule:weekly', 'group:allNonMajor'],
44
labels: ['dependencies'],
55
ignorePaths: ['**/__tests__/**'],
66
rangeStrategy: 'bump',
77
packageRules: [
88
{
9-
depTypeList: ['peerDependencies'],
9+
matchDepTypes: ['peerDependencies'],
1010
enabled: false,
1111
},
1212
{
1313
groupName: 'test',
14-
matchPackageNames: ['vitest', 'jsdom', 'puppeteer'],
15-
matchPackagePrefixes: ['@vitest'],
14+
matchPackageNames: ['vitest', 'jsdom', 'puppeteer', '@vitest{/,}**'],
1615
},
1716
{
1817
groupName: 'playground',
@@ -23,18 +22,28 @@
2322
},
2423
{
2524
groupName: 'compiler',
26-
matchPackageNames: ['magic-string'],
27-
matchPackagePrefixes: ['@babel', 'postcss'],
25+
matchPackageNames: ['magic-string', '@babel{/,}**', 'postcss{/,}**'],
2826
},
2927
{
3028
groupName: 'build',
31-
matchPackageNames: ['vite', '@swc/core'],
32-
matchPackagePrefixes: ['rollup', 'esbuild', '@rollup', '@vitejs'],
29+
matchPackageNames: [
30+
'vite',
31+
'@swc/core',
32+
'rollup{/,}**',
33+
'esbuild{/,}**',
34+
'@rollup{/,}**',
35+
'@vitejs{/,}**',
36+
],
3337
},
3438
{
3539
groupName: 'lint',
36-
matchPackageNames: ['simple-git-hooks', 'lint-staged'],
37-
matchPackagePrefixes: ['typescript-eslint', 'eslint', 'prettier'],
40+
matchPackageNames: [
41+
'simple-git-hooks',
42+
'lint-staged',
43+
'typescript-eslint{/,}**',
44+
'eslint{/,}**',
45+
'prettier{/,}**',
46+
],
3847
},
3948
],
4049
ignoreDeps: [

.github/workflows/close-cant-reproduce-issues.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99

1010
jobs:
1111
close-issues:
12-
if: github.repository == 'vuejs/core-vapor'
12+
if: github.repository == 'vuejs/vue-vapor'
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: can't reproduce

.github/workflows/lock-closed-issues.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99

1010
jobs:
1111
action:
12-
if: github.repository == 'vuejs/core-vapor'
12+
if: github.repository == 'vuejs/vue-vapor'
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: dessant/lock-threads@v5

.github/workflows/size-data.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818

1919
jobs:
2020
upload:
21-
if: github.repository == 'vuejs/core-vapor'
21+
if: github.repository == 'vuejs/vue-vapor'
2222
runs-on: ubuntu-latest
2323

2424
steps:

.github/workflows/size-report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
size-report:
1919
runs-on: ubuntu-latest
2020
if: >
21-
github.repository == 'vuejs/core-vapor' &&
21+
github.repository == 'vuejs/vue-vapor' &&
2222
github.event.workflow_run.event == 'pull_request' &&
2323
github.event.workflow_run.conclusion == 'success'
2424
steps:

.github/workflows/test.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ jobs:
5555
run: pnpm run test-dts
5656

5757
continuous-release:
58-
if: github.repository == 'vuejs/core-vapor'
58+
if: github.repository == 'vuejs/vue-vapor'
5959
runs-on: ubuntu-latest
60-
needs: [unit-test, lint-and-test-dts]
6160
permissions:
6261
contents: read
6362
id-token: write

CHANGELOG.md

+80
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,83 @@
1+
## [3.5.12](https://github.com/vuejs/core/compare/v3.5.11...v3.5.12) (2024-10-11)
2+
3+
4+
### Bug Fixes
5+
6+
* **compiler-dom:** avoid stringify option with null value ([#12096](https://github.com/vuejs/core/issues/12096)) ([f6d9926](https://github.com/vuejs/core/commit/f6d99262364b7444ebab8742158599e8cdd79eaa)), closes [#12093](https://github.com/vuejs/core/issues/12093)
7+
* **compiler-sfc:** do not skip TSInstantiationExpression when transforming props destructure ([#12064](https://github.com/vuejs/core/issues/12064)) ([d3ecde8](https://github.com/vuejs/core/commit/d3ecde8a696ff62c8d0ab067fd1d7ee0565b63c5))
8+
* **compiler-sfc:** use sass modern api if available and avoid deprecation warning ([#11992](https://github.com/vuejs/core/issues/11992)) ([4474c11](https://github.com/vuejs/core/commit/4474c113d1fb1c26298dd6794275d5b5c7cc4d93))
9+
* **compiler:** clone loc to `ifNode` ([#12131](https://github.com/vuejs/core/issues/12131)) ([cde2c06](https://github.com/vuejs/core/commit/cde2c0671b00d4f6111fcbd7aa76e45872f20b0c)), closes [vuejs/language-tools#4911](https://github.com/vuejs/language-tools/issues/4911)
10+
* **custom-element:** properly remove hyphenated attribute ([#12143](https://github.com/vuejs/core/issues/12143)) ([e16e9a7](https://github.com/vuejs/core/commit/e16e9a7341e7cfb3c443da4e5e5b06e8158712c3)), closes [#12139](https://github.com/vuejs/core/issues/12139)
11+
* **defineModel:** handle kebab-case model correctly ([#12063](https://github.com/vuejs/core/issues/12063)) ([c0418a3](https://github.com/vuejs/core/commit/c0418a3b8fa96a0b108ab71b7aab5d3388f90557)), closes [#12060](https://github.com/vuejs/core/issues/12060)
12+
* **deps:** update dependency monaco-editor to ^0.52.0 ([#12119](https://github.com/vuejs/core/issues/12119)) ([f7cbea2](https://github.com/vuejs/core/commit/f7cbea2111c7770a180b640f36f6a5d4d6abc698))
13+
* **hydration:** provide compat fallback for idle callback hydration strategy ([#11935](https://github.com/vuejs/core/issues/11935)) ([1ae545a](https://github.com/vuejs/core/commit/1ae545a3786abef983be1c969726489685569c92))
14+
* **reactivity:** trigger reactivity for Map key `undefined` ([#12055](https://github.com/vuejs/core/issues/12055)) ([7ad289e](https://github.com/vuejs/core/commit/7ad289e1e7fea654524008ff91e43a8b8a55ef22)), closes [#12054](https://github.com/vuejs/core/issues/12054)
15+
* **runtime-core:** allow symbol values for slot prop key ([#12069](https://github.com/vuejs/core/issues/12069)) ([d9d4d4e](https://github.com/vuejs/core/commit/d9d4d4e158cd51a9ddda249f29de8467f60b2792)), closes [#12068](https://github.com/vuejs/core/issues/12068)
16+
* **runtime-core:** fix required prop check false positive for kebab-case edge cases ([#12034](https://github.com/vuejs/core/issues/12034)) ([9da1ac1](https://github.com/vuejs/core/commit/9da1ac156552ac449754e1373aac7e349841becb)), closes [#12011](https://github.com/vuejs/core/issues/12011)
17+
* **runtime-dom:** prevent unnecessary updates in v-model checkbox when value is unchanged ([#12146](https://github.com/vuejs/core/issues/12146)) ([ea943af](https://github.com/vuejs/core/commit/ea943afe404c4ca4b729906c5e8daf7aa2ccde9b)), closes [#12144](https://github.com/vuejs/core/issues/12144)
18+
* **teleport:** handle disabled teleport with updateCssVars ([#12113](https://github.com/vuejs/core/issues/12113)) ([76a8223](https://github.com/vuejs/core/commit/76a8223199c148b79a5c0ea19e235164809760cd)), closes [#12112](https://github.com/vuejs/core/issues/12112)
19+
* **transition/ssr:** make transition appear work with Suspense in SSR ([#12047](https://github.com/vuejs/core/issues/12047)) ([f1a4f67](https://github.com/vuejs/core/commit/f1a4f67aedfe83e440c54222213f070774faa421)), closes [#12046](https://github.com/vuejs/core/issues/12046)
20+
* **types:** ensure `this.$props` type does not include `string` ([#12123](https://github.com/vuejs/core/issues/12123)) ([704173e](https://github.com/vuejs/core/commit/704173e24276706de672cca6c9507e4dd9651197)), closes [#12122](https://github.com/vuejs/core/issues/12122)
21+
* **types:** retain union type narrowing with defaults applied ([#12108](https://github.com/vuejs/core/issues/12108)) ([05685a9](https://github.com/vuejs/core/commit/05685a9d7c42d4cd37169b867833776b91154fed)), closes [#12106](https://github.com/vuejs/core/issues/12106)
22+
* **useId:** ensure useId consistency when using serverPrefetch ([#12128](https://github.com/vuejs/core/issues/12128)) ([b4d3534](https://github.com/vuejs/core/commit/b4d35349d8bc39aa15bd3f1094d230e5928b177c)), closes [#12102](https://github.com/vuejs/core/issues/12102)
23+
* **watch:** watchEffect clean-up with SSR ([#12097](https://github.com/vuejs/core/issues/12097)) ([b094c72](https://github.com/vuejs/core/commit/b094c72b3d40c52c7124f145a9db028509a11202)), closes [#11956](https://github.com/vuejs/core/issues/11956)
24+
25+
26+
### Performance Improvements
27+
28+
* **reactivity:** avoid unnecessary recursion in removeSub ([#12135](https://github.com/vuejs/core/issues/12135)) ([ec917cf](https://github.com/vuejs/core/commit/ec917cfdb9d0169cd0835d3a0e28244242657dc9))
29+
30+
31+
32+
## [3.5.11](https://github.com/vuejs/core/compare/v3.5.10...v3.5.11) (2024-10-03)
33+
34+
35+
### Bug Fixes
36+
37+
* **compiler-sfc:** do not skip `TSSatisfiesExpression` when transforming props destructure ([#12062](https://github.com/vuejs/core/issues/12062)) ([2328b05](https://github.com/vuejs/core/commit/2328b051f4efa1f1394b7d4e73b7c3f76e430e7c)), closes [#12061](https://github.com/vuejs/core/issues/12061)
38+
* **reactivity:** prevent overwriting `next` property during batch processing ([#12075](https://github.com/vuejs/core/issues/12075)) ([d3f5e6e](https://github.com/vuejs/core/commit/d3f5e6e5319b4ffaa55ca9a2ea3d95d78e76fa58)), closes [#12072](https://github.com/vuejs/core/issues/12072)
39+
* **scheduler:** job ordering when the post queue is flushing ([#12090](https://github.com/vuejs/core/issues/12090)) ([577edca](https://github.com/vuejs/core/commit/577edca8e7795436efd710d1c289ea8ea2642b0e))
40+
* **types:** correctly infer `TypeProps` when it is `any` ([#12073](https://github.com/vuejs/core/issues/12073)) ([57315ab](https://github.com/vuejs/core/commit/57315ab9688c9741a271d1075bbd28cbe5f71e2f)), closes [#12058](https://github.com/vuejs/core/issues/12058)
41+
* **types:** should not intersect `PublicProps` with `Props` ([#12077](https://github.com/vuejs/core/issues/12077)) ([6f85894](https://github.com/vuejs/core/commit/6f8589437635706f825ccec51800effba1d2bf5f))
42+
* **types:** infer the first generic type of `Ref` correctly ([#12094](https://github.com/vuejs/core/issues/12094)) ([c97bb84](https://github.com/vuejs/core/commit/c97bb84d0b0a16b012f886b6498e924415ed63e5))
43+
44+
45+
46+
## [3.5.10](https://github.com/vuejs/core/compare/v3.5.9...v3.5.10) (2024-09-27)
47+
48+
49+
### Bug Fixes
50+
51+
* **custom-element:** properly set kebab-case props on Vue custom elements ([ea3efa0](https://github.com/vuejs/core/commit/ea3efa09e008918c1d9ba7226833a8b1a7a57244)), closes [#12030](https://github.com/vuejs/core/issues/12030) [#12032](https://github.com/vuejs/core/issues/12032)
52+
* **reactivity:** fix nested batch edge case ([93c95dd](https://github.com/vuejs/core/commit/93c95dd4cd416503f43a98a1455f62658d22b0b2))
53+
* **reactivity:** only clear notified flags for computed in first batch iteration ([aa9ef23](https://github.com/vuejs/core/commit/aa9ef2386a0cd39a174e5a887ec2b1a3525034fc)), closes [#12045](https://github.com/vuejs/core/issues/12045)
54+
* **types/ref:** handle nested refs in UnwrapRef ([#12049](https://github.com/vuejs/core/issues/12049)) ([e2c19c2](https://github.com/vuejs/core/commit/e2c19c20cfee9788519a80c0e53e216b78505994)), closes [#12044](https://github.com/vuejs/core/issues/12044)
55+
56+
57+
58+
## [3.5.9](https://github.com/vuejs/core/compare/v3.5.8...v3.5.9) (2024-09-26)
59+
60+
61+
### Bug Fixes
62+
63+
* **reactivity:** fix property dep removal regression ([6001e5c](https://github.com/vuejs/core/commit/6001e5c81a05c894586f9287fbd991677bdd0455)), closes [#12020](https://github.com/vuejs/core/issues/12020) [#12021](https://github.com/vuejs/core/issues/12021)
64+
* **reactivity:** fix recursive sync watcher on computed edge case ([10ff159](https://github.com/vuejs/core/commit/10ff15924053d9bd95ad706f78ce09e288213fcf)), closes [#12033](https://github.com/vuejs/core/issues/12033) [#12037](https://github.com/vuejs/core/issues/12037)
65+
* **runtime-core:** avoid rendering plain object as VNode ([#12038](https://github.com/vuejs/core/issues/12038)) ([cb34b28](https://github.com/vuejs/core/commit/cb34b28a4a9bf868be4785b001c526163eda342e)), closes [#12035](https://github.com/vuejs/core/issues/12035) [vitejs/vite-plugin-vue#353](https://github.com/vitejs/vite-plugin-vue/issues/353)
66+
* **runtime-core:** make useId() always return a string ([a177092](https://github.com/vuejs/core/commit/a177092754642af2f98c33a4feffe8f198c3c950))
67+
* **types:** correct type inference of union event names ([#12022](https://github.com/vuejs/core/issues/12022)) ([4da6881](https://github.com/vuejs/core/commit/4da688141d9e7c15b622c289deaa81b11845b2c7))
68+
* **vue:** properly cache runtime compilation ([#12019](https://github.com/vuejs/core/issues/12019)) ([fa0ba24](https://github.com/vuejs/core/commit/fa0ba24b3ace02d7ecab65e57c2bea89a2550dcb))
69+
70+
71+
72+
## [3.5.8](https://github.com/vuejs/core/compare/v3.5.7...v3.5.8) (2024-09-22)
73+
74+
75+
### Bug Fixes
76+
77+
* **reactivity:** do not remove dep from depsMap when cleaning up deps of computed ([#11995](https://github.com/vuejs/core/issues/11995)) ([0267a58](https://github.com/vuejs/core/commit/0267a588017eee4951ac2a877fe1ccae84cad905))
78+
79+
80+
181
## [3.5.7](https://github.com/vuejs/core/compare/v3.5.6...v3.5.7) (2024-09-20)
282

383

benchmark/client/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ const swapRows = wrap('swap', () => {
7272
async function bench() {
7373
for (let i = 0; i < 30; i++) {
7474
rows.value = []
75-
await defer()
7675
await runLots()
76+
await defer()
7777
}
7878
}
7979

benchmark/client/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
</style>
1212
</head>
13-
<body>
13+
<body class="done">
1414
<div id="app"></div>
1515
<script type="module" src="./index.ts"></script>
1616
</body>

benchmark/client/profiling.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/* eslint-disable no-restricted-syntax */
33
/* eslint-disable no-restricted-globals */
44

5+
import { nextTick } from '@vue/vapor'
6+
57
declare namespace globalThis {
68
let doProfile: boolean
79
let reactivity: boolean
@@ -29,13 +31,13 @@ export function wrap(
2931
document.body.classList.remove('done')
3032

3133
const { doProfile } = globalThis
32-
await defer()
34+
await nextTick()
3335

3436
doProfile && console.profile(id)
3537
const start = performance.now()
3638
fn(...args)
3739

38-
await defer()
40+
await nextTick()
3941
let time: number
4042
if (globalThis.reactivity) {
4143
time = performance.measure(

benchmark/index.js

+53-17
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import sirv from 'sirv'
99
import { launch } from 'puppeteer'
1010
import colors from 'picocolors'
1111
import { exec, getSha } from '../scripts/utils.js'
12+
import process from 'node:process'
13+
import readline from 'node:readline'
1214

1315
// Thanks to https://github.com/krausest/js-framework-benchmark (Apache-2.0 license)
1416
const {
@@ -20,6 +22,7 @@ const {
2022
noVapor,
2123
port: portStr,
2224
count: countStr,
25+
warmupCount: warmupCountStr,
2326
noHeadless,
2427
devBuild,
2528
},
@@ -29,7 +32,7 @@ const {
2932
options: {
3033
skipLib: {
3134
type: 'boolean',
32-
short: 'v',
35+
short: 'l',
3336
},
3437
skipApp: {
3538
type: 'boolean',
@@ -56,6 +59,11 @@ const {
5659
short: 'c',
5760
default: '30',
5861
},
62+
warmupCount: {
63+
type: 'string',
64+
short: 'w',
65+
default: '5',
66+
},
5967
noHeadless: {
6068
type: 'boolean',
6169
},
@@ -68,6 +76,7 @@ const {
6876

6977
const port = +(/** @type {string}*/ (portStr))
7078
const count = +(/** @type {string}*/ (countStr))
79+
const warmupCount = +(/** @type {string}*/ (warmupCountStr))
7180
const sha = await getSha(true)
7281

7382
if (!skipLib) {
@@ -226,22 +235,11 @@ async function doBench(browser, isVapor) {
226235
await forceGC()
227236
const t = performance.now()
228237

229-
for (let i = 0; i < count; i++) {
230-
await clickButton('run') // test: create rows
231-
await clickButton('update') // partial update
232-
await clickButton('swaprows') // swap rows
233-
await select() // test: select row, remove row
234-
await clickButton('clear') // clear rows
235-
236-
await withoutRecord(() => clickButton('run'))
237-
await clickButton('add') // append rows to large table
238-
239-
await withoutRecord(() => clickButton('clear'))
240-
await clickButton('runLots') // create many rows
241-
await withoutRecord(() => clickButton('clear'))
238+
console.log('warmup run')
239+
await eachRun(() => withoutRecord(benchOnce), warmupCount)
242240

243-
// TODO replace all rows
244-
}
241+
console.log('benchmark run')
242+
await eachRun(benchOnce, count)
245243

246244
console.info(
247245
'Total time:',
@@ -261,6 +259,23 @@ async function doBench(browser, isVapor) {
261259
await page.close()
262260
return result
263261

262+
async function benchOnce() {
263+
await clickButton('run') // test: create rows
264+
await clickButton('update') // partial update
265+
await clickButton('swaprows') // swap rows
266+
await select() // test: select row, remove row
267+
await clickButton('clear') // clear rows
268+
269+
await withoutRecord(() => clickButton('run'))
270+
await clickButton('add') // append rows to large table
271+
272+
await withoutRecord(() => clickButton('clear'))
273+
await clickButton('runLots') // create many rows
274+
await withoutRecord(() => clickButton('clear'))
275+
276+
// TODO replace all rows
277+
}
278+
264279
function getTimes() {
265280
return page.evaluate(() => /** @type {any} */ (globalThis).times)
266281
}
@@ -273,9 +288,13 @@ async function doBench(browser, isVapor) {
273288

274289
/** @param {() => any} fn */
275290
async function withoutRecord(fn) {
291+
const currentRecordTime = await page.evaluate(() => globalThis.recordTime)
276292
await page.evaluate(() => (globalThis.recordTime = false))
277293
await fn()
278-
await page.evaluate(() => (globalThis.recordTime = true))
294+
await page.evaluate(
295+
currentRecordTime => (globalThis.recordTime = currentRecordTime),
296+
currentRecordTime,
297+
)
279298
}
280299

281300
/** @param {string} id */
@@ -298,6 +317,23 @@ async function doBench(browser, isVapor) {
298317
}
299318
}
300319

320+
/**
321+
* @param {Function} bench
322+
* @param {number} count
323+
*/
324+
async function eachRun(bench, count) {
325+
for (let i = 0; i < count; i++) {
326+
readline.cursorTo(process.stdout, 0)
327+
readline.clearLine(process.stdout, 0)
328+
process.stdout.write(`${i + 1}/${count}`)
329+
await bench()
330+
}
331+
if (count === 0) {
332+
process.stdout.write('0/0 (skip)')
333+
}
334+
process.stdout.write('\n')
335+
}
336+
301337
async function initBrowser() {
302338
const disableFeatures = [
303339
'Translate', // avoid translation popups

benchmark/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@vitejs/plugin-vue": "https://pkg.pr.new/@vitejs/plugin-vue@e3c5ce5",
1313
"connect": "^3.7.0",
1414
"sirv": "^2.0.4",
15-
"vite": "^5.0.12"
15+
"vite": "catalog:"
1616
},
1717
"devDependencies": {
1818
"@types/connect": "^3.4.38",

eslint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import importX from 'eslint-plugin-import-x'
22
import tseslint from 'typescript-eslint'
3-
import vitest from 'eslint-plugin-vitest'
3+
import vitest from '@vitest/eslint-plugin'
44
import { builtinModules } from 'node:module'
55

66
const DOMGlobals = ['window', 'document']

0 commit comments

Comments
 (0)