Commit Graph

2414 Commits

Author SHA1 Message Date
Evan You 8c3fdd1a7d
release: v3.5.0-beta.3 2024-08-20 08:24:06 +08:00
Rizumu Ayaka 205e5b5e27
feat(reactivity): base `watch`, `getCurrentWatcher`, and `onWatcherCleanup` (#9927) 2024-08-20 08:21:44 +08:00
yangxiuxiu 44973bb3e7
fix(types): strip non-prop default values from return type of withDefaults (#9998)
close #9899
2024-08-19 16:29:43 +08:00
zhangenming bb6babca8f
perf( runtime-core): use `apply` to avoid spreading. (#5985) 2024-08-19 16:25:01 +08:00
edison ac2a410e46
fix(runtime-core): ensure suspense content inherit scopeId (#10652)
close #5148
2024-08-19 16:19:24 +08:00
skirtle 4b608a9449
refactor(scheduler): remove invalidateJob (#11650)
Co-authored-by: Evan You <evan@vuejs.org>
2024-08-19 10:49:59 +08:00
skirtle 7fbf4964e4
refactor(scheduler): remove redundant sorting (#11646) 2024-08-19 10:17:45 +08:00
skirtle b332f80f0e
fix(runtime-core): pre jobs without an id should run first (#7746) 2024-08-19 10:13:50 +08:00
Jakob 8bcaad4a32
fix(watch): handle errors in computed used as watch source (#11626)
close #11624
2024-08-16 16:14:08 +08:00
山吹色御守 d7d0371e74
fix(runtime-core): correct type inference for PascalCase emits (#11579)
fix vuejs/language-tools#4269
2024-08-15 17:49:43 +08:00
Evan You 7d700c215d
release: v3.5.0-beta.2 2024-08-15 15:29:43 +08:00
Evan You e19fc27042
fix(custom-element): keep instance.isCE for backwards compat 2024-08-15 15:18:19 +08:00
Raman Paulau c96ec67c87
chore(types): update examples in JSDoc for augmenting global properties and custom options to align with docs (#11609) 2024-08-14 15:12:13 +08:00
Tycho 5cf5a1620d
fix(types/computed): ensure type safety for `WritableComputedRef` (#11608) 2024-08-14 15:11:10 +08:00
linzhe 3bda3e83fd
fix(reactivity): sync watch should be executed correctly (#11589)
close #11577
2024-08-13 22:54:08 +08:00
btea 3653bc0f45
fix(keep-alive): ensure include/exclude regexp work with global flag (#11595) 2024-08-13 22:07:35 +08:00
edison 73fa91fabd
refactor: remove unnecessary check as filter is always non-null (#11599) 2024-08-13 22:05:14 +08:00
Evan You 90caac473d
test(custom-element): test custom element hydration w/ declarative shadow dom 2024-08-10 16:39:20 +08:00
Evan You 23e098807b
release: v3.5.0-beta.1 2024-08-08 23:31:46 +08:00
Evan You 741d8a0710
chore: Merge branch 'main' into minor 2024-08-08 23:06:53 +08:00
Kevin Deng 三咲智子 928af5fe2f
refactor(types): enable `isolatedDeclarations` (#11178) 2024-08-08 23:05:21 +08:00
Evan You 28db2e69f4
release: v3.4.37 2024-08-08 22:36:10 +08:00
Evan You 1ef8f46af0
feat(custom-element): expose this.$host in Options API 2024-08-08 12:40:40 +08:00
LiuSeen e0428884b5
fix(defineModel): detect changes respect custom getter and setter (#11543)
fix: #11541
fix: #11526
close: #11527
2024-08-07 22:10:01 +08:00
Evan You eaf5455d77
chore: Merge branch 'main' into minor 2024-08-07 18:25:58 +08:00
Evan You b1abac06cd
fix: Revert "fix(types/ref): allow getter and setter types to be unrelated (#11442)"
This reverts commit e0b2975ef6.

This change requires TypeScript 5.1 so it is moved to a minor release.
2024-08-07 18:12:07 +08:00
Evan You 978ff3c1db
fix(custom-element): fix custom-element double render on immediate prop change
fix #9885
close #11335
2024-08-07 17:44:11 +08:00
Alex Liu 1058ce8e74
fix(types): allow `DirectiveArguments` third parameter to accept undefined (#11540) 2024-08-07 17:02:15 +08:00
Evan You 6758c3cd04
feat(custom-element): support configurable app instance in defineCustomElement
Support configuring via `configureApp` option:

```js
defineCustomElement({
  // ...
}, {
  configureApp(app) {
    // ...
  }
})
```

close #4356
close #4635
2024-08-07 16:08:06 +08:00
Michael Brevard 261c8b111d
feat(hydration): allow fine tuning of lazy hydration strategy triggers (#11530) 2024-08-07 12:06:15 +08:00
edison 7e75de002f
fix(runtime-core): prioritize using the provides from currentApp in nested createApp (#11502)
close #11488
2024-08-07 12:02:38 +08:00
かっこかり 81351dc7fb
fix(keep-alive): fix render error in cached is undefined (#11496)
fix #11427
close #11431
2024-08-07 11:58:44 +08:00
Yuyao Nie 6c90324870
fix(ssr): ensure content is valid when rendering normal slot (#11491)
fix #11326
2024-08-07 11:56:00 +08:00
skirtle e359ff0046
fix(runtime-core): fix warning for missing event handler (#11489)
fix #4803
close #8268
2024-08-07 11:29:41 +08:00
edison a917c0539c
fix(keep-alive): avoid cache suspense comment root (#11479) 2024-08-07 11:24:17 +08:00
Kevin Deng 三咲智子 8a99f903db
style: format html&markdown files (#11531) 2024-08-07 10:57:18 +08:00
Evan You 63689ed776
fix(custom-element): reflect prop default value on custom element
close #9006
close #10537
2024-08-07 02:51:29 +08:00
Evan You bcb9a70290
types: custom element interface should be internal 2024-08-07 02:33:20 +08:00
vue-bot 1cbbb04008 release: v3.4.36 2024-08-06 14:00:05 +00:00
edison 917c0631cc
chore: fix typo (#11522) 2024-08-06 18:20:40 +08:00
Evan You 7d473b7721
fix(hydration): force hydrate custom element dynamic props
close #7203
close #8038
2024-08-06 15:58:45 +08:00
Evan You 56c76a8b05
feat(custom-element): inject child components styles to custom element shadow root (#11517)
close #4662
close #7941
close #7942
2024-08-05 20:49:28 +08:00
Evan You b74687c0bb
refactor: isCE -> ce 2024-08-05 16:33:48 +08:00
Tycho 4592b63c6a
fix(types/withDefaults): ensure default values of type `any` do not include `undefined` (#11490) 2024-08-05 10:59:44 +08:00
btea 3430bffa4b
test(runtime-core): test cases when the value of the `$stable` flag is false (#11485) 2024-08-05 10:53:21 +08:00
Tycho 5ffd1a8945
feat(types): provide internal options for using refs type in language tools (#11492) 2024-08-05 10:50:43 +08:00
Evan You 5a1a89bd61
feat(custom-element): useShadowRoot() helper
close #6113
close #8195
2024-08-03 14:19:19 +08:00
Evan You 37d2ce5d8e
feat(custom-element): support shadowRoot: false in defineCustomElement()
close #4314
close #4404
2024-08-03 13:14:22 +08:00
远方os 267093c314
feat(reactivity/watch): add pause/resume for ReactiveEffect, EffectScope, and WatchHandle (#9651) 2024-08-02 14:41:27 +08:00
Tycho 55acabe88c
dx(useTemplateRef): warn when declaring with the same key (#11462) 2024-08-02 13:18:58 +08:00
Haoqun Jiang 6d4eb94853
feat(runtime-dom): Trusted Types compatibility (#10844) 2024-08-02 12:46:12 +08:00
Damian Głowala 998dca59f1
feat(types): export `MultiWatchSources` type (#9563) 2024-08-02 12:43:22 +08:00
远方os 22f7d96757
feat(watch): support passing number to `deep` option to control the watch depth (#9572) 2024-08-02 11:38:07 +08:00
Evan You 321d80758c
fix(types): allow using InjectionKey as valid property key
close #5089
2024-08-02 11:11:03 +08:00
Evan You 1fbfa6962b
feat: support specifying allowed keys via generic argument in useTemplateRef() 2024-08-01 11:13:56 +08:00
Evan You f6babf3236
release: v3.5.0-alpha.5 2024-07-31 16:57:19 +08:00
Evan You f35080daf5
chore: Merge branch 'main' into minor 2024-07-31 16:49:22 +08:00
Evan You 0b8ba6320e
release: v3.4.35 2024-07-31 16:42:04 +08:00
Evan You 7b18cdb0b5
fix(teleport/ssr): fix Teleport hydration regression due to targetStart anchor addition 2024-07-31 16:10:23 +08:00
edison 12667da487
fix(Teleport): ensure targetAnchor and targetStart not null during hydration (#11456)
close #11400
2024-07-31 15:46:39 +08:00
Evan You d14a11c1cd
feat: lazy hydration strategies for async components (#11458) 2024-07-31 12:14:51 +08:00
skirtle 5680142e68
perf(runtime-core): improve efficiency of normalizePropsOptions (#11409)
close #9739
2024-07-29 21:47:23 +08:00
Tycho e0b2975ef6
fix(types/ref): allow getter and setter types to be unrelated (#11442) 2024-07-29 10:52:38 +08:00
Tycho e28c58138c
refactor(reactivity): simplify the wrapping logic for returned values in array instrumentations (#11434) 2024-07-29 09:22:18 +08:00
Evan You 94fb2b8106
feat(hydration): support suppressing hydration mismatch via data-allow-mismatch 2024-07-25 11:22:27 +08:00
Evan You 4ffd9db703
release: v3.5.0-alpha.4 2024-07-24 23:41:40 +08:00
Evan You fa6c5d8d32
chore: Merge branch 'main' into minor 2024-07-24 23:37:31 +08:00
Evan You 9111252042
release: v3.4.34 2024-07-24 23:30:30 +08:00
Evan You b5cad0e91c
refactor: use hasChanged for useModel comparisons 2024-07-24 23:26:13 +08:00
Tycho a18f1ecf05
fix(defineModel): correct update with multiple changes in same tick (#11430)
close #11429
2024-07-24 23:25:22 +08:00
Evan You cd28172578
fix(useId): properly mark async boundary for already resolved async component 2024-07-24 23:08:56 +08:00
Evan You 2a55f2267d
test: add test case for useId 2024-07-24 22:50:31 +08:00
Evan You 1b8e197a5b
fix(suspense/hydration): fix hydration timing of async component inside suspense
close #6638
2024-07-24 22:15:25 +08:00
Evan You e255c31c88
refactor: remove unnecessary else 2024-07-24 21:58:04 +08:00
Evan You ee11f43623
release: v3.5.0-alpha.3 2024-07-19 18:14:31 +08:00
Evan You 66579ea544
chore: Merge branch 'main' into minor 2024-07-19 18:07:42 +08:00
Evan You 73ef1561f6
feat(runtime-core): useId() (#11404) 2024-07-19 18:06:02 +08:00
Evan You 422ef34e48
release: v3.4.33 2024-07-19 17:24:34 +08:00
edison 1b81d14bfd
refactor(runtime-core): remove attrsProxy and slotsProxy from instance (#11390) 2024-07-19 17:02:14 +08:00
Evan You 3f8cbb2379
chore: move useTemplateRef tests 2024-07-19 15:50:20 +08:00
Evan You 68bb48c04e
refactor: move useTemplateRef file 2024-07-19 10:50:06 +08:00
Evan You 4c03ab2224
test(teleport): test for accessing template ref inside teleport in mounted 2024-07-18 21:15:27 +08:00
Evan You 59a3e88903
feat(teleport): support deferred Teleport (#11387)
close #2015
close #11386
2024-07-18 21:06:48 +08:00
Evan You 3ba70e49b5
feat: useTemplateRef() 2024-07-17 18:20:23 +08:00
Evan You f15ba2c2e2
chore: Merge branch 'main' into minor 2024-07-17 17:32:31 +08:00
Evan You fd5c001ec7
release: v3.4.32 2024-07-17 17:07:05 +08:00
yangxiuxiu f1bb0aef08
fix(runtime-core): do not emit when defineModel ref is set with same value (#11162)
close #11125
2024-07-17 16:46:10 +08:00
linzhe 3e9e32ee0a
fix(runtime-dom): properly handle innerHTML unmount into new children (#11159)
close #9135
2024-07-17 16:37:14 +08:00
Evan You 3dc5a1ad98
test: test case for #11286 2024-07-17 14:29:54 +08:00
Evan You c10e40a217
fix(hydration): fix tracking of reactive style objects in production
close #11372
2024-07-17 12:14:25 +08:00
Evan You f476b7f030
feat(runtime-core): add app.config.throwUnhandledErrorInProduction
close #7876
2024-07-17 10:05:09 +08:00
Evan You 3ee7b4c7b1
fix(runtime-core): avoid recursive warning
close #8074
2024-07-16 18:05:44 +08:00
Evan You 8655ced480
fix(teleport): skip teleported nodes when locating patch anchor
close #9071
close #9134
close #9313

Tests reused from #9313
2024-07-16 17:17:25 +08:00
Linghao Su 2d854414fa
test(runtime-core): test effectscope instance null (#8397) 2024-07-16 11:40:53 +08:00
Evan You f44c3b37d4
fix(hydration): handle consectuvie text nodes during hydration
close #7285
close #7301
2024-07-16 11:09:00 +08:00
skirtle b0aa234e5e
fix(runtime-core): use separate prop caches for components and mixins (#11350)
Co-authored-by: Red Huang <gcaaa31928@gmail.com>

close #7998
2024-07-15 21:56:37 +08:00
_Kerman c8b9794575
fix(hmr): hmr reload should work with async component (#11248) 2024-07-15 21:54:53 +08:00
Evan You d343a0dc01
fix(v-once): properly unmount v-once cached trees
close #5154
close #8809
2024-07-13 21:38:32 +08:00
Evan You 2815531fd5
refactor: memoIndex -> cacheIndex 2024-07-13 21:05:06 +08:00
Evan You aef807746a
refactor(compiler): move patchFlag text generation to codegen phase 2024-07-13 19:40:04 +08:00
Evan You f05b3ae0f8
chore: improve comments 2024-07-13 15:40:09 +08:00
skirtle 7fb6eb882b
fix(v-model): component v-model modifiers trim and number when cases don't match (#9609)
close #4848
close #4850 (based on commits from #4850)

Co-authored-by: zhaozhongyu <zhaozhongyu@xunlei.com>
Co-authored-by: Evan You <evan@vuejs.org>
2024-07-13 14:57:37 +08:00
Evan You d76dd9c58d
fix(runtime-core): force diff slot fallback content and provided content
fix #7256
fix #9200
fix #9308

close #7266
close #9213
2024-07-12 18:26:11 +08:00
Evan You 685e3f381c
fix(runtime-core): more edge case fix for manually rendered compiled slot
close #11336
2024-07-12 17:29:42 +08:00
Evan You 314ce82e47
test: test case for 3d34f406a / #10870 2024-07-12 01:25:08 +08:00
Evan You ee0248accf
fix(runtime-core): errors during component patch should be caught by error handlers 2024-07-12 01:24:17 +08:00
Evan You 3d34f406ac
fix(runtime-core): bail manually rendered compiler slot fragments in all cases
Previously this bail was only applied on updates but not on initial mount,
and leads to different patch code paths between mount and update in edge
cases.

close #10870
2024-07-12 00:34:23 +08:00
白雾三语 23cd61423c
chore(repl): avoid duplicate formatter mounts (#10472)
close #10466
2024-07-11 17:30:41 +08:00
Evan You de174e1aa7
fix(defineModel): force local update when setter results in same emitted value
fix #10279
fix #10301
2024-07-11 17:00:39 +08:00
Evan You f2acd51340
release: v3.4.31 2024-06-28 10:14:29 +08:00
Tycho 00341e8d66
chore: fix typo (#11195) [ci skip] 2024-06-24 10:26:17 +08:00
Evan You 7d06ca3a83
chore: Merge branch 'main' into minor 2024-06-22 21:05:15 +08:00
Evan You 582cd2e9bc
release: v3.4.30 2024-06-22 20:59:53 +08:00
Evan You a959781dd6
fix(runtime-core): update devtool __vnode on patch, avoid memory leak during dev
close #11192
2024-06-22 20:54:46 +08:00
Evan You 3169c91493
fix(hydration): skip prop mismatch check for directives that mutate DOM in created
close #11189
2024-06-22 18:05:45 +08:00
yangxiuxiu 7ad67ced26
fix(hydration): fix css vars hydration mismatch false positive on attr-fallthrough (#11190)
close #11188
2024-06-22 17:49:25 +08:00
Fernando Fernández 80ba50d74c
refactor(built-ins): remove unused code from Teleport and Suspense components (#11139) 2024-06-22 17:10:16 +08:00
XiaoDong 8c4d7f5dd9
chore: remove dead links (#11173) [ci skip] 2024-06-22 16:55:37 +08:00
Tycho 220fe24748
fix(runtime-core): ensure unmount dynamic components in optimized mode (#11171)
close #11168
2024-06-22 16:54:56 +08:00
Evan You e5ca13a3af
release: v3.4.29 2024-06-14 18:02:36 +02:00
Evan You 26356264d2
chore: Merge branch 'main' into minor 2024-06-14 12:32:28 +02:00
Evan You 3e89a0da21
release: v3.4.28 2024-06-14 11:30:16 +02:00
Tycho b557d3fb8a
fix(runtime-core): avoid traversing static children for vnodes w/ PatchFlags.BAIL (#11115)
close #10547
2024-06-14 17:10:13 +08:00
Micha Huhn 70773d0098
docs: fix typo (#11105) 2024-06-11 14:19:52 +08:00
Evan You df686abb4f
fix(ssr): directive binding.instance should respect exposed during ssr
close #7499
close #7502
2024-06-10 17:46:59 +08:00
Evan You 9daf90e29f
refactor(runtime-core): extract getComponentPublicInstance helper 2024-06-10 17:37:32 +08:00
dopamine 612bbf0507
fix(types): improve `app.provide` type checking (#10603)
close #10602
2024-06-10 16:09:46 +08:00
Tycho aae2d78875
fix(types/apiWatch): correct type inference for reactive array (#11036)
close #9416
2024-06-10 16:07:25 +08:00
edison edf263847e
fix(runtime-core): fix stale v-memo after v-if toggle (#6606)
close #6593
2024-06-07 17:29:28 +08:00
Rodrigo Pimentel 5afc76c229
fix(hydration): log hydration error even when using async components (#9403)
close #9369
2024-06-07 15:45:16 +08:00
edison aa156ed5c4
fix(runtime-core): do not fire mount/activated hooks if unmounted before mounted (#9370)
close #8898
close #9264
close #9617
2024-06-07 13:48:50 +08:00
tomasvn 32262a9af5
chore: use PropertyKey type (#11056)
close #8559
2024-06-06 18:23:21 +08:00
Evan You 8d606c44ec
chore: format 2024-06-05 23:41:40 +08:00
Noel De Martin 635a59b96f
fix(types): support generic argument in setup context expose method (#8507) 2024-06-05 23:36:52 +08:00
auvred b310ec389d
fix(runtime-core): fix missed updates when passing text vnode to `<component :is>` (#8304)
close #8298
2024-06-05 23:08:46 +08:00
Evan You 96e4738334
fix(types): respect props with default on instance type when using __typeProps 2024-06-05 14:19:31 +08:00
iwusong be1e9bf03f
test: test for events when component updating (#7896)
test for #5517
2024-06-04 23:04:11 +08:00
edison 671cf297a5
fix(transition): ensure Transition enterHooks are updated after clone (#11066)
close #11061
2024-06-04 22:07:42 +08:00
AlexVagrant ef2e737577
fix(runtime-core): fix Transition for components with root-level v-if (#7678)
close #7649
2024-06-04 22:06:07 +08:00
Evan You cd0ea0d479
fix(compiler-core): change node hoisting to caching per instance (#11067)
close #5256
close #9219
close #10959
2024-06-04 20:09:54 +08:00
Thorsten Lünborg c521f956e1
fix(runtime-core): ensure suspense creates dep component's render effect with correct optimized flag (#7689)
close #7688
2024-05-31 23:57:37 +08:00
Thorsten Lünborg c73847f2be
fix(compat): ensure proper handling of render fuction from SFC using Vue.extend (#7781)
close #7766
2024-05-31 23:49:18 +08:00
Zeke Zhang 36bd9b0a1f
fix(hmr): avoid infinite recursion when reloading hmr components (#6936)
close #6930
2024-05-31 23:41:13 +08:00
Alex Liu f8994da00f
types: improve readability of built-in type (#9129) 2024-05-30 19:41:38 +08:00
远方os 70f2f283ee
refactor(types/compat): improve the types for $set and $delete (#8719) 2024-05-30 18:27:38 +08:00
bqy_fe 189573dcee
feat(types): export more emit related types (#11017)
Co-authored-by: Evan You <yyx990803@gmail.com>
2024-05-30 11:26:17 +08:00
Evan You 8708a7f1ef
chore: fix lint 2024-05-30 11:25:39 +08:00
Evan You 1d8727ec97
chore: Merge branch 'main' into minor 2024-05-30 11:21:12 +08:00
skirtle a3e8aafbcc
fix(watch): support traversing symbol properties in deep watcher (#10969)
close #402
2024-05-30 11:03:44 +08:00
Yi Yang 15ee43f66a
fix(teleport): do not throw target warning when teleport is disabled (#9818) 2024-05-30 10:51:30 +08:00