Skip to content

Commit bd25703

Browse files
Merge branch 'main' into fix-toRaw-readolny-type
2 parents 0cae446 + 9fa8241 commit bd25703

Some content is hidden

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

59 files changed

+1791
-592
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,31 @@ jobs:
5858
- name: Run ssr unit tests
5959
run: pnpm run test-unit server-renderer
6060

61+
benchmarks:
62+
runs-on: ubuntu-latest
63+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
64+
env:
65+
PUPPETEER_SKIP_DOWNLOAD: 'true'
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Install pnpm
70+
uses: pnpm/action-setup@v2
71+
72+
- name: Install Node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version-file: '.node-version'
76+
cache: 'pnpm'
77+
78+
- run: pnpm install
79+
80+
- name: Run benchmarks
81+
uses: CodSpeedHQ/action@v2
82+
with:
83+
run: pnpm vitest bench --run
84+
token: ${{ secrets.CODSPEED_TOKEN }}
85+
6186
e2e-test:
6287
runs-on: ubuntu-latest
6388
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1+
## [3.3.13](https://github.com/vuejs/core/compare/v3.3.12...v3.3.13) (2023-12-19)
2+
3+
4+
### Bug Fixes
5+
6+
* **compiler-core:** fix v-on with modifiers on inline expression of undefined ([#9866](https://github.com/vuejs/core/issues/9866)) ([bae79dd](https://github.com/vuejs/core/commit/bae79ddf8564a2da4a5365cfeb8d811990f42335)), closes [#9865](https://github.com/vuejs/core/issues/9865)
7+
* **runtime-dom:** cache event handlers by key/modifiers ([#9851](https://github.com/vuejs/core/issues/9851)) ([04d2c05](https://github.com/vuejs/core/commit/04d2c05054c26b02fbc1d84839b0ed5cd36455b6)), closes [#9849](https://github.com/vuejs/core/issues/9849)
8+
* **types:** extract properties from extended collections ([#9854](https://github.com/vuejs/core/issues/9854)) ([24b1c1d](https://github.com/vuejs/core/commit/24b1c1dd57fd55d998aa231a147500e010b10219)), closes [#9852](https://github.com/vuejs/core/issues/9852)
9+
10+
11+
12+
## [3.3.12](https://github.com/vuejs/core/compare/v3.3.11...v3.3.12) (2023-12-16)
13+
14+
15+
### Bug Fixes
16+
17+
* **hydration:** handle appear transition before patch props ([#9837](https://github.com/vuejs/core/issues/9837)) ([e70f4c4](https://github.com/vuejs/core/commit/e70f4c47c553b6e16d8fad70743271ca23802fe7)), closes [#9832](https://github.com/vuejs/core/issues/9832)
18+
* **sfc/cssVars:** fix loss of CSS v-bind variables when setting inline style with string value ([#9824](https://github.com/vuejs/core/issues/9824)) ([0a387df](https://github.com/vuejs/core/commit/0a387dfb1d04afb6eae4296b6da76dfdaca77af4)), closes [#9821](https://github.com/vuejs/core/issues/9821)
19+
* **ssr:** fix suspense hydration of fallback content ([#7188](https://github.com/vuejs/core/issues/7188)) ([60415b5](https://github.com/vuejs/core/commit/60415b5d67df55f1fd6b176615299c08640fa142))
20+
* **types:** add `xmlns:xlink` to `SVGAttributes` ([#9300](https://github.com/vuejs/core/issues/9300)) ([0d61b42](https://github.com/vuejs/core/commit/0d61b429ecf63591d31e09702058fa4c7132e1a7)), closes [#9299](https://github.com/vuejs/core/issues/9299)
21+
* **types:** fix `shallowRef` type error ([#9839](https://github.com/vuejs/core/issues/9839)) ([9a57158](https://github.com/vuejs/core/commit/9a571582b53220270e498d8712ea59312c0bef3a))
22+
* **types:** support for generic keyof slots ([#8374](https://github.com/vuejs/core/issues/8374)) ([213eba4](https://github.com/vuejs/core/commit/213eba479ce080efc1053fe636f6be4a4c889b44))
23+
24+
25+
26+
## [3.3.11](https://github.com/vuejs/core/compare/v3.3.10...v3.3.11) (2023-12-08)
27+
28+
29+
### Bug Fixes
30+
31+
* **custom-element:** correctly handle number type props in prod ([#8989](https://github.com/vuejs/core/issues/8989)) ([d74d364](https://github.com/vuejs/core/commit/d74d364d62db8e48881af6b5a75ce4fb5f36cc35))
32+
* **reactivity:** fix mutation on user proxy of reactive Array ([6ecbd5c](https://github.com/vuejs/core/commit/6ecbd5ce2a7f59314a8326a1d193874b87f4d8c8)), closes [#9742](https://github.com/vuejs/core/issues/9742) [#9751](https://github.com/vuejs/core/issues/9751) [#9750](https://github.com/vuejs/core/issues/9750)
33+
* **runtime-dom:** fix width and height prop check condition ([5b00286](https://github.com/vuejs/core/commit/5b002869c533220706f9788b496b8ca8d8e98609)), closes [#9762](https://github.com/vuejs/core/issues/9762)
34+
* **shared:** handle Map with symbol keys in toDisplayString ([#9731](https://github.com/vuejs/core/issues/9731)) ([364821d](https://github.com/vuejs/core/commit/364821d6bdb1775e2f55a69bcfb9f40f7acf1506)), closes [#9727](https://github.com/vuejs/core/issues/9727)
35+
* **shared:** handle more Symbol cases in toDisplayString ([983d45d](https://github.com/vuejs/core/commit/983d45d4f8eb766b5a16b7ea93b86d3c51618fa6))
36+
* **Suspense:** properly get anchor when mount fallback vnode ([#9770](https://github.com/vuejs/core/issues/9770)) ([b700328](https://github.com/vuejs/core/commit/b700328342e17dc16b19316c2e134a26107139d2)), closes [#9769](https://github.com/vuejs/core/issues/9769)
37+
* **types:** ref() return type should not be any when initial value is any ([#9768](https://github.com/vuejs/core/issues/9768)) ([cdac121](https://github.com/vuejs/core/commit/cdac12161ec27b45ded48854c3d749664b6d4a6d))
38+
* **watch:** should not fire pre watcher on child component unmount ([#7181](https://github.com/vuejs/core/issues/7181)) ([6784f0b](https://github.com/vuejs/core/commit/6784f0b1f8501746ea70d87d18ed63a62cf6b76d)), closes [#7030](https://github.com/vuejs/core/issues/7030)
39+
40+
41+
142
## [3.3.10](https://github.com/vuejs/core/compare/v3.3.9...v3.3.10) (2023-12-04)
243

344

package.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
3-
"version": "3.3.10",
4-
"packageManager": "pnpm@8.11.0",
3+
"version": "3.3.13",
4+
"packageManager": "pnpm@8.12.1",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -22,6 +22,7 @@
2222
"test-dts": "run-s build-dts test-dts-only",
2323
"test-dts-only": "tsc -p ./packages/dts-test/tsconfig.test.json",
2424
"test-coverage": "vitest -c vitest.unit.config.ts --coverage",
25+
"test-bench": "vitest bench",
2526
"release": "node scripts/release.js",
2627
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
2728
"dev-esm": "node scripts/dev.js -if esm-bundler-runtime",
@@ -58,40 +59,41 @@
5859
"node": ">=18.12.0"
5960
},
6061
"devDependencies": {
61-
"@babel/parser": "^7.23.5",
62-
"@babel/types": "^7.23.5",
62+
"@babel/parser": "^7.23.6",
63+
"@babel/types": "^7.23.6",
64+
"@codspeed/vitest-plugin": "^2.3.1",
6365
"@rollup/plugin-alias": "^5.0.1",
6466
"@rollup/plugin-commonjs": "^25.0.7",
6567
"@rollup/plugin-json": "^6.0.1",
6668
"@rollup/plugin-node-resolve": "^15.2.3",
6769
"@rollup/plugin-replace": "^5.0.4",
6870
"@rollup/plugin-terser": "^0.4.4",
6971
"@types/hash-sum": "^1.0.2",
70-
"@types/node": "^20.10.3",
71-
"@typescript-eslint/parser": "^6.13.0",
72-
"@vitest/coverage-istanbul": "^0.34.6",
72+
"@types/node": "^20.10.5",
73+
"@typescript-eslint/parser": "^6.13.2",
74+
"@vitest/coverage-istanbul": "^1.1.0",
7375
"@vue/consolidate": "0.17.3",
7476
"conventional-changelog-cli": "^4.1.0",
7577
"enquirer": "^2.4.1",
7678
"esbuild": "^0.19.5",
7779
"esbuild-plugin-polyfill-node": "^0.3.0",
78-
"eslint": "^8.54.0",
80+
"eslint": "^8.55.0",
7981
"eslint-plugin-jest": "^27.6.0",
8082
"estree-walker": "^2.0.2",
8183
"execa": "^8.0.1",
82-
"jsdom": "^22.1.0",
83-
"lint-staged": "^15.1.0",
84+
"jsdom": "^23.0.1",
85+
"lint-staged": "^15.2.0",
8486
"lodash": "^4.17.21",
8587
"magic-string": "^0.30.5",
8688
"markdown-table": "^3.0.3",
87-
"marked": "^9.1.6",
89+
"marked": "^11.1.0",
8890
"minimist": "^1.2.8",
8991
"npm-run-all": "^4.1.5",
9092
"picocolors": "^1.0.0",
91-
"prettier": "^3.1.0",
93+
"prettier": "^3.1.1",
9294
"pretty-bytes": "^6.1.1",
9395
"pug": "^3.0.2",
94-
"puppeteer": "~21.5.2",
96+
"puppeteer": "~21.6.1",
9597
"rimraf": "^5.0.5",
9698
"rollup": "^4.1.4",
9799
"rollup-plugin-dts": "^6.1.0",
@@ -103,9 +105,9 @@
103105
"terser": "^5.22.0",
104106
"todomvc-app-css": "^2.4.3",
105107
"tslib": "^2.6.2",
106-
"tsx": "^4.6.2",
108+
"tsx": "^4.7.0",
107109
"typescript": "^5.2.2",
108110
"vite": "^5.0.5",
109-
"vitest": "^1.0.0"
111+
"vitest": "^1.1.0"
110112
}
111113
}

packages/compiler-core/__tests__/utils.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ describe('isMemberExpression', () => {
122122
expect(fn(`123[a]`)).toBe(true)
123123
expect(fn(`foo() as string`)).toBe(false)
124124
expect(fn(`a + b as string`)).toBe(false)
125+
// #9865
126+
expect(fn('""')).toBe(false)
127+
expect(fn('undefined')).toBe(false)
128+
expect(fn('null')).toBe(false)
125129
})
126130
})
127131

packages/compiler-core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-core",
3-
"version": "3.3.10",
3+
"version": "3.3.13",
44
"description": "@vue/compiler-core",
55
"main": "index.js",
66
"module": "dist/compiler-core.esm-bundler.js",
@@ -32,12 +32,12 @@
3232
},
3333
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
3434
"dependencies": {
35-
"@babel/parser": "^7.23.5",
35+
"@babel/parser": "^7.23.6",
3636
"@vue/shared": "workspace:*",
3737
"estree-walker": "^2.0.2",
3838
"source-map-js": "^1.0.2"
3939
},
4040
"devDependencies": {
41-
"@babel/types": "^7.23.5"
41+
"@babel/types": "^7.23.6"
4242
}
4343
}

packages/compiler-core/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export const isMemberExpressionNode = __BROWSER__
163163
return (
164164
ret.type === 'MemberExpression' ||
165165
ret.type === 'OptionalMemberExpression' ||
166-
ret.type === 'Identifier'
166+
(ret.type === 'Identifier' && ret.name !== 'undefined')
167167
)
168168
} catch (e) {
169169
return false

packages/compiler-dom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-dom",
3-
"version": "3.3.10",
3+
"version": "3.3.13",
44
"description": "@vue/compiler-dom",
55
"main": "index.js",
66
"module": "dist/compiler-dom.esm-bundler.js",

packages/compiler-sfc/__tests__/compileScript/__snapshots__/defineProps.spec.ts.snap

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,6 @@ return { props }
5959
})"
6060
`;
6161

62-
exports[`defineProps > custom element retains the props type w/ production mode 1`] = `
63-
"import { defineComponent as _defineComponent } from 'vue'
64-
65-
export default /*#__PURE__*/_defineComponent({
66-
__name: 'app.ce',
67-
props: {
68-
foo: {type: Number}
69-
},
70-
setup(__props: any, { expose: __expose }) {
71-
__expose();
72-
73-
const props = __props
74-
75-
return { props }
76-
}
77-
78-
})"
79-
`;
80-
8162
exports[`defineProps > defineProps w/ runtime options 1`] = `
8263
"import { defineComponent as _defineComponent } from 'vue'
8364

packages/compiler-sfc/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-sfc",
3-
"version": "3.3.10",
3+
"version": "3.3.13",
44
"description": "@vue/compiler-sfc",
55
"main": "dist/compiler-sfc.cjs.js",
66
"module": "dist/compiler-sfc.esm-browser.js",
@@ -32,7 +32,7 @@
3232
},
3333
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
3434
"dependencies": {
35-
"@babel/parser": "^7.23.5",
35+
"@babel/parser": "^7.23.6",
3636
"@vue/compiler-core": "workspace:*",
3737
"@vue/compiler-dom": "workspace:*",
3838
"@vue/compiler-ssr": "workspace:*",
@@ -44,7 +44,7 @@
4444
"source-map-js": "^1.0.2"
4545
},
4646
"devDependencies": {
47-
"@babel/types": "^7.23.5",
47+
"@babel/types": "^7.23.6",
4848
"@vue/consolidate": "^0.17.3",
4949
"hash-sum": "^2.0.0",
5050
"lru-cache": "^10.1.0",

packages/compiler-sfc/src/script/resolveType.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,6 +1453,7 @@ export function inferRuntimeType(
14531453
scope
14541454
)
14551455
}
1456+
break
14561457
case 'TSMethodSignature':
14571458
case 'TSFunctionType':
14581459
return ['Function']

0 commit comments

Comments
 (0)