@vue/compat 3.5.0-beta.3 → 3.5.0-rc.1

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-beta.3
2
+ * @vue/compat v3.5.0-rc.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -337,12 +337,13 @@ class EffectScope {
337
337
  pause() {
338
338
  if (this._active) {
339
339
  this._isPaused = true;
340
+ let i, l;
340
341
  if (this.scopes) {
341
- for (let i = 0, l = this.scopes.length; i < l; i++) {
342
+ for (i = 0, l = this.scopes.length; i < l; i++) {
342
343
  this.scopes[i].pause();
343
344
  }
344
345
  }
345
- for (let i = 0, l = this.effects.length; i < l; i++) {
346
+ for (i = 0, l = this.effects.length; i < l; i++) {
346
347
  this.effects[i].pause();
347
348
  }
348
349
  }
@@ -354,12 +355,13 @@ class EffectScope {
354
355
  if (this._active) {
355
356
  if (this._isPaused) {
356
357
  this._isPaused = false;
358
+ let i, l;
357
359
  if (this.scopes) {
358
- for (let i = 0, l = this.scopes.length; i < l; i++) {
360
+ for (i = 0, l = this.scopes.length; i < l; i++) {
359
361
  this.scopes[i].resume();
360
362
  }
361
363
  }
362
- for (let i = 0, l = this.effects.length; i < l; i++) {
364
+ for (i = 0, l = this.effects.length; i < l; i++) {
363
365
  this.effects[i].resume();
364
366
  }
365
367
  }
@@ -552,11 +554,9 @@ function startBatch() {
552
554
  batchDepth++;
553
555
  }
554
556
  function endBatch() {
555
- if (batchDepth > 1) {
556
- batchDepth--;
557
+ if (--batchDepth > 0) {
557
558
  return;
558
559
  }
559
- batchDepth--;
560
560
  let error;
561
561
  while (batchedEffect) {
562
562
  let e = batchedEffect;
@@ -1219,7 +1219,12 @@ class MutableReactiveHandler extends BaseReactiveHandler {
1219
1219
  }
1220
1220
  }
1221
1221
  const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
1222
- const result = Reflect.set(target, key, value, receiver);
1222
+ const result = Reflect.set(
1223
+ target,
1224
+ key,
1225
+ value,
1226
+ isRef(target) ? target : receiver
1227
+ );
1223
1228
  if (target === toRaw(receiver)) {
1224
1229
  if (!hadKey) {
1225
1230
  trigger(target, "add", key, value);
@@ -2038,18 +2043,25 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2038
2043
  const depth = deep === true ? Infinity : deep;
2039
2044
  getter = () => traverse(baseGetter(), depth);
2040
2045
  }
2046
+ const scope = getCurrentScope();
2047
+ const watchHandle = () => {
2048
+ effect.stop();
2049
+ if (scope) {
2050
+ remove(scope.effects, effect);
2051
+ }
2052
+ };
2041
2053
  if (once) {
2042
2054
  if (cb) {
2043
2055
  const _cb = cb;
2044
2056
  cb = (...args) => {
2045
2057
  _cb(...args);
2046
- effect.stop();
2058
+ watchHandle();
2047
2059
  };
2048
2060
  } else {
2049
2061
  const _getter = getter;
2050
2062
  getter = () => {
2051
2063
  _getter();
2052
- effect.stop();
2064
+ watchHandle();
2053
2065
  };
2054
2066
  }
2055
2067
  }
@@ -2118,13 +2130,6 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2118
2130
  } else {
2119
2131
  effect.run();
2120
2132
  }
2121
- const scope = getCurrentScope();
2122
- const watchHandle = () => {
2123
- effect.stop();
2124
- if (scope) {
2125
- remove(scope.effects, effect);
2126
- }
2127
- };
2128
2133
  watchHandle.pause = effect.pause.bind(effect);
2129
2134
  watchHandle.resume = effect.resume.bind(effect);
2130
2135
  watchHandle.stop = watchHandle;
@@ -4113,7 +4118,7 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4113
4118
  // @__NO_SIDE_EFFECTS__
4114
4119
  function defineComponent(options, extraOptions) {
4115
4120
  return isFunction(options) ? (
4116
- // #8326: extend call and options.name access are considered side-effects
4121
+ // #8236: extend call and options.name access are considered side-effects
4117
4122
  // by Rollup, so we have to wrap it in a pure-annotated IIFE.
4118
4123
  /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
4119
4124
  ) : options;
@@ -5251,6 +5256,7 @@ const KeepAliveImpl = {
5251
5256
  );
5252
5257
  const { include, exclude, max } = props;
5253
5258
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
5259
+ vnode.shapeFlag &= ~256;
5254
5260
  current = vnode;
5255
5261
  return rawVNode;
5256
5262
  }
@@ -7001,7 +7007,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7001
7007
  return vm;
7002
7008
  }
7003
7009
  }
7004
- Vue.version = `2.6.14-compat:${"3.5.0-beta.3"}`;
7010
+ Vue.version = `2.6.14-compat:${"3.5.0-rc.1"}`;
7005
7011
  Vue.config = singletonApp.config;
7006
7012
  Vue.use = (plugin, ...options) => {
7007
7013
  if (plugin && isFunction(plugin.install)) {
@@ -12191,7 +12197,7 @@ function isMemoSame(cached, memo) {
12191
12197
  return true;
12192
12198
  }
12193
12199
 
12194
- const version = "3.5.0-beta.3";
12200
+ const version = "3.5.0-rc.1";
12195
12201
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12196
12202
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12197
12203
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -12890,8 +12896,9 @@ function compatCoerceAttr(el, key, value, instance = null) {
12890
12896
 
12891
12897
  function patchDOMProp(el, key, value, parentComponent) {
12892
12898
  if (key === "innerHTML" || key === "textContent") {
12893
- if (value == null) return;
12894
- el[key] = value;
12899
+ if (value != null) {
12900
+ el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
12901
+ }
12895
12902
  return;
12896
12903
  }
12897
12904
  const tag = el.tagName;
@@ -13334,6 +13341,9 @@ class VueElement extends BaseClass {
13334
13341
  delete this._props[key];
13335
13342
  } else {
13336
13343
  this._props[key] = val;
13344
+ if (key === "key" && this._app) {
13345
+ this._app._ceVNode.key = val;
13346
+ }
13337
13347
  }
13338
13348
  if (shouldUpdate && this._instance) {
13339
13349
  this._update();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.0-beta.3
2
+ * @vue/compat v3.5.0-rc.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -340,12 +340,13 @@ var Vue = (function () {
340
340
  pause() {
341
341
  if (this._active) {
342
342
  this._isPaused = true;
343
+ let i, l;
343
344
  if (this.scopes) {
344
- for (let i = 0, l = this.scopes.length; i < l; i++) {
345
+ for (i = 0, l = this.scopes.length; i < l; i++) {
345
346
  this.scopes[i].pause();
346
347
  }
347
348
  }
348
- for (let i = 0, l = this.effects.length; i < l; i++) {
349
+ for (i = 0, l = this.effects.length; i < l; i++) {
349
350
  this.effects[i].pause();
350
351
  }
351
352
  }
@@ -357,12 +358,13 @@ var Vue = (function () {
357
358
  if (this._active) {
358
359
  if (this._isPaused) {
359
360
  this._isPaused = false;
361
+ let i, l;
360
362
  if (this.scopes) {
361
- for (let i = 0, l = this.scopes.length; i < l; i++) {
363
+ for (i = 0, l = this.scopes.length; i < l; i++) {
362
364
  this.scopes[i].resume();
363
365
  }
364
366
  }
365
- for (let i = 0, l = this.effects.length; i < l; i++) {
367
+ for (i = 0, l = this.effects.length; i < l; i++) {
366
368
  this.effects[i].resume();
367
369
  }
368
370
  }
@@ -555,11 +557,9 @@ var Vue = (function () {
555
557
  batchDepth++;
556
558
  }
557
559
  function endBatch() {
558
- if (batchDepth > 1) {
559
- batchDepth--;
560
+ if (--batchDepth > 0) {
560
561
  return;
561
562
  }
562
- batchDepth--;
563
563
  let error;
564
564
  while (batchedEffect) {
565
565
  let e = batchedEffect;
@@ -1218,7 +1218,12 @@ var Vue = (function () {
1218
1218
  }
1219
1219
  }
1220
1220
  const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
1221
- const result = Reflect.set(target, key, value, receiver);
1221
+ const result = Reflect.set(
1222
+ target,
1223
+ key,
1224
+ value,
1225
+ isRef(target) ? target : receiver
1226
+ );
1222
1227
  if (target === toRaw(receiver)) {
1223
1228
  if (!hadKey) {
1224
1229
  trigger(target, "add", key, value);
@@ -2031,18 +2036,25 @@ var Vue = (function () {
2031
2036
  const depth = deep === true ? Infinity : deep;
2032
2037
  getter = () => traverse(baseGetter(), depth);
2033
2038
  }
2039
+ const scope = getCurrentScope();
2040
+ const watchHandle = () => {
2041
+ effect.stop();
2042
+ if (scope) {
2043
+ remove(scope.effects, effect);
2044
+ }
2045
+ };
2034
2046
  if (once) {
2035
2047
  if (cb) {
2036
2048
  const _cb = cb;
2037
2049
  cb = (...args) => {
2038
2050
  _cb(...args);
2039
- effect.stop();
2051
+ watchHandle();
2040
2052
  };
2041
2053
  } else {
2042
2054
  const _getter = getter;
2043
2055
  getter = () => {
2044
2056
  _getter();
2045
- effect.stop();
2057
+ watchHandle();
2046
2058
  };
2047
2059
  }
2048
2060
  }
@@ -2111,13 +2123,6 @@ var Vue = (function () {
2111
2123
  } else {
2112
2124
  effect.run();
2113
2125
  }
2114
- const scope = getCurrentScope();
2115
- const watchHandle = () => {
2116
- effect.stop();
2117
- if (scope) {
2118
- remove(scope.effects, effect);
2119
- }
2120
- };
2121
2126
  watchHandle.pause = effect.pause.bind(effect);
2122
2127
  watchHandle.resume = effect.resume.bind(effect);
2123
2128
  watchHandle.stop = watchHandle;
@@ -4097,7 +4102,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4097
4102
  // @__NO_SIDE_EFFECTS__
4098
4103
  function defineComponent(options, extraOptions) {
4099
4104
  return isFunction(options) ? (
4100
- // #8326: extend call and options.name access are considered side-effects
4105
+ // #8236: extend call and options.name access are considered side-effects
4101
4106
  // by Rollup, so we have to wrap it in a pure-annotated IIFE.
4102
4107
  /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
4103
4108
  ) : options;
@@ -5218,6 +5223,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5218
5223
  );
5219
5224
  const { include, exclude, max } = props;
5220
5225
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
5226
+ vnode.shapeFlag &= ~256;
5221
5227
  current = vnode;
5222
5228
  return rawVNode;
5223
5229
  }
@@ -6963,7 +6969,7 @@ If this is a native custom element, make sure to exclude it from component resol
6963
6969
  return vm;
6964
6970
  }
6965
6971
  }
6966
- Vue.version = `2.6.14-compat:${"3.5.0-beta.3"}`;
6972
+ Vue.version = `2.6.14-compat:${"3.5.0-rc.1"}`;
6967
6973
  Vue.config = singletonApp.config;
6968
6974
  Vue.use = (plugin, ...options) => {
6969
6975
  if (plugin && isFunction(plugin.install)) {
@@ -12063,7 +12069,7 @@ Component that was made reactive: `,
12063
12069
  return true;
12064
12070
  }
12065
12071
 
12066
- const version = "3.5.0-beta.3";
12072
+ const version = "3.5.0-rc.1";
12067
12073
  const warn = warn$1 ;
12068
12074
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12069
12075
  const devtools = devtools$1 ;
@@ -12745,8 +12751,9 @@ Component that was made reactive: `,
12745
12751
 
12746
12752
  function patchDOMProp(el, key, value, parentComponent) {
12747
12753
  if (key === "innerHTML" || key === "textContent") {
12748
- if (value == null) return;
12749
- el[key] = value;
12754
+ if (value != null) {
12755
+ el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
12756
+ }
12750
12757
  return;
12751
12758
  }
12752
12759
  const tag = el.tagName;
@@ -13189,6 +13196,9 @@ Expected function or array of functions, received type ${typeof value}.`
13189
13196
  delete this._props[key];
13190
13197
  } else {
13191
13198
  this._props[key] = val;
13199
+ if (key === "key" && this._app) {
13200
+ this._app._ceVNode.key = val;
13201
+ }
13192
13202
  }
13193
13203
  if (shouldUpdate && this._instance) {
13194
13204
  this._update();