Skip to content

Commit 59eef95

Browse files
Merge branch 'main' into fix/errorHandler
2 parents baee3a5 + 7c49a9c commit 59eef95

File tree

48 files changed

+1275
-370
lines changed

Some content is hidden

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

48 files changed

+1275
-370
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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
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+
126
## [3.3.11](https://github.com/vuejs/core/compare/v3.3.10...v3.3.11) (2023-12-08)
227

328

package.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
3-
"version": "3.3.11",
4-
"packageManager": "pnpm@8.11.0",
3+
"version": "3.3.13",
4+
"packageManager": "pnpm@8.12.0",
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",
@@ -60,38 +61,39 @@
6061
"devDependencies": {
6162
"@babel/parser": "^7.23.5",
6263
"@babel/types": "^7.23.5",
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.4",
73+
"@typescript-eslint/parser": "^6.13.2",
74+
"@vitest/coverage-istanbul": "^1.0.4",
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.0.1",
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.0",
9597
"rimraf": "^5.0.5",
9698
"rollup": "^4.1.4",
9799
"rollup-plugin-dts": "^6.1.0",
@@ -106,6 +108,6 @@
106108
"tsx": "^4.6.2",
107109
"typescript": "^5.2.2",
108110
"vite": "^5.0.5",
109-
"vitest": "^1.0.0"
111+
"vitest": "^1.0.4"
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-core",
3-
"version": "3.3.11",
3+
"version": "3.3.13",
44
"description": "@vue/compiler-core",
55
"main": "index.js",
66
"module": "dist/compiler-core.esm-bundler.js",

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.11",
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-sfc",
3-
"version": "3.3.11",
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",

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']

packages/compiler-ssr/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-ssr",
3-
"version": "3.3.11",
3+
"version": "3.3.13",
44
"description": "@vue/compiler-ssr",
55
"main": "dist/compiler-ssr.cjs.js",
66
"types": "dist/compiler-ssr.d.ts",

packages/dts-test/reactivity.test-d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ describe('should unwrap Map correctly', () => {
7777
expectType<number>(wm2.get({})!.wrap)
7878
})
7979

80+
describe('should unwrap extended Map correctly', () => {
81+
class ExtendendMap1 extends Map<string, { wrap: Ref<number> }> {
82+
foo = ref('foo')
83+
bar = 1
84+
}
85+
86+
const emap1 = reactive(new ExtendendMap1())
87+
expectType<string>(emap1.foo)
88+
expectType<number>(emap1.bar)
89+
expectType<number>(emap1.get('a')!.wrap)
90+
})
91+
8092
describe('should unwrap Set correctly', () => {
8193
const set = reactive(new Set<Ref<number>>())
8294
expectType<Set<Ref<number>>>(set)
@@ -90,3 +102,14 @@ describe('should unwrap Set correctly', () => {
90102
const ws2 = reactive(new WeakSet<{ wrap: Ref<number> }>())
91103
expectType<WeakSet<{ wrap: number }>>(ws2)
92104
})
105+
106+
describe('should unwrap extended Set correctly', () => {
107+
class ExtendendSet1 extends Set<{ wrap: Ref<number> }> {
108+
foo = ref('foo')
109+
bar = 1
110+
}
111+
112+
const eset1 = reactive(new ExtendendSet1())
113+
expectType<string>(eset1.foo)
114+
expectType<number>(eset1.bar)
115+
})

packages/dts-test/ref.test-d.ts

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ const state = reactive({
163163

164164
expectType<string>(state.foo.label)
165165

166+
describe('ref with generic', <T extends { name: string }>() => {
167+
const r = {} as T
168+
const s = ref(r)
169+
expectType<string>(s.value.name)
170+
171+
const rr = {} as MaybeRef<T>
172+
// should at least allow casting
173+
const ss = ref(rr) as Ref<T>
174+
expectType<string>(ss.value.name)
175+
})
176+
166177
// shallowRef
167178
type Status = 'initial' | 'ready' | 'invalidating'
168179
const shallowStatus = shallowRef<Status>('initial')
@@ -201,11 +212,28 @@ if (refStatus.value === 'initial') {
201212
expectType<IsAny<typeof a>>(false)
202213
}
203214

204-
describe('shallowRef with generic', <T>() => {
205-
const r = ref({}) as MaybeRef<T>
206-
expectType<ShallowRef<T> | Ref<T>>(shallowRef(r))
215+
describe('shallowRef with generic', <T extends { name: string }>() => {
216+
const r = {} as T
217+
const s = shallowRef(r)
218+
expectType<string>(s.value.name)
219+
expectType<ShallowRef<T>>(shallowRef(r))
220+
221+
const rr = {} as MaybeRef<T>
222+
// should at least allow casting
223+
const ss = shallowRef(rr) as Ref<T> | ShallowRef<T>
224+
expectType<string>(ss.value.name)
207225
})
208226

227+
{
228+
// should return ShallowRef<T> | Ref<T>, not ShallowRef<T | Ref<T>>
229+
expectType<ShallowRef<{ name: string }> | Ref<{ name: string }>>(
230+
shallowRef({} as MaybeRef<{ name: string }>)
231+
)
232+
expectType<ShallowRef<number> | Ref<string[]> | ShallowRef<string>>(
233+
shallowRef('' as Ref<string[]> | string | number)
234+
)
235+
}
236+
209237
// proxyRefs: should return `reactive` directly
210238
const r1 = reactive({
211239
k: 'v'

0 commit comments

Comments
 (0)