Skip to content

Commit

Permalink
Merge branch 'main' into fix-slots-level
Browse files Browse the repository at this point in the history
  • Loading branch information
Doctor-wu authored Nov 13, 2024
2 parents d57c4c8 + fab9917 commit d028928
Show file tree
Hide file tree
Showing 144 changed files with 3,244 additions and 2,229 deletions.
29 changes: 19 additions & 10 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: ['config:base', 'schedule:weekly', 'group:allNonMajor'],
extends: ['config:recommended', 'schedule:weekly', 'group:allNonMajor'],
labels: ['dependencies'],
ignorePaths: ['**/__tests__/**'],
rangeStrategy: 'bump',
packageRules: [
{
depTypeList: ['peerDependencies'],
matchDepTypes: ['peerDependencies'],
enabled: false,
},
{
groupName: 'test',
matchPackageNames: ['vitest', 'jsdom', 'puppeteer'],
matchPackagePrefixes: ['@vitest'],
matchPackageNames: ['vitest', 'jsdom', 'puppeteer', '@vitest{/,}**'],
},
{
groupName: 'playground',
Expand All @@ -23,18 +22,28 @@
},
{
groupName: 'compiler',
matchPackageNames: ['magic-string'],
matchPackagePrefixes: ['@babel', 'postcss'],
matchPackageNames: ['magic-string', '@babel{/,}**', 'postcss{/,}**'],
},
{
groupName: 'build',
matchPackageNames: ['vite', '@swc/core'],
matchPackagePrefixes: ['rollup', 'esbuild', '@rollup', '@vitejs'],
matchPackageNames: [
'vite',
'@swc/core',
'rollup{/,}**',
'esbuild{/,}**',
'@rollup{/,}**',
'@vitejs{/,}**',
],
},
{
groupName: 'lint',
matchPackageNames: ['simple-git-hooks', 'lint-staged'],
matchPackagePrefixes: ['typescript-eslint', 'eslint', 'prettier'],
matchPackageNames: [
'simple-git-hooks',
'lint-staged',
'typescript-eslint{/,}**',
'eslint{/,}**',
'prettier{/,}**',
],
},
],
ignoreDeps: [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-cant-reproduce-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
close-issues:
if: github.repository == 'vuejs/core-vapor'
if: github.repository == 'vuejs/vue-vapor'
runs-on: ubuntu-latest
steps:
- name: can't reproduce
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock-closed-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
action:
if: github.repository == 'vuejs/core-vapor'
if: github.repository == 'vuejs/vue-vapor'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/size-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
upload:
if: github.repository == 'vuejs/core-vapor'
if: github.repository == 'vuejs/vue-vapor'
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/size-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
size-report:
runs-on: ubuntu-latest
if: >
github.repository == 'vuejs/core-vapor' &&
github.repository == 'vuejs/vue-vapor' &&
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ jobs:
run: pnpm run test-dts

continuous-release:
if: github.repository == 'vuejs/core-vapor'
if: github.repository == 'vuejs/vue-vapor'
runs-on: ubuntu-latest
needs: [unit-test, lint-and-test-dts]
permissions:
contents: read
id-token: write
Expand Down
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
## [3.5.12](https://github.com/vuejs/core/compare/v3.5.11...v3.5.12) (2024-10-11)


### Bug Fixes

* **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)
* **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))
* **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))
* **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)
* **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)
* **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)
* **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))
* **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))
* **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)
* **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)
* **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)
* **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)
* **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)
* **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)
* **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)
* **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)
* **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)
* **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)


### Performance Improvements

* **reactivity:** avoid unnecessary recursion in removeSub ([#12135](https://github.com/vuejs/core/issues/12135)) ([ec917cf](https://github.com/vuejs/core/commit/ec917cfdb9d0169cd0835d3a0e28244242657dc9))



## [3.5.11](https://github.com/vuejs/core/compare/v3.5.10...v3.5.11) (2024-10-03)


### Bug Fixes

* **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)
* **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)
* **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))
* **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)
* **types:** should not intersect `PublicProps` with `Props` ([#12077](https://github.com/vuejs/core/issues/12077)) ([6f85894](https://github.com/vuejs/core/commit/6f8589437635706f825ccec51800effba1d2bf5f))
* **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))



## [3.5.10](https://github.com/vuejs/core/compare/v3.5.9...v3.5.10) (2024-09-27)


### Bug Fixes

* **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)
* **reactivity:** fix nested batch edge case ([93c95dd](https://github.com/vuejs/core/commit/93c95dd4cd416503f43a98a1455f62658d22b0b2))
* **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)
* **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)



## [3.5.9](https://github.com/vuejs/core/compare/v3.5.8...v3.5.9) (2024-09-26)


### Bug Fixes

* **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)
* **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)
* **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)
* **runtime-core:** make useId() always return a string ([a177092](https://github.com/vuejs/core/commit/a177092754642af2f98c33a4feffe8f198c3c950))
* **types:** correct type inference of union event names ([#12022](https://github.com/vuejs/core/issues/12022)) ([4da6881](https://github.com/vuejs/core/commit/4da688141d9e7c15b622c289deaa81b11845b2c7))
* **vue:** properly cache runtime compilation ([#12019](https://github.com/vuejs/core/issues/12019)) ([fa0ba24](https://github.com/vuejs/core/commit/fa0ba24b3ace02d7ecab65e57c2bea89a2550dcb))



## [3.5.8](https://github.com/vuejs/core/compare/v3.5.7...v3.5.8) (2024-09-22)


### Bug Fixes

* **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))



## [3.5.7](https://github.com/vuejs/core/compare/v3.5.6...v3.5.7) (2024-09-20)


Expand Down
2 changes: 1 addition & 1 deletion benchmark/client/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const swapRows = wrap('swap', () => {
async function bench() {
for (let i = 0; i < 30; i++) {
rows.value = []
await defer()
await runLots()
await defer()
}
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
</style>
</head>
<body>
<body class="done">
<div id="app"></div>
<script type="module" src="./index.ts"></script>
</body>
Expand Down
6 changes: 4 additions & 2 deletions benchmark/client/profiling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* eslint-disable no-restricted-syntax */
/* eslint-disable no-restricted-globals */

import { nextTick } from '@vue/vapor'

declare namespace globalThis {
let doProfile: boolean
let reactivity: boolean
Expand Down Expand Up @@ -29,13 +31,13 @@ export function wrap(
document.body.classList.remove('done')

const { doProfile } = globalThis
await defer()
await nextTick()

doProfile && console.profile(id)
const start = performance.now()
fn(...args)

await defer()
await nextTick()
let time: number
if (globalThis.reactivity) {
time = performance.measure(
Expand Down
70 changes: 53 additions & 17 deletions benchmark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import sirv from 'sirv'
import { launch } from 'puppeteer'
import colors from 'picocolors'
import { exec, getSha } from '../scripts/utils.js'
import process from 'node:process'
import readline from 'node:readline'

// Thanks to https://github.com/krausest/js-framework-benchmark (Apache-2.0 license)
const {
Expand All @@ -20,6 +22,7 @@ const {
noVapor,
port: portStr,
count: countStr,
warmupCount: warmupCountStr,
noHeadless,
devBuild,
},
Expand All @@ -29,7 +32,7 @@ const {
options: {
skipLib: {
type: 'boolean',
short: 'v',
short: 'l',
},
skipApp: {
type: 'boolean',
Expand All @@ -56,6 +59,11 @@ const {
short: 'c',
default: '30',
},
warmupCount: {
type: 'string',
short: 'w',
default: '5',
},
noHeadless: {
type: 'boolean',
},
Expand All @@ -68,6 +76,7 @@ const {

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

if (!skipLib) {
Expand Down Expand Up @@ -226,22 +235,11 @@ async function doBench(browser, isVapor) {
await forceGC()
const t = performance.now()

for (let i = 0; i < count; i++) {
await clickButton('run') // test: create rows
await clickButton('update') // partial update
await clickButton('swaprows') // swap rows
await select() // test: select row, remove row
await clickButton('clear') // clear rows

await withoutRecord(() => clickButton('run'))
await clickButton('add') // append rows to large table

await withoutRecord(() => clickButton('clear'))
await clickButton('runLots') // create many rows
await withoutRecord(() => clickButton('clear'))
console.log('warmup run')
await eachRun(() => withoutRecord(benchOnce), warmupCount)

// TODO replace all rows
}
console.log('benchmark run')
await eachRun(benchOnce, count)

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

async function benchOnce() {
await clickButton('run') // test: create rows
await clickButton('update') // partial update
await clickButton('swaprows') // swap rows
await select() // test: select row, remove row
await clickButton('clear') // clear rows

await withoutRecord(() => clickButton('run'))
await clickButton('add') // append rows to large table

await withoutRecord(() => clickButton('clear'))
await clickButton('runLots') // create many rows
await withoutRecord(() => clickButton('clear'))

// TODO replace all rows
}

function getTimes() {
return page.evaluate(() => /** @type {any} */ (globalThis).times)
}
Expand All @@ -273,9 +288,13 @@ async function doBench(browser, isVapor) {

/** @param {() => any} fn */
async function withoutRecord(fn) {
const currentRecordTime = await page.evaluate(() => globalThis.recordTime)
await page.evaluate(() => (globalThis.recordTime = false))
await fn()
await page.evaluate(() => (globalThis.recordTime = true))
await page.evaluate(
currentRecordTime => (globalThis.recordTime = currentRecordTime),
currentRecordTime,
)
}

/** @param {string} id */
Expand All @@ -298,6 +317,23 @@ async function doBench(browser, isVapor) {
}
}

/**
* @param {Function} bench
* @param {number} count
*/
async function eachRun(bench, count) {
for (let i = 0; i < count; i++) {
readline.cursorTo(process.stdout, 0)
readline.clearLine(process.stdout, 0)
process.stdout.write(`${i + 1}/${count}`)
await bench()
}
if (count === 0) {
process.stdout.write('0/0 (skip)')
}
process.stdout.write('\n')
}

async function initBrowser() {
const disableFeatures = [
'Translate', // avoid translation popups
Expand Down
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@vitejs/plugin-vue": "https://pkg.pr.new/@vitejs/plugin-vue@e3c5ce5",
"connect": "^3.7.0",
"sirv": "^2.0.4",
"vite": "^5.0.12"
"vite": "catalog:"
},
"devDependencies": {
"@types/connect": "^3.4.38",
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import importX from 'eslint-plugin-import-x'
import tseslint from 'typescript-eslint'
import vitest from 'eslint-plugin-vitest'
import vitest from '@vitest/eslint-plugin'
import { builtinModules } from 'node:module'

const DOMGlobals = ['window', 'document']
Expand Down
Loading

0 comments on commit d028928

Please sign in to comment.