3.3.13 (2023-12-19)
- 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
3.3.12 (2023-12-16)
- 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)
3.3.11 (2023-12-08)
- 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
3.3.10 (2023-12-04)
- 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)
- 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)
3.3.9 (2023-11-25)
- 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
3.3.8 (2023-11-06)
- 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)
3.3.7 (2023-10-24)
- compiler-sfc: avoid gen useCssVars when targeting SSR (#6979) (c568778), closes #6926
- compiler-ssr: proper scope analysis for ssr vnode slot fallback (#7184) (e09c26b), closes #7095
- correctly resolve types from relative paths on Windows (#9446) (089d36d), closes #8671
- hmr: fix hmr error for hoisted children array in v-for (7334376), closes #6978 #7114
- reactivity: assigning array.length while observing a symbol property (#7568) (e9e2778)
- scheduler: ensure jobs are in the correct order (#7748) (a8f6638), closes #7576
- ssr: fix hydration mismatch for disabled teleport at component root (#9399) (d8990fc), closes #6152
- Suspense: calling hooks before the transition finishes (#9388) (00de3e6), closes #5844 #5952
- transition/ssr: make transition appear work with SSR (#8859) (5ea8a8a), closes #6951
- types: fix ComponentCustomProps augmentation (#9468) (7374e93), closes #8376
- types: improve
h
overload to support union of string and component (#5432) (16ecb44), closes #5431
3.3.6 (2023-10-20)
- compiler-sfc: model name conflict (#8798) (df81da8)
- compiler-sfc: support asset paths containing spaces (#8752) (36c99a9)
- compiler-ssr: fix missing scopeId on server-rendered TransitionGroup (#7557) (61c1357), closes #7554
- compiler-ssr: fix ssr compile error for select with non-option children (#9442) (cdb2e72), closes #9440
- runtime-core: delete stale slots which are present but undefined (#6484) (75b8722), closes #9109
- runtime-core: fix error when using cssvars with disabled teleport (#7341) (8f0472c), closes #7342
- teleport: ensure descendent component would be unmounted correctly (#6529) (4162311), closes #6347
- types: support contenteditable="plaintext-only" (#8796) (26ca89e)
3.3.5 (2023-10-20)
- add isGloballyWhitelisted back, but deprecated (#8556) (63dfe8e), closes #8416
- build: disable useDefineForClassFields in esbuild (#9252) (6d14fa8)
- compat: return value of vue compat set() (#9377) (e3c2d69)
- compiler-sfc: don't hoist props and emit (#8535) (24db951), closes #7805 #7812
- compiler-sfc: don't registerTS when bundling for browsers (#8582) (6f45f76)
- compiler-sfc: fix using imported ref as template ref during dev (#7593) (776ebf2), closes #7567
- compiler-sfc: handle dynamic directive arguments in template usage check (#8538) (e404a69), closes #8537
- compiler-sfc: ignore style v-bind in double slash comments (#5409) (381b497)
- compiler-sfc: pass options directly to stylus (#3848) (d6446a6)
- compiler-sfc: support resolve multiple re-export /w same source type name (#8365) (4fa8da8), closes #8364
- compiler-sfc: typo in experimental feature warnings (#8513) (fd1a3f9)
- deps: update dependency monaco-editor to ^0.44.0 (#9237) (8611874)
- deps: update playground (#9154) (c8566a2)
- playground: fix github button style (#7722) (5ee992c)
- runtime-core: swap client/server debug labels (#9089) (8f311c6)
- ssr: render correct initial selected state for select with v-model (#7432) (201c46d), closes #7392
- ssr: reset current instance if setting up options component errors (#7743) (020851e), closes #7733
- teleport: handle target change while disabled (#7837) (140a89b), closes #7835
- transition: handle possible auto value for transition/animation durations (96c76fa), closes #8409
- types/jsx: add
inert
attribute and missinghidden
values (#8090) (ceb0732) - types/jsx: add missing loading attr for img element (#6160) (68d6b43)
- types: correct withDefaults return type for boolean prop with undefined default value (#8602) (f07cb18)
- types: ensure nextTick return type reflect correct Promise value (#8406) (6a22b1f)
- types: support correct types for style on svg elements (#6322) (364dc53)
- compiler-sfc: lazy require typescript (d2c3d8b)
- custom-element: cancel
MutationObserver
listener when disconnected (#8666) (24d98f0) - mark
defineComponent
as side-effects-free (#8512) (438027c)
3.3.4 (2023-05-18)
- build: ensure correct typing for node esm (d621d4c)
- build: fix DEV flag replacement edge case (8b7c04b), closes #8353
- compiler-sfc: handle imported types from default exports (5aec717), closes #8355
3.3.3 (2023-05-18)
- avoid regex s flag for old browsers (91f1c62), closes #8316
- build: fix dev flag replacement in esm-builder builds (#8314) (003836f), closes #8312
- compiler-sfc: don't hoist regexp literial (#8300) (8ec73a3)
- compiler-sfc: fix props destructing default value type checking with unresolved type (#8340) (f69dbab), closes #8326
- compiler-sfc: fix type import from path aliased vue file (fab9c72), closes #8348
- compiler-sfc: handle ts files with relative imports with .js extension (b36addd), closes #8339
- compiler-sfc: parses correctly when inline mode is off (#8337) (ecbd42a), closes #6088
- compiler-sfc: support defineEmits type reference with unions (#8299) (b133e0f), closes #7943
- types: support generic usage with withDefaults + defineProps (#8335) (216f269), closes #8310 #8331 #8325
3.3.2 (2023-05-12)
- compiler-core: treat floating point numbers as constants (8dc8cf8), closes #8295
- compiler-dom: do not throw in production on side effect tags (c454b9d), closes #8287 #8292
- compiler-sfc: fix regression on props destructure when transform is not enabled (f25bd37), closes #8289
- compiler-sfc: handle prop keys that need escaping (#7803) (690ef29), closes #8291
- compiler-sfc: properly parse d.ts files when resolving types (aa1e77d), closes #8285
- compiler-sfc: raise specific warning for failed extends and allow ignoring extends (8235072), closes #8286
3.3.1 (2023-05-11)
- suspense: handle nested sync suspense for hydration (a3f5485)
3.3.0 Rurouni Kenshin (2023-05-11)
-
For a detailed walkthrough of the new features in 3.3, please read the release blog post.
-
Features and deprecations listed here are aggregated from the beta and alpha releases. For full chronological history, bug fixes, and other minor features, please consult the individual logs of the 3.3 beta and alpha releases.
- sfc: support imported types in SFC macros (#8083)
- types/slots: support slot presence / props type checks via
defineSlots
macro andslots
option (#7982) (5a2f5d5) - sfc: support more ergnomic defineEmits type syntax (#7992) (8876dcc)
- sfc: introduce
defineModel
macro anduseModel
helper (#8018) (14f3d74) - reactivity: improve support of getter usage in reactivity APIs (#7997) (59e8284)
- compiler-sfc: add defineOptions macro (#5738) (bcf5841)
- types/jsx: support jsxImportSource, avoid global JSX conflict (#7958) (d0b7ef3)
- dx: improve readability of displayed types for props (4c9bfd2)
- app: app.runWithContext() (#7451) (869f3fb)
- hasInjectionContext() for libraries (#8111) (5510ce3)
- allow accessing console in template (#6508) (fe76224), closes #7939
- suspense: introduce suspensible option for
<Suspense>
(#6736) (cb37d0b), closes #5513 - compiler-dom: treat inert as boolean attribute (#8209) (918ec8a), closes #8208
- types: add slots types for built-in components (#6033) (3cb4dc9)
- types: provide ExtractPublicPropTypes utility type (bff63c5), closes #5272 #8168
- compiler-sfc: expose parseCache (4576548), closes #8202
- deprecation: deprecate @vnode hooks in favor of vue: prefix (5f0394a)
- deprecation: deprecate v-is directive (bbd8301)
- deprecation: unwrap injected refs in Options API by default, deprecate app.config.unwrapInjectedRefs (526fa3b)
3.3.0-beta.5 (2023-05-08)
- build: retain defineComponent() treeshakability in Rollup (c2172f3), closes #8236
- compiler-sfc: enable props destructure when reactivity transform option is enabled (862edfd)
- compiler-sfc: fix built-in type resolving in external files (6b194bc), closes #8244
- compiler-sfc: transform destructured props when reactivity transform option is enabled (#8252) (287bd99)
- runtime-core: ensure defineComponent name in extraOptions takes higher priority (b2be75b)
- runtime-dom: check attribute value when setting option value (#8246) (4495373), closes #8227
- suspense: fix nested suspensible suspense with no asyn deps (e147512), closes #8206
- types: remove short syntax support in defineSlots() (1279b17)
3.3.0-beta.4 (2023-05-05)
- runtime-core: handle template ref with number values (#8233) (1b1242f), closes #8230
- types: retain compatibility for provide() usage with explicit type parameter (038cd83)
- compiler-dom: treat inert as boolean attribute (#8209) (918ec8a), closes #8208
- types: add slots types for built-in components (#6033) (3cb4dc9)
- types: provide ExtractPublicPropTypes utility type (bff63c5), closes #5272 #8168
3.3.0-beta.3 (2023-05-01)
- compiler-core: handle slot argument parsing edge case (b434d12)
- hmr: keep slots proxy mutable for hmr (c117d9c), closes #8188
- types: fix provide type checking for ref value (de87e6e), closes #8201
3.3.0-beta.2 (2023-04-25)
- compiler-sfc: avoid all hard errors when inferring runtime type (2d9f6f9)
- compiler-sfc: normalize windows paths when resolving types (#8136) (29da504)
- compiler-sfc: props bindings should not override user declared bindings (433a58c), closes #8148
- compiler-sfc: infer ref binding type for more built-in methods (a370e80)
3.3.0-beta.1 (2023-04-21)
- allow accessing console in template (#6508) (fe76224), closes #7939
- compiler-sfc: improve utility type Partial and Required (#8103) (1d1d728)
- deprecation: deprecate @vnode hooks in favor of vue: prefix (5f0394a)
- deprecation: deprecate v-is directive (bbd8301)
- deprecation: unwrap injected refs in Options API by default, deprecate app.config.unwrapInjectedRefs (526fa3b)
- suspense: introduce suspensible option for
<Suspense>
(#6736) (cb37d0b), closes #5513
3.3.0-alpha.13 (2023-04-20)
- compiler-sfc: handle type merging + fix namespace access when inferring type (d53e157), closes #8102
- compiler-sfc: normalize filename when invalidating cache (9b5a34b)
- hmr: always traverse static children in dev (f17a82c), closes #7921 #8100
- hmr: force update cached slots during HMR (94fa67a), closes #7155 #7158
- compiler-sfc: support dynamic imports when resolving types (4496456)
- compiler-sfc: support export * when resolving types (7c3ca3c)
- compiler-sfc: support ExtractPropTypes when resolving types (50c0bbe), closes #8104
- hasInjectionContext() for libraries (#8111) (5510ce3)
3.3.0-alpha.12 (2023-04-18)
- compiler: fix expression codegen for literal const bindings in non-inline mode (0f77a2b)
3.3.0-alpha.11 (2023-04-17)
- compiler-sfc: normalize windows paths when resolving types (271df09)
3.3.0-alpha.10 (2023-04-17)
- hmr: invalidate cached props/emits options on hmr (4b5b384)
- runtime-core: properly merge props and emits options from mixins (#8052) (c94ef02), closes #7989
- compiler-sfc: expose type import deps on compiled script block (8d8ddd6)
- compiler-sfc: expose type resolve APIs (f22e32e)
- compiler-sfc: mark props destructure as experimental and require explicit opt-in (6b13e04)
- compiler-sfc: support intersection and union types in macros (d1f973b), closes #7553
- compiler-sfc: support limited built-in utility types in macros (1cfab4c)
- compiler-sfc: support mapped types, string types & template type in macros (fb8ecc8)
- compiler-sfc: support namespace members type in macros (5ff40bb)
- compiler-sfc: support relative imported types in macros (8aa4ea8)
- compiler-sfc: support resolving type imports from modules (3982bef)
- compiler-sfc: support specifying global types for sfc macros (4e028b9), closes /github.com/vuejs/core/pull/8083#issuecomment-1508468713
- compiler-sfc: support string indexed type in macros (3f779dd)
- compiler-sfc: support string/number indexed types in macros (760755f)
- compiler: use source-map-js (19e17a9)
3.3.0-alpha.9 (2023-04-08)
- compiler-sfc: accept
StringLiteral
node indefineEmit
tuple syntax (#8041) (3ccbea0), closes #8040 - compiler-sfc: fix binding type for constants when hoistStatic is disabled (#8029) (f7f4624)
- compiler-sfc: skip empty
defineOptions
and support TypeScript type assertions (#8028) (9557529) - compiler-ssr: disable v-once transform in ssr vdom fallback branch (05f94cf), closes #7644
- types: improve defineProps return type with generic arguments (91a931a)
- types: more public type argument order fix (af563bf)
- types: retain type parameters order for public types (bdf557f)
- app: app.runWithContext() (#7451) (869f3fb)
- sfc: introduce
defineModel
macro anduseModel
helper (#8018) (14f3d74)
- Revert "chore: remove unused args passed to ssrRender" (b117b88)
3.3.0-alpha.8 (2023-04-04)
3.3.0-alpha.7 (2023-04-03)
- compiler-dom: handle newlines when evaluating constants during stringification (#7995) (5261085), closes #7994
- compiler-sfc: use dynamic defaults merging for methods with computed keys (482f2e3), closes #7113
- compiler-sfc: codegen support for defineEmits() short syntax (followup of #7992) (ef73ea5)
- compiler-sfc: support arbitrary expression as withDefaults argument (fe61944), closes #6459
- reactivity: improve support of getter usage in reactivity APIs (#7997) (59e8284)
- sfc: revert withDefaults() deprecation (4af5d1b)
- sfc: support more ergnomic defineEmits type syntax (#7992) (8876dcc)
- types/slots: support slot presence / props type checks via
defineSlots
macro andslots
option (#7982) (5a2f5d5)
3.3.0-alpha.6 (2023-03-30)
- compiler-core: check if expression is constant (#7974) (77686cf), closes #7973
- compiler-core: fix codegen for literal const in non-inline mode (6bda4b6)
- compiler-sfc: allow
<script>
with lang='js' (#7398) (9f5e20c) - compiler-sfc: avoid codegen conflict with user variable named
expose
(#7949) (c839129), closes #7890 - compiler-sfc: disallow
expose
property indefineOptions
(#7967) (93f7729) - compiler-sfc: fix defineExpose() codegen regression from #7949 (a94072d)
- compiler-sfc: fix edge case of default export call with no args (#7536) (d60e58c), closes #7534
- compiler-sfc: fix function default value handling w/ props destructure (e10a89e)
- compiler-sfc: handle more TS built-in utilities in defineProps inference (4355d24)
- compiler-sfc: infer function prop type from type literal w/ callable signature (#7119) (3a7572c)
- compiler-sfc: infer object type for empty type literal (1a04fba)
- compiler-sfc: infer runtime type in defineProps (#7972) (ba4cec3)
- compiler-sfc: infer TS Extract&Exclude runtime type (#7339) (6391daf), closes #7337 #6252
- compiler-sfc: infer TSIntersectionType in defineProps (#7394) (151a8ad)
- compiler-sfc: properly handle unknown types in runtime prop inference (5fb406e), closes #7511
- compiler-sfc: properly remove comma of multiple macros in the same declaration (#7423) (336a3d7), closes #7422 #6778
- compiler-sfc: rewrite default export with AST analysis instead of regex (#7068) (701b95f), closes #7038 #7041 #7078
- compiler-sfc: unwrap TS node for defineProps (#7340) (1b69d5f)
- compiler-sfc: use prependLeft to handle CSSVars (#7760) (139104b)
- jsx-runtime: fix automatic runtime implementation (#7959) (5838950)
- jsx-runtime: handle keys (#7976) (ff60b93)
- types/jsx: jsx-runtime types for global JSX namespace registration (#7978) (0f73f39)
- types/jsx: move JSX DOM types back to
@vue/runtime-dom
(#7979) (ffe679c) - types/jsx: remove $slots children override (28e30c8)
- types: revert jsx global removal (to be removed in 3.4) (e224922)
- compiler-core: support parsing
const
modifier in type parameters (#7912) (b7bd50f) - compiler-sfc: add defineOptions macro (#5738) (bcf5841)
- compiler-sfc: enable reactive props destructure by default (#7986) (ba9c2ae)
- compiler-sfc: improve runtime props inference for enum (eded947)
- compiler-sfc: support generating variable instead of default export in compileScript (71635be)
- compiler-sfc: support module string names syntax (#7428) (0002567)
- complier-sfc: hoist literal constants for script (#5752) (7def8b1), closes #5750
- runtime-core: add skipCheck for prop (#7548) (63ad77f)
- sfc: deprecate reactivity transform (efb54e7)
- types:
defineComponent()
with generics support (#7963) (d77557c), closes #3102
- types: The type of
defineComponent()
when passing in a function has changed. This overload signature is rarely used in practice and the breakage will be minimal, so repurposing it to something more useful should be worth it.
3.3.0-alpha.5 (2023-03-26)
- runtime-core: support
getCurrentInstance
across mutiple builds of Vue (8d2d5bf) - types: ensure defineProps with generics return correct types (c288c7b)
- dx: improve readability of displayed types for props (4c9bfd2)
- types/jsx: support jsxImportSource, avoid global JSX conflict (#7958) (d0b7ef3)
-
In the next minor (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.For TSX users, it is suggested to set jsxImportSource to
'vue'
intsconfig.json
after upgrading to 3.3, or opt-in per file with/* @jsxImportSource vue */
. This will allow you to opt-in to the new behavior now and upgrade seamlessly when 3.4 releases.If there is code that depends on the presence of the global
JSX
namespace, you can retain the exact pre-3.4 global behavior by explicitly referencingvue/jsx
, which registers the globalJSX
namespace.Note that the planned change in 3.4 is a type-only breaking change in a minor release, which adheres to our release policy.
3.3.0-alpha.4 (2023-02-06)
- build: fix const enum w/ number values (92bb189)
3.3.0-alpha.3 (2023-02-06)
- build: avoid const enum conflicts (d1181ad)
3.3.0-alpha.2 (2023-02-05)
- build: fix dev flag replacement in esm-bundler builds (5851eaa)
3.3.0-alpha.1 (2023-02-05)
- build: ensure BaseTransition functions can be tree-shaken (3a6f5eb)