@vue/compat 3.4.0-beta.3 → 3.4.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.
@@ -1899,8 +1899,10 @@ function checkRecursiveUpdates(seen, fn) {
1899
1899
  if (count > RECURSION_LIMIT) {
1900
1900
  const instance = fn.ownerInstance;
1901
1901
  const componentName = instance && getComponentName(instance.type);
1902
- warn(
1903
- `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`
1902
+ handleError(
1903
+ `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
1904
+ null,
1905
+ 10
1904
1906
  );
1905
1907
  return true;
1906
1908
  } else {
@@ -6452,7 +6454,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6452
6454
  return vm;
6453
6455
  }
6454
6456
  }
6455
- Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
6457
+ Vue.version = `2.6.14-compat:${"3.4.0-rc.1"}`;
6456
6458
  Vue.config = singletonApp.config;
6457
6459
  Vue.use = (p, ...options) => {
6458
6460
  if (p && isFunction(p.install)) {
@@ -8193,9 +8195,9 @@ function propHasMismatch(el, key, clientValue) {
8193
8195
  let actual;
8194
8196
  let expected;
8195
8197
  if (key === "class") {
8196
- actual = el.className;
8197
- expected = normalizeClass(clientValue);
8198
- if (actual !== expected) {
8198
+ actual = toClassSet(el.getAttribute("class") || "");
8199
+ expected = toClassSet(normalizeClass(clientValue));
8200
+ if (!isSetEqual(actual, expected)) {
8199
8201
  mismatchType = mismatchKey = `class`;
8200
8202
  }
8201
8203
  } else if (key === "style") {
@@ -8227,6 +8229,20 @@ function propHasMismatch(el, key, clientValue) {
8227
8229
  }
8228
8230
  return false;
8229
8231
  }
8232
+ function toClassSet(str) {
8233
+ return new Set(str.trim().split(/\s+/));
8234
+ }
8235
+ function isSetEqual(a, b) {
8236
+ if (a.size !== b.size) {
8237
+ return false;
8238
+ }
8239
+ for (const s of a) {
8240
+ if (!b.has(s)) {
8241
+ return false;
8242
+ }
8243
+ }
8244
+ return true;
8245
+ }
8230
8246
 
8231
8247
  let supported;
8232
8248
  let perf;
@@ -11240,7 +11256,7 @@ function isMemoSame(cached, memo) {
11240
11256
  return true;
11241
11257
  }
11242
11258
 
11243
- const version = "3.4.0-beta.3";
11259
+ const version = "3.4.0-rc.1";
11244
11260
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11245
11261
  const _ssrUtils = {
11246
11262
  createComponentInstance,
@@ -12748,7 +12764,9 @@ const modifierGuards = {
12748
12764
  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
12749
12765
  };
12750
12766
  const withModifiers = (fn, modifiers) => {
12751
- return fn._withMods || (fn._withMods = (event, ...args) => {
12767
+ const cache = fn._withMods || (fn._withMods = {});
12768
+ const cacheKey = modifiers.join(".");
12769
+ return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
12752
12770
  for (let i = 0; i < modifiers.length; i++) {
12753
12771
  const guard = modifierGuards[modifiers[i]];
12754
12772
  if (guard && guard(event, modifiers))
@@ -12783,7 +12801,9 @@ const withKeys = (fn, modifiers) => {
12783
12801
  );
12784
12802
  }
12785
12803
  }
12786
- return fn._withKeys || (fn._withKeys = (event) => {
12804
+ const cache = fn._withKeys || (fn._withKeys = {});
12805
+ const cacheKey = modifiers.join(".");
12806
+ return cache[cacheKey] || (cache[cacheKey] = (event) => {
12787
12807
  if (!("key" in event)) {
12788
12808
  return;
12789
12809
  }
@@ -1896,8 +1896,10 @@ var Vue = (function () {
1896
1896
  if (count > RECURSION_LIMIT) {
1897
1897
  const instance = fn.ownerInstance;
1898
1898
  const componentName = instance && getComponentName(instance.type);
1899
- warn(
1900
- `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`
1899
+ handleError(
1900
+ `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
1901
+ null,
1902
+ 10
1901
1903
  );
1902
1904
  return true;
1903
1905
  } else {
@@ -6415,7 +6417,7 @@ If this is a native custom element, make sure to exclude it from component resol
6415
6417
  return vm;
6416
6418
  }
6417
6419
  }
6418
- Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
6420
+ Vue.version = `2.6.14-compat:${"3.4.0-rc.1"}`;
6419
6421
  Vue.config = singletonApp.config;
6420
6422
  Vue.use = (p, ...options) => {
6421
6423
  if (p && isFunction(p.install)) {
@@ -8143,9 +8145,9 @@ Server rendered element contains fewer child nodes than client vdom.`
8143
8145
  let actual;
8144
8146
  let expected;
8145
8147
  if (key === "class") {
8146
- actual = el.className;
8147
- expected = normalizeClass(clientValue);
8148
- if (actual !== expected) {
8148
+ actual = toClassSet(el.getAttribute("class") || "");
8149
+ expected = toClassSet(normalizeClass(clientValue));
8150
+ if (!isSetEqual(actual, expected)) {
8149
8151
  mismatchType = mismatchKey = `class`;
8150
8152
  }
8151
8153
  } else if (key === "style") {
@@ -8177,6 +8179,20 @@ Server rendered element contains fewer child nodes than client vdom.`
8177
8179
  }
8178
8180
  return false;
8179
8181
  }
8182
+ function toClassSet(str) {
8183
+ return new Set(str.trim().split(/\s+/));
8184
+ }
8185
+ function isSetEqual(a, b) {
8186
+ if (a.size !== b.size) {
8187
+ return false;
8188
+ }
8189
+ for (const s of a) {
8190
+ if (!b.has(s)) {
8191
+ return false;
8192
+ }
8193
+ }
8194
+ return true;
8195
+ }
8180
8196
 
8181
8197
  let supported;
8182
8198
  let perf;
@@ -11113,7 +11129,7 @@ Component that was made reactive: `,
11113
11129
  return true;
11114
11130
  }
11115
11131
 
11116
- const version = "3.4.0-beta.3";
11132
+ const version = "3.4.0-rc.1";
11117
11133
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11118
11134
  const ssrUtils = null;
11119
11135
  const resolveFilter = resolveFilter$1 ;
@@ -12560,7 +12576,9 @@ Component that was made reactive: `,
12560
12576
  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
12561
12577
  };
12562
12578
  const withModifiers = (fn, modifiers) => {
12563
- return fn._withMods || (fn._withMods = (event, ...args) => {
12579
+ const cache = fn._withMods || (fn._withMods = {});
12580
+ const cacheKey = modifiers.join(".");
12581
+ return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
12564
12582
  for (let i = 0; i < modifiers.length; i++) {
12565
12583
  const guard = modifierGuards[modifiers[i]];
12566
12584
  if (guard && guard(event, modifiers))
@@ -12595,7 +12613,9 @@ Component that was made reactive: `,
12595
12613
  );
12596
12614
  }
12597
12615
  }
12598
- return fn._withKeys || (fn._withKeys = (event) => {
12616
+ const cache = fn._withKeys || (fn._withKeys = {});
12617
+ const cacheKey = modifiers.join(".");
12618
+ return cache[cacheKey] || (cache[cacheKey] = (event) => {
12599
12619
  if (!("key" in event)) {
12600
12620
  return;
12601
12621
  }