chore(deps): update dependency vue to v3
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
vue (source) | devDependencies | major | 2.7.16 -> 3.4.27 |
Release Notes
vuejs/core (vue)
v3.4.27
Bug Fixes
- compat: include legacy scoped slots (#10868) (8366126), closes #8869
- compiler-core: add support for arrow aysnc function with unbracketed (#5789) (ca7d421), closes #5788
- compiler-dom: restrict createStaticVNode usage with option elements (#10846) (0e3d617), closes #6568 #7434
- compiler-sfc: handle keyof operator (#10874) (10d34a5), closes #10871
- hydration: handle edge case of style mismatch without style attribute (f2c1412), closes #10786
v3.4.26
Bug Fixes
- compiler-core: fix bail constant for globals (fefce06)
- compiler-core: remove unnecessary constant bail check (09b4df8), closes #10807
- runtime-core: attrs should be readonly in functional components (#10767) (e8fd644)
- runtime-core: ensure slot compiler marker writable (#10825) (9c2de62), closes #10818
- runtime-core: properly handle inherit transition during clone VNode (#10809) (638a79f), closes #3716 #10497 #4091
- Transition: re-fix #10620 (#10832) (accf839), closes #10632 #10827
v3.4.25
Bug Fixes
- defineModel: align prod mode runtime type generation with defineProps (4253a57), closes #10769
- runtime-core: properly get keepAlive child (#10772) (3724693), closes #10771
- runtime-core: use normal object as internal prototype for attrs and slots (064e82f), closes /github.com/vuejs/core/commit/6df53d85a207986128159d88565e6e7045db2add#r141304923
v3.4.24
Bug Fixes
- compiler-core: handle template ref bound via v-bind object on v-for (#10706) (da7adef), closes #10696
- compiler-core: properly parse await expressions in edge cases (b92c25f), closes #10754
- compiler-sfc: handle readonly operator and ReadonlyArray/Map/Set types (5cef52a), closes #10726
- compiler-ssr: fix hydration mismatch for conditional slot in transition (f12c81e), closes #10743
- compiler-ssr: fix v-html SSR for nullish values (1ff4076), closes #10725
- deps: update compiler (#10760) (15df5c1)
- runtime-core: fix edge case of KeepAlive inside Transition with slot children (#10719) (e51ca61), closes #10708
- runtime-core: further fix slots _ctx check (cde7f05), closes #10724
- runtime-core: props should be readonly via direct template access (b93f264), closes #8216 #10736
- transition: transition is breaking/flickering when enter is canceled (#10688) (65109a7)
v3.4.23
Bug Fixes
- runtime-core: fix regression for $attrs tracking in slots (6930e60), closes #10710
- runtime-core: use same internal object mechanism for slots (6df53d8), closes #10709
v3.4.22
Bug Fixes
- compat: fix $options mutation + adjust private API initialization (d58d133), closes #10626 #10636
- compile-sfc: analyze v-bind shorthand usage in template (#10518) (e5919d4), closes #10515
- compiler-core: fix loc.source for end tags with whitespace before > (16174da), closes #10694 #10695
- compiler-core: fix v-bind shorthand for component :is (04af950), closes #10469 #10471
- compiler-sfc: :is() and :where() in compound selectors (#10522) (660cadc), closes #10511
-
compiler-sfc: also search for
.tsx
when type import's extension is omitted (#10637) (34106bc), closes #10635 - compiler-sfc: fix defineModel coercion for boolean + string union types (#9603) (0cef65c), closes #9587 #10676
- compiler-sfc: fix universal selector scope (#10551) (54a6afa), closes #10548
- compiler-sfc: use options module name if options provide runtimeModuleName options (#10457) (e76d743), closes #10454
- custom-element: avoid setting attr to null if it is removed (#9012) (b49306a), closes #9006 #10324
- hydration: properly handle optimized mode during hydrate node (#10638) (2ec06fd), closes #10607
- reactivity: computed should not be detected as true by isProxy (#10401) (9da34d7)
- reactivity: fix hasOwnProperty key coercion edge cases (969c5fb)
- reactivity: fix tracking when hasOwnProperty is called with non-string value (c3c5dc9), closes #10455 #10464
- runtime-core: fix errorHandler causes an infinite loop during execution (#9575) (ab59bed)
- runtime-core: handle invalid values in callWithAsyncErrorHandling (53d15d3)
- runtime-core: show hydration mismatch details for non-rectified mismatches too when PROD_HYDRATION_MISMATCH_DETAILS is set (#10599) (0dea7f9)
-
runtime-dom:
v-model
string/number coercion for multiselect options (#10576) (db374e5) - runtime-dom: fix css v-bind for suspensed components (#8523) (67722ba), closes #8520
- runtime-dom: force update v-model number with leading 0 (#10506) (15ffe8f), closes #10503 #10615
- runtime-dom: sanitize wrongly passed string value as event handler (#8953) (7ccd453), closes #8818
- ssr: don't render v-if comments in TransitionGroup (#6732) (5a96267), closes #6715
- Transition: ensure the KeepAlive children unmount w/ out-in mode (#10632) (fc99e4d), closes #10620
- TransitionGroup: avoid set transition hooks for comment nodes and text nodes (#9421) (140a768), closes #4621 #4622 #5153 #5168 #7898 #9067
- types: avoid merging object union types when using withDefaults (#10596) (37ba93c), closes #10594
Performance Improvements
- add
__NO_SIDE_EFFECTS__
comments (#9053) (d46df6b) - optimize component props/slots internal object checks (6af733d)
- ssr: avoid calling markRaw on component instance proxy (4bc9f39)
- ssr: optimize setup context creation for ssr in v8 (ca84316)
v3.4.21
Bug Fixes
- runtime-dom: avoid unset option's value (#10416) (b3f8b5a), closes #10412 #10396
- suspense: ensure nested suspense patching if in fallback state (#10417) (7c97778), closes #10415
- warning: stringify args in warn handler (#10414) (bc37258), closes #10409
v3.4.20
Bug Fixes
- parser: should not treat uppercase components as special tags (e0e0253), closes #10395
- runtime-dom: avoid always resetting nullish option value (ff130c4), closes #10396
- runtime-dom: fix nested v-show priority regression (364f890), closes #10338
- runtime-dom: v-bind style should clear previous css string value (#10373) (e2d3235), closes #10352
- suspense: handle suspense switching with nested suspense (#10184) (0f3da05), closes #10098
- types: better typing for direct setup signature of defineComponent (#10357) (eadce5b), closes #8604 #8855
v3.4.19
Bug Fixes
- deps: pin lru-cache to avoid hashing error (b8be990), closes #10300
- hydration: fix css vars hydration mismatch false positive on non-root nodes (995d2fd), closes #10317 #10325
- runtime-dom: should not trigger transition when v-show value is falsy (#10311) (e509639)
Features
Note: this warning is categorized as a feature but released in a patch because it does not affect public APIs.
Performance Improvements
v3.4.18
Bug Fixes
- dx: warn against reserved keys as prop name (77a804b), closes #10281
- runtime-dom: ensure v-show respects display value set via v-bind (#10297) (c224897), closes #10151
v3.4.17
Reverts
- fix(runtime-dom): ensure v-show respects display value set via v-bind (#10161) (2cd5b05), closes #10294 #10151
v3.4.16
Bug Fixes
- compiler-core: handle same-name shorthand edge case for in-DOM templates (cb87b62), closes #10280
- compiler-core: support v-bind shorthand syntax for dynamic slot name (#10218) (91f058a), closes #10213
- deps: update compiler (#10269) (336bb65)
- hydration: fix SFC style v-bind hydration mismatch warnings (#10250) (f0b5f7e), closes #10215
- reactivity: avoid infinite recursion from side effects in computed getter (#10232) (0bced13), closes #10214
-
reactivity: handle
MaybeDirty
recurse (#10187) (6c7e0bd), closes #10185 -
reactivity: skip non-extensible objects when using
markRaw
(#10289) (2312184), closes #10288 - runtime-core: avoid inlining isShallow (#10238) (53eee72)
- runtime-core: support for nested calls to runWithContext (#10261) (75e02b5), closes #10260
- runtime-dom: ensure v-show respects display value set via v-bind (#10161) (9b19f09), closes #10151
- runtime-dom: fix option selected update failed (#10200) (f31d782), closes #10194 #10267
Reverts
- perf(templateRef): avoid double render when using template ref on v-for (eb1b911), closes #9908 #10210 #10234
v3.4.15
Bug Fixes
- compiler-sfc: fix type resolution for symlinked node_modules structure w/ pnpm (75e866b), closes #10121
- correct url for production error reference links (c3087ff)
- hydration: fix incorect mismatch warning for option with non-string value and inner text (d16a213)
- reactivity: re-fix #10114 (#10123) (c2b274a)
- runtime-core: should not warn out-of-render slot fn usage when mounting another app in setup (#10125) (6fa33e6), closes #10124
Performance Improvements
- templateRef: avoid double render when using template ref on v-for (de4d2e2), closes #9908
- v-model: optimize v-model multiple select w/ large lists (2ffb956), closes #10014
v3.4.14
Bug Fixes
- compiler-sfc: enable prefixIdentifiers by default when reparsing on consumed AST (#10105) (48bf8e4)
- deps: update dependency postcss to ^8.4.33 (#10110) (a557006)
- reactivity: fix regression for computed with mutation (#10119) (20f62af), closes #10114
v3.4.13
Bug Fixes
v3.4.12
Reverts
- fix(reactivity): correct dirty assign in render function (#10091) (8b18481), closes #10098 #10100
v3.4.11
Bug Fixes
- hydration: improve mismatch when client value is null or undefined (#10086) (08b60f5)
- reactivity: correct dirty assign in render function (#10091) (8d04205), closes #10082
- runtime-core: filter single root for nested DEV_ROOT_FRAGMENT (#8593) (d35b877), closes #5203 #8581 #10087
v3.4.10
Bug Fixes
- hydration: should not warn on falsy bindings of non-property keys (3907c87)
v3.4.9
Bug Fixes
- build: avoid accessing FEATURE_PROD_DEVTOOLS flag in root scope (dfd9654)
- hydration: do not warn against bindings w/ object values (dcc68ef)
- runtime-dom: unify behavior for v-show + style display binding (#10075) (cd419ae), closes #10074
- suspense: avoid double-patching nested suspense when parent suspense is not resolved (#10055) (bcda96b), closes #8678
v3.4.8
Bug Fixes
- hydration: fix class and style hydration mismatch message (5af3987), closes #10067
- hydration: improve attr hydration mismatch check for boolean attrs (972face), closes #10057 #10060
- suspense: fix more suspense patch before resolve edge cases (70ad4ca), closes #10017
v3.4.7
Bug Fixes
-
parser: skip compat mode check for SFC root
<template>
tags (#10034) (923d560) -
types: fix functional component for
h
(#9991) (438a74a)
Reverts
- "dx(computed): warn incorrect use of getCurrentInstance inside computed" (2fd3905)
v3.4.6
Bug Fixes
- build: revert "build: add production/development export conditions (#9977)" (7bd4e90), closes #10012 #10020
- fix post watcher fire timing on nested app mounts (3c3561e), closes #10005
- hydration: avoid hydration mismatch warning for styles with different order (#10011) (2701355), closes #10000 #10006
- runtime-core: handle fragment with null children (#10010) (3bf34b7), closes #10007
- scheduler: sort nested postFlushCbs (d9162df), closes #10003
- suspense: fix anchor for suspense with transition out-in (#9999) (a3fbf21), closes #9996
-
types: allow
null
type for textarea value (#9997) (c379bc2), closes #9904
v3.4.5
Bug Fixes
- compiler-sfc: fix co-usage of defineModel transform options and props destructure (b20350d), closes #9972
- compiler-sfc: fix sfc template unref rewrite for class instantiation (ae60a91), closes #6483 #6491
- compiler-ssr: fix node clone edge case caused by AST reuse (#9983) (7dbdb3e), closes #9981
- watch: cleanup watcher effect from scope when manually stopped (#9978) (d2d8955)
v3.4.4
Bug Fixes
- compiler-sfc: fix scss source map regression (71d3121), closes #9970 #9969
- compiler-sfc: use compilerOptions when re-parsing consumed AST (d94d8d4)
- defineModel: support kebab-case/camelCase mismatches (#9950) (10ccb9b)
- runtime-core: correctly assign suspenseId to avoid conflicts with the default id (#9966) (0648804), closes #9944
- ssr: avoid rendering transition-group slot content as a fragment (#9961) (0160264), closes #9933
-
watch: remove instance unmounted short circuit in getter of
watchEffect
(#9948) (f300a40) - watch: revert watch behavior when watching shallow reactive objects (a9f781a), closes #9965
Performance Improvements
- watch: avoid double traverse for reactive source (24d77c2)
v3.4.3
Bug Fixes
- compiler-sfc: respect sfc parse options in cache key (b8d58ec)
v3.4.2
Bug Fixes
- compat: include legacy scoped slots (#10868) (8366126), closes #8869
- compiler-core: add support for arrow aysnc function with unbracketed (#5789) (ca7d421), closes #5788
- compiler-dom: restrict createStaticVNode usage with option elements (#10846) (0e3d617), closes #6568 #7434
- compiler-sfc: handle keyof operator (#10874) (10d34a5), closes #10871
- hydration: handle edge case of style mismatch without style attribute (f2c1412), closes #10786
v3.4.1
Bug Fixes
- deps: pin lru-cache to avoid hashing error (b8be990), closes #10300
- hydration: fix css vars hydration mismatch false positive on non-root nodes (995d2fd), closes #10317 #10325
- runtime-dom: should not trigger transition when v-show value is falsy (#10311) (e509639)
Features
Note: this warning is categorized as a feature but released in a patch because it does not affect public APIs.
Performance Improvements
v3.4.0
Read this blog post for an overview of the release highlights.
Potential Actions Needed
-
To fully leverage new features in 3.4, it is recommended to also update the following dependencies when upgrading to 3.4:
- Volar / vue-tsc@^1.8.27 (required)
- @vitejs/plugin-vue@^5.0.0 (if using Vite)
- nuxt@^3.9.0 (if using Nuxt)
- vue-loader@^17.4.0 (if using webpack or vue-cli)
-
If using TSX with Vue, check actions needed in Removed: Global JSX Namespace.
-
Make sure you are no longer using any deprecated features (if you are, you should have warnings in the console telling you so). They may have been removed in 3.4.
Features
- general: MathML support (#7836) (d42b6ba), closes #7820
- reactivity: more efficient reactivity system (#5912) (16e06ca), closes #311 #1811 #6018 #7160 #8714 #9149 #9419 #9464
- reactivity: expose last result for computed getter (#9497) (48b47a1)
- runtime-core / dx: link errors to docs in prod build (#9165) (9f8ba98)
-
runtime-core: add
once
option to watch (#9034) (a645e7a) - runtime-core: provide full props to props validator functions (#3258) (8e27692)
- compiler-core: export error message (#8729) (f7e80ee)
- compiler-core: support specifying root namespace when parsing (40f72d5)
- compiler-core: support v-bind shorthand for key and value with the same name (#9451) (26399aa)
- compiler-core: improve parsing tolerance for language-tools (41ff68e)
- compiler-core: support accessing Error as global in template expressions (#7018) (bcca475)
- compiler-core: lift vnode hooks deprecation warning to error (8abc754)
- compiler-core: export runtime error strings (#9301) (feb2f2e)
- compiler-core: add current filename to TransformContext (#8950) (638f1ab)
- compiler-sfc: analyze import usage in template via AST (#9729) (e8bbc94), closes #8897 nuxt/nuxt#22416
- compiler-sfc: expose resolve type-based props and emits (#8874) (9e77580)
- compiler-sfc: bump postcss-modules to v6 (2a507e3)
- compiler-sfc: promote defineModel stable (#9598) (ef688ba)
-
compiler-sfc: support import attributes and
using
syntax (#8786) (5b2bd1d) -
compiler-sfc:
defineModel
support local mutation by default, remove local option (f74785b), closes /github.com/vuejs/rfcs/discussions/503#discussioncomment-7566278 -
ssr: add
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__
feature flag (#9550) (bc7698d) - ssr: improve ssr hydration mismatch checks (#5953) (2ffc1e8), closes #5063
- types: use enum to replace const enum (#9261) (fff7b86), closes #1228
-
types: add emits and slots type to
FunctionalComponent
(#8644) (927ab17) -
types: export
AriaAttributes
type (#8909) (fd0b6ba) -
types: export
ObjectPlugin
andFunctionPlugin
types (#8946) (fa4969e), closes #8577 -
types: expose
DefineProps
type (096ba81) -
types: expose
PublicProps
type (#2403) (44135dc) -
types: improve event type inference when using
h
with native elements (#9756) (a625376) -
types: provide
ComponentInstance
type (#5408) (bfb8565) - types: support passing generics when registering global directives (#9660) (a41409e)
Performance Improvements
- compiler-sfc: avoid sfc source map unnecessary serialization and parsing (f15d2f6)
- compiler-sfc: remove magic-string trim on script (e8e3ec6)
- compiler-sfc: use faster source map addMapping (50cde7c)
- compiler-core: optimize away isBuiltInType (66c0ed0)
- compiler-core: optimize position cloning (2073236)
- codegen: optimize line / column calculation during codegen (3be53d9)
- codegen: optimize source map generation (c11002f)
- shared: optimize makeMap (ae6fba9)
BREAKING CHANGES
Global JSX Registration Removed
Starting in 3.4, Vue no longer registers the global JSX
namespace by default. This is necessary to avoid global namespace collision with React so that TSX of both libs can co-exist in the same project. This should not affect SFC-only users with latest version of Volar.
If you are using TSX, there are two options:
-
Explicitly set jsxImportSource to
'vue'
intsconfig.json
before upgrading to 3.4. You can also opt-in per file by adding a/* @​jsxImportSource vue */
comment at the top of the file. -
If you have code that depends on the presence of the global
JSX
namespace, e.g. usage of types likeJSX.Element
etc., you can retain the exact pre-3.4 global behavior by explicitly referencingvue/jsx
, which registers the globalJSX
namespace.
Note that this is a type-only breaking change in a minor release, which adheres to our release policy.
Deprecated Features Removed
- Reactivity Transform was marked deprecated in 3.3 and is now removed in 3.4. This change does not require a major due to the feature being experimental. Users who wish to continue using the feature can do so via the Vue Macros plugin.
-
app.config.unwrapInjectedRef
has been removed. It was deprecated and enabled by default in 3.3. In 3.4 it is no longer possible to disable this behavior. -
@vnodeXXX
event listeners in templates are now a compiler error instead of a deprecation warning. Use@vue:XXX
listeners instead. -
v-is
directive has been removed. It was deprecated in 3.3. Use theis
attribute withvue:
prefix instead.
v3.3.13
Bug Fixes
- compiler-core: fix v-on with modifiers on inline expression of undefined (#9866) (bae79dd), closes #9865
- runtime-dom: cache event handlers by key/modifiers (#9851) (04d2c05), closes #9849
- types: extract properties from extended collections (#9854) (24b1c1d), closes #9852
v3.3.12
Bug Fixes
- hydration: handle appear transition before patch props (#9837) (e70f4c4), closes #9832
- sfc/cssVars: fix loss of CSS v-bind variables when setting inline style with string value (#9824) (0a387df), closes #9821
- ssr: fix suspense hydration of fallback content (#7188) (60415b5)
-
types: add
xmlns:xlink
toSVGAttributes
(#9300) (0d61b42), closes #9299 -
types: fix
shallowRef
type error (#9839) (9a57158) - types: support for generic keyof slots (#8374) (213eba4)
v3.3.11
Bug Fixes
- custom-element: correctly handle number type props in prod (#8989) (d74d364)
- reactivity: fix mutation on user proxy of reactive Array (6ecbd5c), closes #9742 #9751 #9750
- runtime-dom: fix width and height prop check condition (5b00286), closes #9762
- shared: handle Map with symbol keys in toDisplayString (#9731) (364821d), closes #9727
- shared: handle more Symbol cases in toDisplayString (983d45d)
- Suspense: properly get anchor when mount fallback vnode (#9770) (b700328), closes #9769
- types: ref() return type should not be any when initial value is any (#9768) (cdac121)
- watch: should not fire pre watcher on child component unmount (#7181) (6784f0b), closes #7030
v3.3.10
Bug Fixes
- app: prevent template from being cached between apps with different options (#9724) (ec71585), closes #9618
- compiler-sfc: avoid passing forEach index to genMap (f12db7f)
- compiler-sfc: deindent pug/jade templates (6345197), closes #3231 #3842 #7723
- compiler-sfc: fix :where and :is selector in scoped mode with multiple selectors (#9735) (c3e2c55), closes #9707
- compiler-sfc: generate more treeshaking friendly code (#9507) (8d74ca0), closes #9500
- compiler-sfc: support inferring generic types (#8511) (eb5e307), closes #8482
- compiler-sfc: support resolving components from props (#8785) (7cbcee3)
- compiler-sfc: throw error when failing to load TS during type resolution (#8883) (4936d2e)
- cssVars: cssVar names should be double-escaped when generating code for ssr (#8824) (5199a12), closes #7823
- deps: update compiler to ^7.23.4 (#9681) (31f6ebc)
- runtime-core: Suspense get anchor properly in Transition (#9309) (65f3fe2), closes #8105
- runtime-dom: set width/height with units as attribute (#8781) (bfc1838)
- ssr: avoid computed being accidentally cached before server render (#9688) (30d5d93), closes #5300
- types: expose emits as props in functional components (#9234) (887e54c)
- types: fix reactive collection types (#8960) (ad27473), closes #8904
- types: improve return type withKeys and withModifiers (#9734) (43c3cfd)
Performance Improvements
- optimize on* prop check (38aaa8c)
- runtime-dom: cache modifier wrapper functions (da4a4fb), closes #8882
- v-on: constant handlers with modifiers should not be treated as dynamic (4d94ebf)
v3.3.9
Bug Fixes
- compiler-core: avoid rewriting scope variables in inline for loops (#7245) (a2d810e), closes #7238
-
compiler-core: fix
resolveParserPlugins
decorators check (#9566) (9d0eba9), closes #9560 - compiler-sfc: consistently escape type-only prop names (#8654) (3e08d24), closes #8635 #8910 vitejs/vite-plugin-vue#184
- compiler-sfc: malformed filename on windows using path.posix.join() (#9478) (f18a174), closes #8671 #9583 #9446 #9473
-
compiler-sfc: support
:is
and:where
selector in scoped css rewrite (#8929) (3227e50) - compiler-sfc: support resolve extends interface for defineEmits (#8470) (9e1b74b), closes #8465
- hmr/transition: fix kept-alive component inside transition disappearing after hmr (#7126) (d11e978), closes #7121
- hydration: force hydration for v-bind with .prop modifier (364f319), closes #7490
- hydration: properly hydrate indeterminate prop (34b5a5d), closes #7476
- reactivity: clear method on readonly collections should return undefined (#7316) (657476d)
- reactivity: onCleanup also needs to be cleaned (#8655) (73fd810), closes #5151 #7695
-
ssr: hydration
__vnode
missing for devtools (#9328) (5156ac5) -
types: allow falsy value types in
StyleValue
(#7954) (17aa92b), closes #7955 - types: defineCustomElement using defineComponent return type with emits (#7937) (5d932a8), closes #7782
-
types: fix
unref
andtoValue
when input union type contains ComputedRef (#8748) (176d476), closes #8747 #8857 - types: fix instance type when props type is incompatible with setup returned type (#7338) (0e1e8f9), closes #5885
- types: fix shallowRef return type with union value type (#7853) (7c44800), closes #7852
- types: more precise types for class bindings (#8012) (46e3374)
- types: remove optional properties from defineProps return type (#6421) (94c049d), closes #6420
- types: return type of withDefaults should be readonly (#8601) (f15debc)
- types: revert class type restrictions (5d077c8), closes #8012
- types: update jsx type definitions (#8607) (58e2a94)
- types: widen ClassValue type (2424013)
- v-model: avoid overwriting number input with same value (#7004) (40f4b77), closes #7003
- v-model: unnecessary value binding error should apply to dynamic instead of static binding (2859b65), closes #3596
v3.3.8
Bug Fixes
-
compile-sfc: support
Error
type indefineProps
(#5955) (a989345) - compiler-core: known global should be shadowed by local variables in expression rewrite (#9492) (a75d1c5), closes #9482
- compiler-sfc: fix dynamic directive arguments usage check for slots (#9495) (b39fa1f), closes #9493
- deps: update dependency @vue/repl to ^2.6.2 (#9536) (5cef325)
- deps: update dependency @vue/repl to ^2.6.3 (#9540) (176d590)
- hydration: fix tagName access error on comment/text node hydration mismatch (dd8a0cf), closes #9531
- types: avoid exposing lru-cache types in generated dts (462aeb3), closes #9521
- warn: avoid warning on empty children with Suspense (#3962) (405f345)
v3.3.7
Please refer to CHANGELOG.md for details.
v3.3.6
Please refer to CHANGELOG.md for details.
v3.3.5
Please refer to CHANGELOG.md for details.
v3.3.4
Please refer to CHANGELOG.md for details.
v3.3.3
Please refer to CHANGELOG.md for details.
v3.3.2
Please refer to CHANGELOG.md for details.
v3.3.1
Bug Fixes
- compiler-core: fix v-on with modifiers on inline expression of undefined (#9866) (bae79dd), closes #9865
- runtime-dom: cache event handlers by key/modifiers (#9851) (04d2c05), closes #9849
- types: extract properties from extended collections (#9854) (24b1c1d), closes #9852
v3.3.0
: "Rurouni Kenshin"
Please refer to the release blog post for details.
v3.2.47
Please refer to CHANGELOG.md for details.
v3.2.46
Please refer to CHANGELOG.md for details.
v3.2.45
Please refer to CHANGELOG.md for details.
v3.2.44
Please refer to CHANGELOG.md for details.
v3.2.43
Please refer to CHANGELOG.md for details.
v3.2.42
Please refer to CHANGELOG.md for details.
v3.2.41
Please refer to CHANGELOG.md for details.
v3.2.40
Please refer to CHANGELOG.md for details.
v3.2.39
Please refer to CHANGELOG.md for details.
v3.2.38
Please refer to CHANGELOG.md for details.
v3.2.37
Please refer to CHANGELOG.md for details.
v3.2.36
Please refer to CHANGELOG.md for details.
v3.2.35
Please refer to CHANGELOG.md for details.
v3.2.34
Please refer to CHANGELOG.md for details.
v3.2.33
Please refer to CHANGELOG.md for details.
v3.2.32
Please refer to CHANGELOG.md for details.
v3.2.31
Please refer to CHANGELOG.md for details.
v3.2.30
Please refer to CHANGELOG.md for details.
v3.2.29
Please refer to CHANGELOG.md for details.
v3.2.28
Please refer to CHANGELOG.md for details.
v3.2.27
Please refer to CHANGELOG.md for details.
v3.2.26
Please refer to CHANGELOG.md for details.
v3.2.25
Please refer to CHANGELOG.md for details.
v3.2.24
Please refer to CHANGELOG.md for details.
v3.2.23
Please refer to CHANGELOG.md for details.
v3.2.22
Please refer to CHANGELOG.md for details.
v3.2.21
Please refer to CHANGELOG.md for details.
v3.2.20
Please refer to CHANGELOG.md for details.
v3.2.19
Please refer to CHANGELOG.md for details.
v3.2.18
Please refer to CHANGELOG.md for details.
v3.2.17
Please refer to CHANGELOG.md for details.
v3.2.16
Please refer to CHANGELOG.md for details.
v3.2.15
Please refer to CHANGELOG.md for details.
v3.2.14
Please refer to CHANGELOG.md for details.
v3.2.13
Please refer to CHANGELOG.md for details.
v3.2.12
Please refer to CHANGELOG.md for details.
v3.2.11
Please refer to CHANGELOG.md for details.
v3.2.10
Please refer to CHANGELOG.md for details.
v3.2.9
Please refer to CHANGELOG.md for details.
v3.2.8
Please refer to CHANGELOG.md for details.
v3.2.7
Please refer to CHANGELOG.md for details.
v3.2.6
Please refer to CHANGELOG.md for details.
v3.2.5
Please refer to CHANGELOG.md for details.
v3.2.4
Please refer to CHANGELOG.md for details.
v3.2.3
Please refer to CHANGELOG.md for details.
v3.2.2
Please refer to CHANGELOG.md for details.
v3.2.1
Please refer to CHANGELOG.md for details.
v3.2.0
: Quintessential Quintuplets
Please refer to the release blog post and CHANGELOG.md for details.
v3.1.5
Please refer to CHANGELOG.md for details.
v3.1.4
Please refer to CHANGELOG.md for details.
v3.1.3
Please refer to CHANGELOG.md for details.
v3.1.2
Please refer to CHANGELOG.md for details.
v3.1.1
Please refer to CHANGELOG.md for details.
v3.1.0
: Pluto
Features
- Migration Build: a build of Vue 3 that provides Vue 2 compatible behavior. The Migration Build is intended to help migrating existing Vue 2 apps to Vue 3.
- compiler-core: whitespace handling strategy (dee3d6a)
- support component-level
compilerOptions
when using runtime compiler (ce0bbe0) -
config: support configuring runtime compiler via
app.config.compilerOptions
(091e6d6) - support casting plain element to component via is="vue:xxx" (af9e699)
- devtools: improved KeepAlive support (03ae300)
- devtools: performance events (f7c54ca)
- onServerPrefetch (#3070) (349eb0f)
Performance Improvements
- only trigger
$attrs
update when it has actually changed (5566d39) - compiler: skip unncessary checks when parsing end tag (048ac29)
- avoid deopt for props/emits normalization when global mixins are used (51d2be2)
Deprecations
-
app.config.isCustomElement
has been deprecated and should be now nested underapp.config.compilerOptions
. [Docs] -
delimiters
component option has been deprecated and should now be nested under thecompilerOptions
component option. [Docs] -
v-is
has been deprecated in favor ofis="vue:xxx"
[Docs]
Minor Breaking Changes
-
this.$props
and theprops
object passed tosetup()
now always contain all the keys for declared props, even for props that are absent (4fe4de0). This has always been the behavior in Vue 2 and is therefore considered a fix (see reasoning in #3288). However, this could break Vue 3 code that relied on the keys for prop absence checks. The workaround is to use a Symbol default value for props that need absence checks:const isAbsent = Symbol() export default { props: { foo: { default: isAbsent } }, setup(props) { if (props.foo === isAbsent) { // foo is absent } } }
-
optionMergeStrategies
functions no longer receive the component instance as the 3rd argument. The argument was technically internal in Vue 2 and only used for generating warnings, and should not be needed in userland code. This removal enables much more efficient caching of option merging.
Bug Fixes
- compat: revert private properties on $options in comapt mode (ad844cf), closes #3883
- runtime-core: fix fragment update inside de-opt slots (5bce2ae), closes #3881
- compat: fix deep data merge with extended constructor (c7efb96), closes #3852
- compiler-sfc: fix style injection when using normal script + setup (8b94464), closes #3688
- compiler-sfc: fix template expression assignment codegen for script setup let refs (#3626) (2c7bd42), closes #3625
- runtime-core: align option merge behavior with Vue 2 (e2ca67b), closes #3566 #2791
- runtime-dom/v-model: only set selectedIndex when the value changes (#3845) (ecd97ee)
- suspense: fix suspense regression for errored template component (44996d1), closes #3857
- watch: avoid traversing objects that are marked non-reactive (9acc9a1)
- compiler-core: improve the isMemberExpression function (#3675) (9b2e894)
- compiler-dom: fix in-browser attribute value decoding w/ html tags (6690372), closes #3001
- compiler-sfc: correctly remove parens used for wrapping (#3582) (6bfb50a), closes #3581
- reactivity: ensure computed always expose value (03a7a73), closes #3099 #910
- runtime-core: fix cases of reused children arrays in render functions (#3670) (a641eb2), closes #3666
- runtime-core: fix resolving inheritAttrs from mixins (#3742) (d6607c9), closes #3741
- runtime-core: should disable tracking inside directive lifecycle hooks (#3699) (ff50e8d)
- runtime-core: stricter compat root mount check (32e2133)
-
runtime-dom: should remove attribute when binding
null
tovalue
(#3564) (e3f5dcb) - suspense: fix suspense patching in optimized mode (9f24195), closes #3828
- transition: fix higher order transition components with merged listeners (071986a), closes #3227
- keep-alive: include/exclude should work with async component (#3531) (9e3708c), closes #3529
- runtime-core: properly check forwarded slots type (#3781) (e8ddf86), closes #3779
- runtime-core: should not track dynamic children when the user calls a compiled slot inside template expression (#3554) (2010607), closes #3548 #3569
- runtime-core/teleport: ensure the nested teleport can be unmounted correctly (#3629) (4e3f82f), closes #3623
- scheduler: handle preFlush cb queued inside postFlush cb (b57e995), closes #3806
- ssr: handle hydrated async component unmounted before resolve (b46a4dc), closes #3787
- watch: should not leak this context to setup watch getters (1526f94), closes #3603
- compat: avoid accidentally delete the modelValue prop (#3772) (4f17be7)
- compat: enum coercion warning (#3755) (f01aadf)
- compiler-core: fix whitespace management for slots with whitespace: 'preserve' (#3767) (47da921), closes #3766
- compiler-dom: comments in the v-if branchs should be ignored when used in Transition (#3622) (7c74feb), closes #3619
- compiler-sfc: support tsx in setup script (#3825) (01e8ba8), closes #3808
- compiler-ssr: disable hoisting in compiler-ssr (3ef1fcc), closes #3536
- devtools: send update to component owning the slot (1355ee2)
- runtime-core: avoid double-setting props when casting (0255be2), closes #3371 #3384
- runtime-core: avoid the proxy object polluting the slots of the internal instance (#3698) (4ce0df6), closes #3695
-
types: declared prop keys should always exist in
props
argument (#3726) (9b160b9) -
types/reactivity: error TS4058 caused by
RefSymbol
(#2548) (90aa835) - compat: correctly merge lifecycle hooks when using Vue.extend (#3762) (2bfb8b5), closes #3761
- compiler-core: bail out to array children when the element has custom directives + only one text child node (#3757) (a56ab14)
- compat: handle and warn config.optionMergeStrategies (94e69fd)
- compiler-core: preserve comment content in production when comments option is enabled (e486254)
- hmr: don't remove __file key from component type (9db3cbb)
- hydration: fix update before async component is hydrated (#3563) (c8d9683), closes #3560
- reactivity: fix tracking for readonly + reactive Map (#3604) (5036c51), closes #3602
- runtime-core: ensure declare prop keys are always present (4fe4de0), closes #3288
- runtime-core: watching multiple sources: computed (#3066) (e7300eb), closes #3068
- Teleport: avoid changing the reference of vnode.dynamicChildren (#3642) (43f7815), closes #3641
- watch: avoid traversing non-plain objects (62b8f4a)
- watch: this.$watch should support watching keypath (870f2a7)
v3.0.11
Please refer to CHANGELOG.md for details.
v3.0.10
Please refer to CHANGELOG.md for details.
v3.0.9
Please refer to CHANGELOG.md for details.
v3.0.8
Please refer to CHANGELOG.md for details.
v3.0.7
Please refer to CHANGELOG.md for details.
v3.0.6
Please refer to CHANGELOG.md for details.
v3.0.5
Please refer to CHANGELOG.md for details.
v3.0.4
Please refer to CHANGELOG.md for details.
v3.0.3
Please refer to CHANGELOG.md for details.
v3.0.2
Please refer to CHANGELOG.md for details.
v3.0.1
Please refer to CHANGELOG.md for details.
v3.0.0
: One Piece
Today we are proud to announce the official release of Vue.js 3.0 "One Piece". This new major version of the framework provides improved performance, smaller bundle sizes, better TypeScript integration, new APIs for tackling large scale use cases, and a solid foundation for long-term future iterations of the framework.
The 3.0 release represents over 2 years of development efforts, featuring 30+ RFCs, 2,600+ commits, 628 pull requests from 99 contributors, plus tremendous amount of development and documentation work outside of the core repo. We would like to express our deepest gratitude towards our team members for taking on this challenge, our contributors for the pull requests, our sponsors and backers for the financial support, and the wider community for participating in our design discussions and providing feedback for the pre-release versions. Vue is an independent project created for the community and sustained by the community, and Vue 3.0 wouldn't have been possible without your consistent support.
Taking the "Progressive Framework" Concept Further
Vue had a simple mission from its humble beginning: to be an approachable framework that anyone can quickly learn. As our user base grew, the framework also grew in scope to adapt to the increasing demands. Over time, it evolved into what we call a "Progressive Framework": a framework that can be learned and adopted incrementally, while providing continued support as the user tackles more and more demanding scenarios.
Today, with over 1.3 million users worldwide*, we are seeing Vue being used in a wildly diverse range of scenarios, from sprinkling interactivity on traditional server-rendered pages, to full-blown single page applications with hundreds of components. Vue 3 takes this flexibility even further.
Layered internal modules
Vue 3.0 core can still be used via a simple <script>
tag, but its internals has been re-written from the ground up into a collection of decoupled modules. The new architecture provides better maintainability, and allows end users to shave off up to half of the runtime size via tree-shaking.
These modules also exposes lower-level APIs that unlocks many advanced use cases:
- The compiler supports custom AST transforms for build-time customizations (e.g. build-time i18n)
- The core runtime provides first-class API for creating custom renderers targeting different render targets (e.g. native mobile, WebGL or terminals). The default DOM renderer is built using the same API.
- The
@vue/reactivity
module exports functions that provide direct access to Vue's reactivity system, and can be used as a standalone package. It can be used to pair with other templating solutions (e.g. lit-html) or even in non-UI scenarios.
New APIs for tackling scale
The 2.x Object-based API is largely intact in Vue 3. However, 3.0 also introduces the Composition API - a new set of APIs aimed at addressing the pain points of Vue usage in large scale applications. The Composition API builds on top of the reactivity API and enables logic composition and reuse similar to React hooks, more flexible code organization patterns, and more reliable type inference than the 2.x Object-based API.
Composition API can also be used with Vue 2.x via the @vue/composition-api plugin, and there are already Composition API utility libraries that work for both Vue 2 and 3 (e.g. vueuse, vue-composable).
Performance Improvements
Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 54% less).
In Vue 3, we have taken the approach of "compiler-informed Virtual DOM": the template compiler performs aggressive optimizations and generates render function code that hoists static content, leaves runtime hints for binding types, and most importantly, flattens the dynamic nodes inside a template to reduce the cost of runtime traversal. The user therefore gets the best of both worlds: compiler-optimized performance from templates, or direct control via manual render functions when the use case demands.
Improved TypeScript integration
Vue 3's codebase is written in TypeScript, with automatically generated, tested, and bundled type definitions so they are always up-to-date. Composition API works great with type inference. Vetur, our official VSCode extension, now supports template expression and props type checking leveraging Vue 3's improved internal typing. Oh, and Vue 3's typing fully supports TSX if that's your preference.
Experimental Features
We have proposed two new features for Singe-File Components (SFC, aka .vue
files):
<script setup>
: syntactic sugar for using Composition API inside SFCs<style vars>
: state-driven CSS variables inside SFCs
These features are already implemented and available in Vue 3.0, but are provided only for the purpose of gathering feedback. They will remain experimental until the RFCs are merged.
We have also implemented a currently undocumented <Suspense>
component, which allows waiting on nested async dependencies (async components or component with async setup()
) on initial render or branch switch. We are testing and iterating on this feature with the Nuxt.js team (Nuxt 3 is on the way) and will likely solidify it in 3.1.
Phased Release Process
The release of Vue 3.0 marks the general readiness of the framework. While some of the frameworks sub projects may still need further work to reach stable status (specifically router and Vuex integration in the devtools), we believe it's suitable to start new, green-field projects with Vue 3 today. We also encourage library authors to start upgrading your projects to support Vue 3.
Check out the Vue 3 Libraries Guide for details on all framework sub projects.
Migration and IE11 Support
We have pushed back the migration build (v3 build with v2 compatible behavior + migration warnings) and the IE11 build due to time constraints, and are aiming to focus on them in Q4 2020. Therefore, users planning to migrate an existing v2 app or require IE11 support should be aware of these limitations at this time.
Next Steps
For the near term after release, we will focus on:
- Migration build
- IE11 support
- Router and Vuex integration in new devtools
- Further improvements to template type inference in Vetur
For the time being, the documentation websites, GitHub branches, and npm dist tags for Vue 3 and v3-targeting projects will remain under next
-denoted status. This means npm install vue
will still install Vue 2.x and npm install vue@next
will install Vue 3. We are planning to switch all doc links, branches and dist tags to default to 3.0 by end of 2020.
At the same time, we have started planning for 2.7, which will be the last planned minor release of the 2.x release line. 2.7 will be backporting compatible improvements from v3, and emit warnings on usage of APIs that are removed/changed in v3 to help with potential migration. We are planning to work on 2.7 in Q1 2021, which will directly become LTS upon release with an 18 months maintenance lifespan.
Trying It Out
To learn more about Vue 3.0, check out our new documentation website. If you are an existing Vue 2.x user, go directly to the Migration Guide.
- *based on Vue Devtools Chrome extension weekly active users as reported by Google.
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.