]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: Merge branch 'main' into minor
authorEvan You <evan@vuejs.org>
Wed, 31 Jul 2024 08:49:22 +0000 (16:49 +0800)
committerEvan You <evan@vuejs.org>
Wed, 31 Jul 2024 08:49:22 +0000 (16:49 +0800)
1  2 
CHANGELOG.md
package.json
packages/compiler-sfc/package.json
packages/dts-test/ref.test-d.ts
packages/reactivity/src/collectionHandlers.ts
packages/reactivity/src/ref.ts
packages/runtime-core/__tests__/hydration.spec.ts
packages/runtime-core/src/apiWatch.ts
packages/runtime-core/src/componentProps.ts
packages/runtime-core/src/components/Teleport.ts
packages/vue/__tests__/e2e/Transition.spec.ts

diff --cc CHANGELOG.md
index a286eab0c810baff3b0a6dc99744a2e94b88dc68,70d5e5a1ea49471e955c8bf0ffeac9d93ccccc58..332c549ef46ebd961a1359e68f01f2cd048cae8f
@@@ -1,21 -1,21 +1,36 @@@
- # [3.5.0-alpha.4](https://github.com/vuejs/core/compare/v3.4.34...v3.5.0-alpha.4) (2024-07-24)
+ ## [3.4.35](https://github.com/vuejs/core/compare/v3.4.34...v3.4.35) (2024-07-31)
+ ### Bug Fixes
+ * **teleport/ssr:** fix Teleport hydration regression due to targetStart anchor addition ([7b18cdb](https://github.com/vuejs/core/commit/7b18cdb0b53a94007ca6a3675bf41b5d3153fec6))
+ * **teleport/ssr:** ensure targetAnchor and targetStart not null during hydration ([#11456](https://github.com/vuejs/core/issues/11456)) ([12667da](https://github.com/vuejs/core/commit/12667da4879f980dcf2c50e36f3642d085a87d71)), closes [#11400](https://github.com/vuejs/core/issues/11400)
+ * **types/ref:** allow getter and setter types to be unrelated ([#11442](https://github.com/vuejs/core/issues/11442)) ([e0b2975](https://github.com/vuejs/core/commit/e0b2975ef65ae6a0be0aa0a0df43fb887c665251))
  
+ ### Performance Improvements
+ * **runtime-core:** improve efficiency of normalizePropsOptions ([#11409](https://github.com/vuejs/core/issues/11409)) ([5680142](https://github.com/vuejs/core/commit/5680142e68096c42e66da9f4c6220d040d7c56ba)), closes [#9739](https://github.com/vuejs/core/issues/9739)
++# [3.5.0-alpha.4](https://github.com/vuejs/core/compare/v3.4.34...v3.5.0-alpha.4) (2024-07-24)
 +
 +### Bug Fixes
 +
 +* **suspense/hydration:** fix hydration timing of async component inside suspense ([1b8e197](https://github.com/vuejs/core/commit/1b8e197a5b65d67a9703b8511786fb81df9aa7cc)), closes [#6638](https://github.com/vuejs/core/issues/6638)
 +* **useId:** properly mark async boundary for already resolved async component ([cd28172](https://github.com/vuejs/core/commit/cd281725781ada2ab279e919031ae307e146a9d9))
 +
 +
 +
  ## [3.4.34](https://github.com/vuejs/core/compare/v3.4.33...v3.4.34) (2024-07-24)
  
 +* **defineModel:** correct update with multiple changes in same tick ([#11430](https://github.com/vuejs/core/issues/11430)) ([a18f1ec](https://github.com/vuejs/core/commit/a18f1ecf05842337f1eb39a6871adb8cb4024093)), closes [#11429](https://github.com/vuejs/core/issues/11429)
 +
 +
 +
 +# [3.5.0-alpha.3](https://github.com/vuejs/core/compare/v3.4.33...v3.5.0-alpha.3) (2024-07-19)
 +
  
  ### Bug Fixes
  
diff --cc package.json
index 7b544bdbed17969de1cb50de38c4cfdde6d9ab53,c2b7b21ec9c0e9582b1436197f440d5d5380d04e..1d0b11eefb2aeb5777bd4f90805a7265821f8f72
@@@ -1,7 -1,7 +1,7 @@@
  {
    "private": true,
 -  "version": "3.4.35",
 +  "version": "3.5.0-alpha.4",
-   "packageManager": "pnpm@9.5.0",
+   "packageManager": "pnpm@9.6.0",
    "type": "module",
    "scripts": {
      "dev": "node scripts/dev.js",
Simple merge
Simple merge
index 79ec333dd0348771561c0f98d8d1cdd98642d318,9098ad4a2e5cb9c7b63e3420f0b727cbbc2d9d48..0b7d93be663100058a74a4a99d93c632f1953f2c
@@@ -190,8 -181,8 +177,8 @@@ function createIterableMethod
    return function (
      this: IterableCollections,
      ...args: unknown[]
-   ): Iterable & Iterator {
+   ): Iterable<unknown> & Iterator<unknown> {
 -    const target = (this as any)[ReactiveFlags.RAW]
 +    const target = this[ReactiveFlags.RAW]
      const rawTarget = toRaw(target)
      const targetIsMap = isMap(rawTarget)
      const isPair =
Simple merge
Simple merge
index e4e8c0709d3437849f089160bec7328141033873,ce39f150ef54079ccb5739c010dac0955e17e8a0..25431cf9f7464c82a20acd3ffcb9db4ef76e4a99
@@@ -597,9 -613,10 +615,10 @@@ function validatePropName(key: string) 
    return false
  }
  
+ // dev only
  // use function string name to check type constructors
  // so that it works across vms / iframes.
 -function getType(ctor: Prop<any>): string {
 +function getType(ctor: Prop<any> | null): string {
    // Early return for null to avoid unnecessary computations
    if (ctor === null) {
      return 'null'
index 997b83cc520bf59c8c497b18c888172d0946e241,d868fbbc6691dacf8f27ff58a226cf30d0efe158..1aa3ba6c4c13ad778e8ef179724e8788d21b6fff
@@@ -112,13 -107,20 +112,8 @@@ export const TeleportImpl = 
        const mainAnchor = (n2.anchor = __DEV__
          ? createComment('teleport end')
          : createText(''))
-       const targetStart = (n2.targetStart = createText(''))
-       const targetAnchor = (n2.targetAnchor = createText(''))
        insert(placeholder, container, anchor)
        insert(mainAnchor, container, anchor)
-       // attach a special property so we can skip teleported content in
-       // renderer's nextSibling search
-       targetStart[TeleportEndKey] = targetAnchor
 -      const target = (n2.target = resolveTarget(n2.props, querySelector))
 -      const targetAnchor = prepareAnchor(target, n2, createText, insert)
 -      if (target) {
 -        // #2652 we could be teleporting from a non-SVG tree into an SVG tree
 -        if (namespace === 'svg' || isTargetSVG(target)) {
 -          namespace = 'svg'
 -        } else if (namespace === 'mathml' || isTargetMathML(target)) {
 -          namespace = 'mathml'
 -        }
 -      } else if (__DEV__ && !disabled) {
 -        warn('Invalid Teleport target on mount:', target, `(${typeof target})`)
 -      }
  
        const mount = (container: RendererElement, anchor: RendererNode) => {
          // Teleport *always* has Array children. This is enforced in both the
          }
        }
  
-           insert(targetStart, target)
-           insert(targetAnchor, target)
 +      const mountToTarget = () => {
 +        const target = (n2.target = resolveTarget(n2.props, querySelector))
++        const targetAnchor = prepareAnchor(target, n2, createText, insert)
 +        if (target) {
 +          // #2652 we could be teleporting from a non-SVG tree into an SVG tree
 +          if (namespace !== 'svg' && isTargetSVG(target)) {
 +            namespace = 'svg'
 +          } else if (namespace !== 'mathml' && isTargetMathML(target)) {
 +            namespace = 'mathml'
 +          }
 +          if (!disabled) {
 +            mount(target, targetAnchor)
 +            updateCssVars(n2)
 +          }
 +        } else if (__DEV__ && !disabled) {
 +          warn(
 +            'Invalid Teleport target on mount:',
 +            target,
 +            `(${typeof target})`,
 +          )
 +        }
 +      }
 +
        if (disabled) {
          mount(container, mainAnchor)
 -      } else if (target) {
 -        mount(target, targetAnchor)
 +        updateCssVars(n2)
 +      }
 +
 +      if (isTeleportDeferred(n2.props)) {
 +        queuePostRenderEffect(mountToTarget, parentSuspense)
 +      } else {
 +        mountToTarget()
        }
      } else {
        // update content