vue 3.2.22 → 3.2.23

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.
@@ -533,7 +533,7 @@ var Vue = (function (exports) {
533
533
  let effectTrackDepth = 0;
534
534
  let trackOpBit = 1;
535
535
  /**
536
- * The bitwise track markers support at most 30 levels op recursion.
536
+ * The bitwise track markers support at most 30 levels of recursion.
537
537
  * This value is chosen to enable modern JS engines to use a SMI on all platforms.
538
538
  * When recursion depth is greater, fall back to using a full cleanup.
539
539
  */
@@ -854,7 +854,7 @@ var Vue = (function (exports) {
854
854
  function createSetter(shallow = false) {
855
855
  return function set(target, key, value, receiver) {
856
856
  let oldValue = target[key];
857
- if (!shallow) {
857
+ if (!shallow && !isReadonly(value)) {
858
858
  value = toRaw(value);
859
859
  oldValue = toRaw(oldValue);
860
860
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
@@ -2769,7 +2769,8 @@ var Vue = (function (exports) {
2769
2769
  const rawProps = toRaw(props);
2770
2770
  const { mode } = rawProps;
2771
2771
  // check mode
2772
- if (mode && !['in-out', 'out-in', 'default'].includes(mode)) {
2772
+ if (mode &&
2773
+ mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
2773
2774
  warn$1(`invalid <transition> mode: ${mode}`);
2774
2775
  }
2775
2776
  // at this point children has a guaranteed length of 1.
@@ -3409,7 +3410,7 @@ var Vue = (function (exports) {
3409
3410
  }
3410
3411
  current = current.parent;
3411
3412
  }
3412
- hook();
3413
+ return hook();
3413
3414
  });
3414
3415
  injectHook(type, wrappedHook, target);
3415
3416
  // In addition to registering it on the target instance, we walk up the parent
@@ -7385,23 +7386,23 @@ var Vue = (function (exports) {
7385
7386
  const n = accessCache[key];
7386
7387
  if (n !== undefined) {
7387
7388
  switch (n) {
7388
- case 0 /* SETUP */:
7389
+ case 1 /* SETUP */:
7389
7390
  return setupState[key];
7390
- case 1 /* DATA */:
7391
+ case 2 /* DATA */:
7391
7392
  return data[key];
7392
- case 3 /* CONTEXT */:
7393
+ case 4 /* CONTEXT */:
7393
7394
  return ctx[key];
7394
- case 2 /* PROPS */:
7395
+ case 3 /* PROPS */:
7395
7396
  return props[key];
7396
7397
  // default: just fallthrough
7397
7398
  }
7398
7399
  }
7399
7400
  else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
7400
- accessCache[key] = 0 /* SETUP */;
7401
+ accessCache[key] = 1 /* SETUP */;
7401
7402
  return setupState[key];
7402
7403
  }
7403
7404
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
7404
- accessCache[key] = 1 /* DATA */;
7405
+ accessCache[key] = 2 /* DATA */;
7405
7406
  return data[key];
7406
7407
  }
7407
7408
  else if (
@@ -7409,15 +7410,15 @@ var Vue = (function (exports) {
7409
7410
  // props
7410
7411
  (normalizedProps = instance.propsOptions[0]) &&
7411
7412
  hasOwn(normalizedProps, key)) {
7412
- accessCache[key] = 2 /* PROPS */;
7413
+ accessCache[key] = 3 /* PROPS */;
7413
7414
  return props[key];
7414
7415
  }
7415
7416
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
7416
- accessCache[key] = 3 /* CONTEXT */;
7417
+ accessCache[key] = 4 /* CONTEXT */;
7417
7418
  return ctx[key];
7418
7419
  }
7419
7420
  else if (shouldCacheAccess) {
7420
- accessCache[key] = 4 /* OTHER */;
7421
+ accessCache[key] = 0 /* OTHER */;
7421
7422
  }
7422
7423
  }
7423
7424
  const publicGetter = publicPropertiesMap[key];
@@ -7438,7 +7439,7 @@ var Vue = (function (exports) {
7438
7439
  }
7439
7440
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
7440
7441
  // user may set custom properties to `this` that start with `$`
7441
- accessCache[key] = 3 /* CONTEXT */;
7442
+ accessCache[key] = 4 /* CONTEXT */;
7442
7443
  return ctx[key];
7443
7444
  }
7444
7445
  else if (
@@ -7499,7 +7500,7 @@ var Vue = (function (exports) {
7499
7500
  },
7500
7501
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
7501
7502
  let normalizedProps;
7502
- return (accessCache[key] !== undefined ||
7503
+ return (!!accessCache[key] ||
7503
7504
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
7504
7505
  (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
7505
7506
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
@@ -9041,7 +9042,7 @@ var Vue = (function (exports) {
9041
9042
  }
9042
9043
 
9043
9044
  // Core API ------------------------------------------------------------------
9044
- const version = "3.2.22";
9045
+ const version = "3.2.23";
9045
9046
  /**
9046
9047
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
9047
9048
  * @internal
@@ -9274,12 +9275,19 @@ var Vue = (function (exports) {
9274
9275
  el[key] = value == null ? '' : value;
9275
9276
  return;
9276
9277
  }
9277
- if (key === 'value' && el.tagName !== 'PROGRESS') {
9278
+ if (key === 'value' &&
9279
+ el.tagName !== 'PROGRESS' &&
9280
+ // custom elements may use _value internally
9281
+ !el.tagName.includes('-')) {
9278
9282
  // store value as _value as well since
9279
9283
  // non-string values will be stringified.
9280
9284
  el._value = value;
9281
9285
  const newValue = value == null ? '' : value;
9282
- if (el.value !== newValue) {
9286
+ if (el.value !== newValue ||
9287
+ // #4956: always set for OPTION elements because its value falls back to
9288
+ // textContent if no value attribute is present. And setting .value for
9289
+ // OPTION has no side effect
9290
+ el.tagName === 'OPTION') {
9283
9291
  el.value = newValue;
9284
9292
  }
9285
9293
  if (value == null) {