Skip to content

Commit 4d314d1

Browse files
committed
Merge branch 'main' into fix/allow-opt-out-events-timestamp-check
2 parents 42942fb + cd659fc commit 4d314d1

File tree

113 files changed

+1605
-793
lines changed

Some content is hidden

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

113 files changed

+1605
-793
lines changed

.eslintrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ module.exports = {
1616
// most of the codebase are expected to be env agnostic
1717
'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
1818
// since we target ES2015 for baseline support, we need to forbid object
19-
// rest spread usage (both assign and destructure)
19+
// rest spread usage in destructure as it compiles into a verbose helper.
20+
// TS now compiles assignment spread into Object.assign() calls so that
21+
// is allowed.
2022
'no-restricted-syntax': [
2123
'error',
22-
'ObjectExpression > SpreadElement',
2324
'ObjectPattern > RestElement',
2425
'AwaitExpression'
2526
]

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Run unit tests
2929
run: pnpm run test
3030

31-
test-dts:
31+
lint-and-test-dts:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- uses: actions/checkout@v2
@@ -46,6 +46,9 @@ jobs:
4646

4747
- run: pnpm install
4848

49+
- name: Run eslint
50+
run: pnpm run lint
51+
4952
- name: Run type declaration tests
5053
run: pnpm run test-dts
5154

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
## [3.2.33](https://github.com/vuejs/core/compare/v3.2.32...v3.2.33) (2022-04-14)
2+
3+
4+
### Bug Fixes
5+
6+
* **compat:** copy additional properties for functions bound via globalProperties ([#4873](https://github.com/vuejs/core/issues/4873)) ([1612971](https://github.com/vuejs/core/commit/16129714714e19c5c6bfbd05c439ff68bcac00b9)), closes [#4403](https://github.com/vuejs/core/issues/4403)
7+
* **compiler-sfc:** handle type modifier in import specifiers ([#5498](https://github.com/vuejs/core/issues/5498)) ([8e29ef6](https://github.com/vuejs/core/commit/8e29ef6019d1b9d9c8f67b4ebba0223b8e0f914c))
8+
* **custom-elements:** work with async component + slots ([#4657](https://github.com/vuejs/core/issues/4657)) ([f4d2c9f](https://github.com/vuejs/core/commit/f4d2c9fc6afea827a081c1eeab78ce5c0cc620ca)), closes [#4639](https://github.com/vuejs/core/issues/4639)
9+
* **reactivity-transform:** should not rewrite catch param ([#5711](https://github.com/vuejs/core/issues/5711)) ([1f14f19](https://github.com/vuejs/core/commit/1f14f194396bf9296a1046d3f680d6d318cd0e40)), closes [#5709](https://github.com/vuejs/core/issues/5709)
10+
* **reactivity:** fix ref tracking of self-stopping effects ([154233a](https://github.com/vuejs/core/commit/154233abdb19b8330bbc1ff0d3e007f2558cd81c)), closes [#5707](https://github.com/vuejs/core/issues/5707)
11+
* **runtime-core:** ensure custom events are not emitted anymore after unmount. ([#5679](https://github.com/vuejs/core/issues/5679)) ([71c9536](https://github.com/vuejs/core/commit/71c953662528c4f0be68e7b412585c6809794528)), closes [#5674](https://github.com/vuejs/core/issues/5674)
12+
* **runtime-core:** fix use of non-existent-in-prod internal property in defineProperty trap ([f641c4b](https://github.com/vuejs/core/commit/f641c4b2289dfdbbbea87538e36fa35f2a115ddc)), closes [#5710](https://github.com/vuejs/core/issues/5710)
13+
* **runtime-dom:** catch more cases of DOM property setting error ([#5552](https://github.com/vuejs/core/issues/5552)) ([fa1d14c](https://github.com/vuejs/core/commit/fa1d14c2c82a70743ed837ee91c8966373aa8142)), closes [#5545](https://github.com/vuejs/core/issues/5545)
14+
* **runtime-dom:** patch translate as an attr ([#5485](https://github.com/vuejs/core/issues/5485)) ([2c09969](https://github.com/vuejs/core/commit/2c09969b1316b88f9a60406ce7c49cf1110bc400)), closes [#5462](https://github.com/vuejs/core/issues/5462)
15+
* **runtime-dom:** properly handle style properties with undefined values ([#5348](https://github.com/vuejs/core/issues/5348)) ([85af139](https://github.com/vuejs/core/commit/85af1398637ee91c6ebabb73bf42250320311e19)), closes [#5322](https://github.com/vuejs/core/issues/5322)
16+
* **ssr:** avoid rendering reserved internal keys in output ([#5564](https://github.com/vuejs/core/issues/5564)) ([cc238cd](https://github.com/vuejs/core/commit/cc238cdb8e9e90b700c22dfb0530d395e60c9836)), closes [#5563](https://github.com/vuejs/core/issues/5563)
17+
* **transition:** fix broken leave transition on dev root fragment ([#5268](https://github.com/vuejs/core/issues/5268)) ([767d212](https://github.com/vuejs/core/commit/767d212d20a9a488d183610d048ba131bbfd067e))
18+
* **transition:** handle transition for v-if branches with comment ([62eba63](https://github.com/vuejs/core/commit/62eba63172414ae0aa895d4b1927c7889c398f2f)), closes [#5675](https://github.com/vuejs/core/issues/5675)
19+
20+
21+
22+
## [3.2.32](https://github.com/vuejs/core/compare/v3.2.31...v3.2.32) (2022-04-12)
23+
24+
25+
### Bug Fixes
26+
27+
* **devtools:** perf: use high-resolution time ([1070f12](https://github.com/vuejs/core/commit/1070f127a78bfe7da6fe550cc272ef11a1f434a0))
28+
* **reactivity:** fix currentScope loss when running detached effect scope ([#5575](https://github.com/vuejs/core/issues/5575)) ([0a301d4](https://github.com/vuejs/core/commit/0a301d4dabd667526cbcd96e88b50741b519a812))
29+
* **runtime-core/template-ref:** named ref in v-for regression fix ([#5118](https://github.com/vuejs/core/issues/5118)) ([cee1eaf](https://github.com/vuejs/core/commit/cee1eafb4d2d5df901c9536ac59c321be72598b5)), closes [#5116](https://github.com/vuejs/core/issues/5116) [#5447](https://github.com/vuejs/core/issues/5447) [#5525](https://github.com/vuejs/core/issues/5525)
30+
* **runtime-core:** allow spying on proxy methods regression ([#5417](https://github.com/vuejs/core/issues/5417)) ([1574edd](https://github.com/vuejs/core/commit/1574edd490bd5cc0a213bc9f48ff41a1dc43ab22)), closes [#5415](https://github.com/vuejs/core/issues/5415) [#4216](https://github.com/vuejs/core/issues/4216)
31+
* **runtime-core:** Avoid mutating original options object in createApp ([#4840](https://github.com/vuejs/core/issues/4840)) ([d121a9b](https://github.com/vuejs/core/commit/d121a9bc7e7af59adb2d2803954cfeee95b35270)), closes [#4398](https://github.com/vuejs/core/issues/4398)
32+
* **runtime-core:** ensure custom directive instance properly exposes properties on closed instances. ([#5022](https://github.com/vuejs/core/issues/5022)) ([f44087e](https://github.com/vuejs/core/commit/f44087e171282cb77f1e23d86516a527e4c5804b)), closes [#5018](https://github.com/vuejs/core/issues/5018)
33+
* **runtime-core:** fix event listener as dynamicProp is added erroneously to props ([#5517](https://github.com/vuejs/core/issues/5517)) ([8eceabd](https://github.com/vuejs/core/commit/8eceabd14ebab2ba6523f920134b02fdf21e0a1c)), closes [#5520](https://github.com/vuejs/core/issues/5520)
34+
* **transition:** ensure flattened transition group children inherit parent keys ([4311ddd](https://github.com/vuejs/core/commit/4311dddfa72b405b20f469f8f219ec3027972f55)), closes [#4718](https://github.com/vuejs/core/issues/4718) [#5360](https://github.com/vuejs/core/issues/5360) [#5392](https://github.com/vuejs/core/issues/5392)
35+
36+
37+
138
## [3.2.31](https://github.com/vuejs/core/compare/v3.2.30...v3.2.31) (2022-02-12)
239

340

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Please follow the documentation at [vuejs.org](https://vuejs.org/)!
99
Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome [backers](https://github.com/vuejs/core/blob/main/BACKERS.md). If you'd like to join them, please consider [ sponsor Vue's development](https://vuejs.org/sponsor/).
1010

1111
<p align="center">
12-
<a target="_blank" href="https://vuejs.org/sponsor/">
12+
<a target="_blank" href="https://vuejs.org/sponsor/#current-sponsors">
1313
<img alt="sponsors" src="https://sponsors.vuejs.org/sponsors.svg">
1414
</a>
1515
</p>

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "3.2.31",
3+
"version": "3.2.33",
44
"scripts": {
55
"dev": "node scripts/dev.js",
66
"build": "node scripts/build.js",
@@ -58,7 +58,7 @@
5858
"@types/jest": "^27.0.1",
5959
"@types/node": "^16.4.7",
6060
"@types/puppeteer": "^5.0.0",
61-
"@typescript-eslint/parser": "^4.1.1",
61+
"@typescript-eslint/parser": "^5.23.0",
6262
"@vue/reactivity": "workspace:*",
6363
"@vue/runtime-core": "workspace:*",
6464
"@vue/runtime-dom": "workspace:*",
@@ -67,7 +67,7 @@
6767
"conventional-changelog-cli": "^2.0.31",
6868
"csstype": "^3.0.3",
6969
"enquirer": "^2.3.2",
70-
"esbuild": "^0.14.11",
70+
"esbuild": "^0.14.35",
7171
"eslint": "^7.7.0",
7272
"execa": "^4.0.2",
7373
"fs-extra": "^9.0.1",
@@ -89,9 +89,9 @@
8989
"serve": "^12.0.0",
9090
"todomvc-app-css": "^2.3.0",
9191
"ts-jest": "^27.0.5",
92-
"tslib": "^2.3.1",
93-
"typescript": "^4.2.2",
94-
"vite": "^2.7.12",
92+
"tslib": "^2.4.0",
93+
"typescript": "^4.6.4",
94+
"vite": "^2.9.8",
9595
"vue": "workspace:*",
9696
"yorkie": "^2.0.0"
9797
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ foo
20232023
isPreTag: tag => tag === 'pre'
20242024
})
20252025
const elementAfterPre = ast.children[1] as ElementNode
2026-
// should not affect the <span> and condense its whitepsace inside
2026+
// should not affect the <span> and condense its whitespace inside
20272027
expect((elementAfterPre.children[0] as TextNode).content).toBe(` foo bar`)
20282028
})
20292029

packages/compiler-core/__tests__/transforms/transformElement.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('compiler: element transform', () => {
8080
expect(root.components).toContain(`Foo`)
8181
})
8282

83-
test('resolve implcitly self-referencing component', () => {
83+
test('resolve implicitly self-referencing component', () => {
8484
const { root } = parseWithElementTransform(`<Example/>`, {
8585
filename: `/foo/bar/Example.vue?vue&type=template`
8686
})

packages/compiler-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-core",
3-
"version": "3.2.31",
3+
"version": "3.2.33",
44
"description": "@vue/compiler-core",
55
"main": "index.js",
66
"module": "dist/compiler-core.esm-bundler.js",
@@ -32,7 +32,7 @@
3232
},
3333
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
3434
"dependencies": {
35-
"@vue/shared": "3.2.31",
35+
"@vue/shared": "3.2.33",
3636
"@babel/parser": "^7.16.4",
3737
"estree-walker": "^2.0.2",
3838
"source-map": "^0.6.1"

packages/compiler-core/src/options.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ export const enum BindingTypes {
9797
* template expressions.
9898
*/
9999
SETUP_CONST = 'setup-const',
100+
/**
101+
* a const binding that does not need `unref()`, but may be mutated.
102+
*/
103+
SETUP_REACTIVE_CONST = 'setup-reactive-const',
100104
/**
101105
* a const binding that may be a ref.
102106
*/

packages/compiler-core/src/transforms/transformElement.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@ function resolveSetupReference(name: string, context: TransformContext) {
352352
}
353353
}
354354

355-
const fromConst = checkType(BindingTypes.SETUP_CONST)
355+
const fromConst =
356+
checkType(BindingTypes.SETUP_CONST) ||
357+
checkType(BindingTypes.SETUP_REACTIVE_CONST)
356358
if (fromConst) {
357359
return context.inline
358360
? // in inline mode, const setup bindings (e.g. imports) can be used as-is

0 commit comments

Comments
 (0)