@vue/compat 3.4.35 → 3.4.36

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.4.35
2
+ * @vue/compat v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7,7 +7,7 @@
7
7
 
8
8
  var parser = require('@babel/parser');
9
9
  var estreeWalker = require('estree-walker');
10
- var decode_js = require('entities/lib/decode.js');
10
+ var decode_js = require('entities/dist/decode.js');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
13
  /*! #__NO_SIDE_EFFECTS__ */
@@ -5303,7 +5303,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5303
5303
  return vm;
5304
5304
  }
5305
5305
  }
5306
- Vue.version = `2.6.14-compat:${"3.4.35"}`;
5306
+ Vue.version = `2.6.14-compat:${"3.4.36"}`;
5307
5307
  Vue.config = singletonApp.config;
5308
5308
  Vue.use = (plugin, ...options) => {
5309
5309
  if (plugin && isFunction(plugin.install)) {
@@ -7145,6 +7145,7 @@ Server rendered element contains more child nodes than client vdom.`
7145
7145
  }
7146
7146
  if (props) {
7147
7147
  {
7148
+ const isCustomElement = el.tagName.includes("-");
7148
7149
  for (const key in props) {
7149
7150
  if (// #11189 skip if this node has directives that have created hooks
7150
7151
  // as it could have mutated the DOM in any possible way
@@ -7152,7 +7153,7 @@ Server rendered element contains more child nodes than client vdom.`
7152
7153
  logMismatchError();
7153
7154
  }
7154
7155
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
7155
- key[0] === ".") {
7156
+ key[0] === "." || isCustomElement) {
7156
7157
  patchProp(el, key, null, props[key], void 0, parentComponent);
7157
7158
  }
7158
7159
  }
@@ -11524,7 +11525,7 @@ function isMemoSame(cached, memo) {
11524
11525
  return true;
11525
11526
  }
11526
11527
 
11527
- const version = "3.4.35";
11528
+ const version = "3.4.36";
11528
11529
  const warn = warn$1 ;
11529
11530
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11530
11531
  const devtools = devtools$1 ;
@@ -14686,6 +14687,16 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
14686
14687
  (id) => markScopeIdentifier(node, id, knownIds)
14687
14688
  );
14688
14689
  }
14690
+ } else if (node.type === "CatchClause" && node.param) {
14691
+ for (const id of extractIdentifiers(node.param)) {
14692
+ markScopeIdentifier(node, id, knownIds);
14693
+ }
14694
+ } else if (isForStatement(node)) {
14695
+ walkForStatement(
14696
+ node,
14697
+ false,
14698
+ (id) => markScopeIdentifier(node, id, knownIds)
14699
+ );
14689
14700
  }
14690
14701
  },
14691
14702
  leave(node, parent) {
@@ -14766,14 +14777,20 @@ function walkBlockDeclarations(block, onIdent) {
14766
14777
  } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
14767
14778
  if (stmt.declare || !stmt.id) continue;
14768
14779
  onIdent(stmt.id);
14769
- } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
14770
- const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
14771
- if (variable && variable.type === "VariableDeclaration") {
14772
- for (const decl of variable.declarations) {
14773
- for (const id of extractIdentifiers(decl.id)) {
14774
- onIdent(id);
14775
- }
14776
- }
14780
+ } else if (isForStatement(stmt)) {
14781
+ walkForStatement(stmt, true, onIdent);
14782
+ }
14783
+ }
14784
+ }
14785
+ function isForStatement(stmt) {
14786
+ return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
14787
+ }
14788
+ function walkForStatement(stmt, isVar, onIdent) {
14789
+ const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
14790
+ if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) {
14791
+ for (const decl of variable.declarations) {
14792
+ for (const id of extractIdentifiers(decl.id)) {
14793
+ onIdent(id);
14777
14794
  }
14778
14795
  }
14779
14796
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.35
2
+ * @vue/compat v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7,7 +7,7 @@
7
7
 
8
8
  var parser = require('@babel/parser');
9
9
  var estreeWalker = require('estree-walker');
10
- var decode_js = require('entities/lib/decode.js');
10
+ var decode_js = require('entities/dist/decode.js');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
13
  /*! #__NO_SIDE_EFFECTS__ */
@@ -4151,7 +4151,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
4151
4151
  return vm;
4152
4152
  }
4153
4153
  }
4154
- Vue.version = `2.6.14-compat:${"3.4.35"}`;
4154
+ Vue.version = `2.6.14-compat:${"3.4.36"}`;
4155
4155
  Vue.config = singletonApp.config;
4156
4156
  Vue.use = (plugin, ...options) => {
4157
4157
  if (plugin && isFunction(plugin.install)) {
@@ -5664,9 +5664,10 @@ function createHydrationFunctions(rendererInternals) {
5664
5664
  }
5665
5665
  if (props) {
5666
5666
  if (forcePatch || !optimized || patchFlag & (16 | 32)) {
5667
+ const isCustomElement = el.tagName.includes("-");
5667
5668
  for (const key in props) {
5668
5669
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
5669
- key[0] === ".") {
5670
+ key[0] === "." || isCustomElement) {
5670
5671
  patchProp(el, key, null, props[key], void 0, parentComponent);
5671
5672
  }
5672
5673
  }
@@ -9171,7 +9172,7 @@ function isMemoSame(cached, memo) {
9171
9172
  return true;
9172
9173
  }
9173
9174
 
9174
- const version = "3.4.35";
9175
+ const version = "3.4.36";
9175
9176
  const warn$1 = NOOP;
9176
9177
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9177
9178
  const devtools = void 0;
@@ -12150,6 +12151,16 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
12150
12151
  (id) => markScopeIdentifier(node, id, knownIds)
12151
12152
  );
12152
12153
  }
12154
+ } else if (node.type === "CatchClause" && node.param) {
12155
+ for (const id of extractIdentifiers(node.param)) {
12156
+ markScopeIdentifier(node, id, knownIds);
12157
+ }
12158
+ } else if (isForStatement(node)) {
12159
+ walkForStatement(
12160
+ node,
12161
+ false,
12162
+ (id) => markScopeIdentifier(node, id, knownIds)
12163
+ );
12153
12164
  }
12154
12165
  },
12155
12166
  leave(node, parent) {
@@ -12230,14 +12241,20 @@ function walkBlockDeclarations(block, onIdent) {
12230
12241
  } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
12231
12242
  if (stmt.declare || !stmt.id) continue;
12232
12243
  onIdent(stmt.id);
12233
- } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
12234
- const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
12235
- if (variable && variable.type === "VariableDeclaration") {
12236
- for (const decl of variable.declarations) {
12237
- for (const id of extractIdentifiers(decl.id)) {
12238
- onIdent(id);
12239
- }
12240
- }
12244
+ } else if (isForStatement(stmt)) {
12245
+ walkForStatement(stmt, true, onIdent);
12246
+ }
12247
+ }
12248
+ }
12249
+ function isForStatement(stmt) {
12250
+ return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
12251
+ }
12252
+ function walkForStatement(stmt, isVar, onIdent) {
12253
+ const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
12254
+ if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) {
12255
+ for (const decl of variable.declarations) {
12256
+ for (const id of extractIdentifiers(decl.id)) {
12257
+ onIdent(id);
12241
12258
  }
12242
12259
  }
12243
12260
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.35
2
+ * @vue/compat v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -5246,7 +5246,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5246
5246
  return vm;
5247
5247
  }
5248
5248
  }
5249
- Vue.version = `2.6.14-compat:${"3.4.35"}`;
5249
+ Vue.version = `2.6.14-compat:${"3.4.36"}`;
5250
5250
  Vue.config = singletonApp.config;
5251
5251
  Vue.use = (plugin, ...options) => {
5252
5252
  if (plugin && isFunction(plugin.install)) {
@@ -7088,6 +7088,7 @@ Server rendered element contains more child nodes than client vdom.`
7088
7088
  }
7089
7089
  if (props) {
7090
7090
  {
7091
+ const isCustomElement = el.tagName.includes("-");
7091
7092
  for (const key in props) {
7092
7093
  if (// #11189 skip if this node has directives that have created hooks
7093
7094
  // as it could have mutated the DOM in any possible way
@@ -7095,7 +7096,7 @@ Server rendered element contains more child nodes than client vdom.`
7095
7096
  logMismatchError();
7096
7097
  }
7097
7098
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
7098
- key[0] === ".") {
7099
+ key[0] === "." || isCustomElement) {
7099
7100
  patchProp(el, key, null, props[key], void 0, parentComponent);
7100
7101
  }
7101
7102
  }
@@ -11433,7 +11434,7 @@ function isMemoSame(cached, memo) {
11433
11434
  return true;
11434
11435
  }
11435
11436
 
11436
- const version = "3.4.35";
11437
+ const version = "3.4.36";
11437
11438
  const warn = warn$1 ;
11438
11439
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11439
11440
  const devtools = devtools$1 ;