Skip to content

Latest commit

 

History

History
320 lines (254 loc) · 42.1 KB

CHANGELOG-3.1.md

File metadata and controls

320 lines (254 loc) · 42.1 KB

3.1.5 (2021-07-16)

Bug Fixes

  • compat: fix props check for v-model compat warning (#4056) (f3e15f6)
  • compat: fix v3 compiled fn detection in production (8dbad83)
  • compiler: Addressed infinite loop in compiler (#3992) (e00aa56), closes #3987
  • compiler-core: fix forwarded slots detection on template slots (#4124) (c23153d), closes #4123
  • compiler-sfc: duplicated injected css var with repeated vars in style (#2802) (2901050)
  • compiler-sfc: should not rewrite ref sugar identifiers in types (6fad209), closes #4062
  • reactivity: call array subclass methods (#3624) (1cfe290), closes #2314 #2315
  • ref: should not trigger when setting value to same proxy (#3658) (08f504c)
  • runtime-core: enter optimized mode for component as root (68365b9), closes #3943
  • runtime-dom: capture errors when setting value for IDL (#3578) (3756270), closes #3576
  • runtime-dom: remove class attribute on nullish values (7013e8f), closes #3173
  • sfc: fix <script setup> async context preservation logic (03e2684), closes #4050
  • sfc: fix style variables injection on static vnode (#3847) (6a0c7cd), closes #3841
  • sfc: only enable jsx parser plugin when explicitly using tsx (5df7dfc), closes #4106
  • type: infer parent as this on nextTick function (#3608) (18911ab), closes #3599
  • v-model: handle mutations of v-model bound array/sets (2937530), closes #4096
  • v-model: support calling methods in v-model expression (5af718b), closes #3993
  • v-on: proper member exp detection for bracket assignment (395572b), closes #4097
  • v-on: properly detect member expressions with optional chaining (963085d), closes #4107

3.1.4 (2021-07-02)

Bug Fixes

  • build: avoid using async/await syntax (438754a)
  • build: fix generated code containing unprocessed class field syntax (2788154), closes #4052 vuejs/vue-cli#6562
  • codegen: ensure valid types in genreated code when using global directives (a44d528), closes #4054
  • compiler-sfc: fix parse-only mode when there is no script setup block (253ca27)
  • runtime-core: add useAttrs and useSlots export (#4053) (735ada1)
  • runtime-core: fix instance accessed via $parent chain when using expose() (#4048) (12cf9f4)

3.1.3 (2021-07-01)

Bug Fixes

  • compiler-core: properly exit self-closing pre tag (d2df28d), closes #4030
  • compiler-sfc: avoid script setup marker showing up in devtools (211793d)
  • compiler-sfc: fix defineProps() call on imported identifier (691d354)
  • compiler-sfc: fix defineProps/defineEmits usage in multi-variable declarations (62c1b2f), closes #3739
  • compiler-sfc: fix script setup hidden flag codegen (a5a66c5)
  • compiler-sfc: support method signature in defineProps (afdd2f2), closes #2983
  • compiler-sfc: support TS runtime enum in <script setup> (1ffd48a)
  • runtime-core: add missing serverPrefetch hook error string (#4014) (d069796)
  • runtime-core: fix mouting of detached static vnode (fded1e8), closes #4023
  • runtime-dom: fix static node content caching edge cases (ba89ca9), closes #4023 #4031 #4037
  • sfc: allow variables that start with _ or $ in <script setup> (0b8b576)
  • ssr: ensure behavior consistency between prod/dev when mounting SSR app to empty containers (33708e8), closes #4034
  • ssr: properly hydrate non-string value bindings (34d4991), closes #4006
  • types: improve type of unref() (127ed1b), closes #3954
  • defineExpose type definition and runtime warning (1675b6d)
  • prevent withAsyncContext currentInstance leak in edge cases (9ee41e1)

Features

  • compiler-sfc: compileScript parseOnly mode (601a290)
  • expose: always expose $ instance properties on child refs (b0203a3)
  • sfc: add defineEmits and deprecate defineEmit (#3725) (a137da8)
  • sfc: auto restore current instance after await statements in async setup() (0240e82)
  • sfc: change <script setup> directive resolution to require v prefix (d35e0b1), closes #3543
  • sfc: defineExpose (be2b1d3)
  • sfc: make ref sugar disabled by default (96cc335)
  • sfc: remove <template inherit-attrs> support (6f6f0cf)
  • sfc: support referenced types for defineEmits (2973b6c)
  • sfc: support using declared interface or type alias with defineProps() (2f91db3)
  • sfc: useAttrs + useSlots (63e9e2e)
  • sfc: withDefaults helper (4c5844a)
  • sfc-playground: support lang=ts (be0f614)
  • sfc/types: make <script setup> helper types available globally (004bd18)
  • types: support IDE renaming for props (#3656) (81e69b2)
  • types/ide: support find definition for jsx tags, events (#3570) (8ed3ed6)

3.1.2 (2021-06-22)

Bug Fixes

  • compiler-core: improve member expression check (bc100c5), closes #3910
  • compiler-core/compat: fix is prop usage on components (08e9322), closes #3934
  • compiler-sfc: rewriteDefault support multiline (#3917) (b228abb)
  • compiler-ssr: fix attr fallthrough for transition/keep-alive as template root (9f6f8b3), closes #3981
  • devtools: expose root instance (2b52d5d)
  • runtime-core: bind default function of inject to instance (#3925) (db1dc1c), closes #3923
  • runtime-core: fix multiple .once event handlers on same component (#3904) (011dee8), closes #3902
  • Suspense: emit initial fallback and pending events (#3965) (ab6e927), closes #3964
  • Suspense: fallback should work with transition (#3968) (43e2a72), closes #3963
  • watch: fix watch option merging from mixins (9b607fe), closes #3966

Performance Improvements

  • improve static content insertion perf (4de5d24), closes #3090

3.1.1 (2021-06-07)

Bug Fixes

3.1.0 (2021-06-07)

Features

  • Migration Build
  • 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 under app.config.compilerOptions. [Docs]
  • delimiters component option has been deprecated and should now be nested under the compilerOptions component option. [Docs]
  • v-is has been deprecated in favor of is="vue:xxx" [Docs]

Minor Breaking Changes

  • this.$props and the props object passed to setup() 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 to value (#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)

3.1.0-beta.7 (2021-06-02)

Bug Fixes

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

Code Refactoring

  • adjust component options merge cache strategy (1e35a86)

Performance Improvements

  • avoid deopt for props/emits normalization when global mixins are used (51d2be2)

BREAKING CHANGES

  • 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.

3.1.0-beta.6 (2021-05-28)

Bug Fixes

  • 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 to value (#3564) (e3f5dcb)
  • suspense: fix suspense patching in optimized mode (9f24195), closes #3828
  • transition: fix higher order transition components with merged listeners (071986a), closes #3227

3.1.0-beta.5 (2021-05-26)

Bug Fixes

  • 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

3.1.0-beta.4 (2021-05-24)

Bug Fixes

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

Features

  • devtools: performance events (f7c54ca)

3.1.0-beta.3 (2021-05-12)

Bug Fixes

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

3.1.0-beta.2 (2021-05-08)

Bug Fixes

  • compat: handle and warn config.optionMergeStrategies (94e69fd)

3.1.0-beta.1 (2021-05-08)

Bug Fixes

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

Features

  • onServerPrefetch (#3070) (349eb0f)
  • support component-level compilerOptions when using runtime compiler (ce0bbe0)
  • compiler-core: whitespace handling strategy (dee3d6a)
  • config: support configuring runtime compiler via app.config.compilerOptions (091e6d6)
  • devtools: improved KeepAlive support (03ae300)
  • support casting plain element to component via is="vue:xxx" (af9e699)

Performance Improvements

  • only trigger $attrs update when it has actually changed (5566d39)
  • compiler: skip unncessary checks when parsing end tag (048ac29)