@vue/compat 3.5.0-alpha.3 → 3.5.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.0-alpha.3
2
+ * @vue/compat v3.5.0-alpha.4
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -4036,6 +4036,7 @@ function defineAsyncComponent(source) {
4036
4036
  },
4037
4037
  setup() {
4038
4038
  const instance = currentInstance;
4039
+ markAsyncBoundary(instance);
4039
4040
  if (resolvedComp) {
4040
4041
  return () => createInnerComp(resolvedComp, instance);
4041
4042
  }
@@ -4057,8 +4058,6 @@ function defineAsyncComponent(source) {
4057
4058
  error: err
4058
4059
  }) : null;
4059
4060
  });
4060
- } else {
4061
- markAsyncBoundary(instance);
4062
4061
  }
4063
4062
  const loaded = ref(false);
4064
4063
  const error = ref();
@@ -6000,7 +5999,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6000
5999
  return vm;
6001
6000
  }
6002
6001
  }
6003
- Vue.version = `2.6.14-compat:${"3.5.0-alpha.3"}`;
6002
+ Vue.version = `2.6.14-compat:${"3.5.0-alpha.4"}`;
6004
6003
  Vue.config = singletonApp.config;
6005
6004
  Vue.use = (plugin, ...options) => {
6006
6005
  if (plugin && isFunction(plugin.install)) {
@@ -8533,7 +8532,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8533
8532
  const componentUpdateFn = () => {
8534
8533
  if (!instance.isMounted) {
8535
8534
  let vnodeHook;
8536
- const { el, props } = initialVNode;
8535
+ const { el, props, type } = initialVNode;
8537
8536
  const { bm, m, parent } = instance;
8538
8537
  const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
8539
8538
  toggleRecurse(instance, false);
@@ -8570,8 +8569,8 @@ function baseCreateRenderer(options, createHydrationFns) {
8570
8569
  endMeasure(instance, `hydrate`);
8571
8570
  }
8572
8571
  };
8573
- if (isAsyncWrapperVNode) {
8574
- initialVNode.type.__asyncLoader().then(
8572
+ if (isAsyncWrapperVNode && !type.__asyncResolved) {
8573
+ type.__asyncLoader().then(
8575
8574
  // note: we are moving the render call into an async callback,
8576
8575
  // which means it won't track dependencies - but it's ok because
8577
8576
  // a server-rendered async wrapper is already in resolved state
@@ -9723,7 +9722,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9723
9722
  const modifiers = getModelModifiers(props, name);
9724
9723
  const res = customRef((track, trigger) => {
9725
9724
  let localValue;
9726
- let prevSetValue;
9725
+ let prevSetValue = EMPTY_OBJ;
9727
9726
  let prevEmittedValue;
9728
9727
  watchSyncEffect(() => {
9729
9728
  const propValue = props[name];
@@ -9738,7 +9737,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9738
9737
  return options.get ? options.get(localValue) : localValue;
9739
9738
  },
9740
9739
  set(value) {
9741
- if (!hasChanged(value, localValue)) {
9740
+ if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
9742
9741
  return;
9743
9742
  }
9744
9743
  const rawProps = i.vnode.props;
@@ -9749,7 +9748,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9749
9748
  }
9750
9749
  const emittedValue = options.set ? options.set(value) : value;
9751
9750
  i.emit(`update:${name}`, emittedValue);
9752
- if (value !== emittedValue && value !== prevSetValue && emittedValue === prevEmittedValue) {
9751
+ if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
9753
9752
  trigger();
9754
9753
  }
9755
9754
  prevSetValue = value;
@@ -11463,7 +11462,7 @@ function setupStatefulComponent(instance, isSSR) {
11463
11462
  resetTracking();
11464
11463
  reset();
11465
11464
  if (isPromise(setupResult)) {
11466
- markAsyncBoundary(instance);
11465
+ if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
11467
11466
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
11468
11467
  if (isSSR) {
11469
11468
  return setupResult.then((resolvedResult) => {
@@ -11956,7 +11955,7 @@ function isMemoSame(cached, memo) {
11956
11955
  return true;
11957
11956
  }
11958
11957
 
11959
- const version = "3.5.0-alpha.3";
11958
+ const version = "3.5.0-alpha.4";
11960
11959
  const warn = warn$1 ;
11961
11960
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11962
11961
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.0-alpha.3
2
+ * @vue/compat v3.5.0-alpha.4
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3124,6 +3124,7 @@ function defineAsyncComponent(source) {
3124
3124
  },
3125
3125
  setup() {
3126
3126
  const instance = currentInstance;
3127
+ markAsyncBoundary(instance);
3127
3128
  if (resolvedComp) {
3128
3129
  return () => createInnerComp(resolvedComp, instance);
3129
3130
  }
@@ -3145,8 +3146,6 @@ function defineAsyncComponent(source) {
3145
3146
  error: err
3146
3147
  }) : null;
3147
3148
  });
3148
- } else {
3149
- markAsyncBoundary(instance);
3150
3149
  }
3151
3150
  const loaded = ref(false);
3152
3151
  const error = ref();
@@ -4800,7 +4799,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
4800
4799
  return vm;
4801
4800
  }
4802
4801
  }
4803
- Vue.version = `2.6.14-compat:${"3.5.0-alpha.3"}`;
4802
+ Vue.version = `2.6.14-compat:${"3.5.0-alpha.4"}`;
4804
4803
  Vue.config = singletonApp.config;
4805
4804
  Vue.use = (plugin, ...options) => {
4806
4805
  if (plugin && isFunction(plugin.install)) {
@@ -6806,7 +6805,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6806
6805
  const componentUpdateFn = () => {
6807
6806
  if (!instance.isMounted) {
6808
6807
  let vnodeHook;
6809
- const { el, props } = initialVNode;
6808
+ const { el, props, type } = initialVNode;
6810
6809
  const { bm, m, parent } = instance;
6811
6810
  const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
6812
6811
  toggleRecurse(instance, false);
@@ -6831,8 +6830,8 @@ function baseCreateRenderer(options, createHydrationFns) {
6831
6830
  null
6832
6831
  );
6833
6832
  };
6834
- if (isAsyncWrapperVNode) {
6835
- initialVNode.type.__asyncLoader().then(
6833
+ if (isAsyncWrapperVNode && !type.__asyncResolved) {
6834
+ type.__asyncLoader().then(
6836
6835
  // note: we are moving the render call into an async callback,
6837
6836
  // which means it won't track dependencies - but it's ok because
6838
6837
  // a server-rendered async wrapper is already in resolved state
@@ -7866,7 +7865,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
7866
7865
  const modifiers = getModelModifiers(props, name);
7867
7866
  const res = customRef((track, trigger) => {
7868
7867
  let localValue;
7869
- let prevSetValue;
7868
+ let prevSetValue = EMPTY_OBJ;
7870
7869
  let prevEmittedValue;
7871
7870
  watchSyncEffect(() => {
7872
7871
  const propValue = props[name];
@@ -7881,7 +7880,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
7881
7880
  return options.get ? options.get(localValue) : localValue;
7882
7881
  },
7883
7882
  set(value) {
7884
- if (!hasChanged(value, localValue)) {
7883
+ if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
7885
7884
  return;
7886
7885
  }
7887
7886
  const rawProps = i.vnode.props;
@@ -7892,7 +7891,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
7892
7891
  }
7893
7892
  const emittedValue = options.set ? options.set(value) : value;
7894
7893
  i.emit(`update:${name}`, emittedValue);
7895
- if (value !== emittedValue && value !== prevSetValue && emittedValue === prevEmittedValue) {
7894
+ if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
7896
7895
  trigger();
7897
7896
  }
7898
7897
  prevSetValue = value;
@@ -9377,7 +9376,7 @@ function setupStatefulComponent(instance, isSSR) {
9377
9376
  resetTracking();
9378
9377
  reset();
9379
9378
  if (isPromise(setupResult)) {
9380
- markAsyncBoundary(instance);
9379
+ if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
9381
9380
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
9382
9381
  if (isSSR) {
9383
9382
  return setupResult.then((resolvedResult) => {
@@ -9580,7 +9579,7 @@ function isMemoSame(cached, memo) {
9580
9579
  return true;
9581
9580
  }
9582
9581
 
9583
- const version = "3.5.0-alpha.3";
9582
+ const version = "3.5.0-alpha.4";
9584
9583
  const warn$1 = NOOP;
9585
9584
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9586
9585
  const devtools = void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.0-alpha.3
2
+ * @vue/compat v3.5.0-alpha.4
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3985,6 +3985,7 @@ function defineAsyncComponent(source) {
3985
3985
  },
3986
3986
  setup() {
3987
3987
  const instance = currentInstance;
3988
+ markAsyncBoundary(instance);
3988
3989
  if (resolvedComp) {
3989
3990
  return () => createInnerComp(resolvedComp, instance);
3990
3991
  }
@@ -4006,8 +4007,6 @@ function defineAsyncComponent(source) {
4006
4007
  error: err
4007
4008
  }) : null;
4008
4009
  });
4009
- } else {
4010
- markAsyncBoundary(instance);
4011
4010
  }
4012
4011
  const loaded = ref(false);
4013
4012
  const error = ref();
@@ -5949,7 +5948,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5949
5948
  return vm;
5950
5949
  }
5951
5950
  }
5952
- Vue.version = `2.6.14-compat:${"3.5.0-alpha.3"}`;
5951
+ Vue.version = `2.6.14-compat:${"3.5.0-alpha.4"}`;
5953
5952
  Vue.config = singletonApp.config;
5954
5953
  Vue.use = (plugin, ...options) => {
5955
5954
  if (plugin && isFunction(plugin.install)) {
@@ -8482,7 +8481,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8482
8481
  const componentUpdateFn = () => {
8483
8482
  if (!instance.isMounted) {
8484
8483
  let vnodeHook;
8485
- const { el, props } = initialVNode;
8484
+ const { el, props, type } = initialVNode;
8486
8485
  const { bm, m, parent } = instance;
8487
8486
  const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
8488
8487
  toggleRecurse(instance, false);
@@ -8519,8 +8518,8 @@ function baseCreateRenderer(options, createHydrationFns) {
8519
8518
  endMeasure(instance, `hydrate`);
8520
8519
  }
8521
8520
  };
8522
- if (isAsyncWrapperVNode) {
8523
- initialVNode.type.__asyncLoader().then(
8521
+ if (isAsyncWrapperVNode && !type.__asyncResolved) {
8522
+ type.__asyncLoader().then(
8524
8523
  // note: we are moving the render call into an async callback,
8525
8524
  // which means it won't track dependencies - but it's ok because
8526
8525
  // a server-rendered async wrapper is already in resolved state
@@ -9672,7 +9671,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9672
9671
  const modifiers = getModelModifiers(props, name);
9673
9672
  const res = customRef((track, trigger) => {
9674
9673
  let localValue;
9675
- let prevSetValue;
9674
+ let prevSetValue = EMPTY_OBJ;
9676
9675
  let prevEmittedValue;
9677
9676
  watchSyncEffect(() => {
9678
9677
  const propValue = props[name];
@@ -9687,7 +9686,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9687
9686
  return options.get ? options.get(localValue) : localValue;
9688
9687
  },
9689
9688
  set(value) {
9690
- if (!hasChanged(value, localValue)) {
9689
+ if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
9691
9690
  return;
9692
9691
  }
9693
9692
  const rawProps = i.vnode.props;
@@ -9698,7 +9697,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9698
9697
  }
9699
9698
  const emittedValue = options.set ? options.set(value) : value;
9700
9699
  i.emit(`update:${name}`, emittedValue);
9701
- if (value !== emittedValue && value !== prevSetValue && emittedValue === prevEmittedValue) {
9700
+ if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
9702
9701
  trigger();
9703
9702
  }
9704
9703
  prevSetValue = value;
@@ -11412,7 +11411,7 @@ function setupStatefulComponent(instance, isSSR) {
11412
11411
  resetTracking();
11413
11412
  reset();
11414
11413
  if (isPromise(setupResult)) {
11415
- markAsyncBoundary(instance);
11414
+ if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
11416
11415
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
11417
11416
  if (isSSR) {
11418
11417
  return setupResult.then((resolvedResult) => {
@@ -11905,7 +11904,7 @@ function isMemoSame(cached, memo) {
11905
11904
  return true;
11906
11905
  }
11907
11906
 
11908
- const version = "3.5.0-alpha.3";
11907
+ const version = "3.5.0-alpha.4";
11909
11908
  const warn = warn$1 ;
11910
11909
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11911
11910
  const devtools = devtools$1 ;