@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.
@@ -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
  **/
@@ -3918,6 +3918,7 @@ function defineAsyncComponent(source) {
3918
3918
  },
3919
3919
  setup() {
3920
3920
  const instance = currentInstance;
3921
+ markAsyncBoundary(instance);
3921
3922
  if (resolvedComp) {
3922
3923
  return () => createInnerComp(resolvedComp, instance);
3923
3924
  }
@@ -3939,8 +3940,6 @@ function defineAsyncComponent(source) {
3939
3940
  error: err
3940
3941
  }) : null;
3941
3942
  });
3942
- } else {
3943
- markAsyncBoundary(instance);
3944
3943
  }
3945
3944
  const loaded = ref(false);
3946
3945
  const error = ref();
@@ -5882,7 +5881,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5882
5881
  return vm;
5883
5882
  }
5884
5883
  }
5885
- Vue.version = `2.6.14-compat:${"3.5.0-alpha.3"}`;
5884
+ Vue.version = `2.6.14-compat:${"3.5.0-alpha.4"}`;
5886
5885
  Vue.config = singletonApp.config;
5887
5886
  Vue.use = (plugin, ...options) => {
5888
5887
  if (plugin && isFunction(plugin.install)) {
@@ -8415,7 +8414,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8415
8414
  const componentUpdateFn = () => {
8416
8415
  if (!instance.isMounted) {
8417
8416
  let vnodeHook;
8418
- const { el, props } = initialVNode;
8417
+ const { el, props, type } = initialVNode;
8419
8418
  const { bm, m, parent } = instance;
8420
8419
  const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
8421
8420
  toggleRecurse(instance, false);
@@ -8452,8 +8451,8 @@ function baseCreateRenderer(options, createHydrationFns) {
8452
8451
  endMeasure(instance, `hydrate`);
8453
8452
  }
8454
8453
  };
8455
- if (isAsyncWrapperVNode) {
8456
- initialVNode.type.__asyncLoader().then(
8454
+ if (isAsyncWrapperVNode && !type.__asyncResolved) {
8455
+ type.__asyncLoader().then(
8457
8456
  // note: we are moving the render call into an async callback,
8458
8457
  // which means it won't track dependencies - but it's ok because
8459
8458
  // a server-rendered async wrapper is already in resolved state
@@ -9605,7 +9604,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9605
9604
  const modifiers = getModelModifiers(props, name);
9606
9605
  const res = customRef((track, trigger) => {
9607
9606
  let localValue;
9608
- let prevSetValue;
9607
+ let prevSetValue = EMPTY_OBJ;
9609
9608
  let prevEmittedValue;
9610
9609
  watchSyncEffect(() => {
9611
9610
  const propValue = props[name];
@@ -9620,7 +9619,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9620
9619
  return options.get ? options.get(localValue) : localValue;
9621
9620
  },
9622
9621
  set(value) {
9623
- if (!hasChanged(value, localValue)) {
9622
+ if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
9624
9623
  return;
9625
9624
  }
9626
9625
  const rawProps = i.vnode.props;
@@ -9631,7 +9630,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
9631
9630
  }
9632
9631
  const emittedValue = options.set ? options.set(value) : value;
9633
9632
  i.emit(`update:${name}`, emittedValue);
9634
- if (value !== emittedValue && value !== prevSetValue && emittedValue === prevEmittedValue) {
9633
+ if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
9635
9634
  trigger();
9636
9635
  }
9637
9636
  prevSetValue = value;
@@ -11345,7 +11344,7 @@ function setupStatefulComponent(instance, isSSR) {
11345
11344
  resetTracking();
11346
11345
  reset();
11347
11346
  if (isPromise(setupResult)) {
11348
- markAsyncBoundary(instance);
11347
+ if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
11349
11348
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
11350
11349
  if (isSSR) {
11351
11350
  return setupResult.then((resolvedResult) => {
@@ -11838,7 +11837,7 @@ function isMemoSame(cached, memo) {
11838
11837
  return true;
11839
11838
  }
11840
11839
 
11841
- const version = "3.5.0-alpha.3";
11840
+ const version = "3.5.0-alpha.4";
11842
11841
  const warn = warn$1 ;
11843
11842
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11844
11843
  const devtools = devtools$1 ;