vue 3.2.23 → 3.2.24

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.
@@ -4072,7 +4072,7 @@ var Vue = (function (exports) {
4072
4072
  }
4073
4073
  }
4074
4074
  else if (!isEmitListener(instance.emitsOptions, key)) {
4075
- if (value !== attrs[key]) {
4075
+ if (!(key in attrs) || value !== attrs[key]) {
4076
4076
  attrs[key] = value;
4077
4077
  hasAttrsChanged = true;
4078
4078
  }
@@ -9042,7 +9042,7 @@ var Vue = (function (exports) {
9042
9042
  }
9043
9043
 
9044
9044
  // Core API ------------------------------------------------------------------
9045
- const version = "3.2.23";
9045
+ const version = "3.2.24";
9046
9046
  /**
9047
9047
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
9048
9048
  * @internal
@@ -9673,7 +9673,7 @@ var Vue = (function (exports) {
9673
9673
  // HMR
9674
9674
  {
9675
9675
  instance.ceReload = newStyles => {
9676
- // alawys reset styles
9676
+ // always reset styles
9677
9677
  if (this._styles) {
9678
9678
  this._styles.forEach(s => this.shadowRoot.removeChild(s));
9679
9679
  this._styles.length = 0;
@@ -11186,7 +11186,6 @@ var Vue = (function (exports) {
11186
11186
  }
11187
11187
  function injectProp(node, prop, context) {
11188
11188
  let propsWithInjection;
11189
- const originalProps = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2];
11190
11189
  /**
11191
11190
  * 1. mergeProps(...)
11192
11191
  * 2. toHandlers(...)
@@ -11195,7 +11194,7 @@ var Vue = (function (exports) {
11195
11194
  *
11196
11195
  * we need to get the real props before normalization
11197
11196
  */
11198
- let props = originalProps;
11197
+ let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2];
11199
11198
  let callPath = [];
11200
11199
  let parentCall;
11201
11200
  if (props &&
@@ -12160,15 +12159,6 @@ var Vue = (function (exports) {
12160
12159
  !isSlotOutlet(child));
12161
12160
  }
12162
12161
  function walk(node, context, doNotHoistNode = false) {
12163
- // Some transforms, e.g. transformAssetUrls from @vue/compiler-sfc, replaces
12164
- // static bindings with expressions. These expressions are guaranteed to be
12165
- // constant so they are still eligible for hoisting, but they are only
12166
- // available at runtime and therefore cannot be evaluated ahead of time.
12167
- // This is only a concern for pre-stringification (via transformHoist by
12168
- // @vue/compiler-dom), but doing it here allows us to perform only one full
12169
- // walk of the AST and allow `stringifyStatic` to stop walking as soon as its
12170
- // stringification threshold is met.
12171
- let canStringify = true;
12172
12162
  const { children } = node;
12173
12163
  const originalCount = children.length;
12174
12164
  let hoistedCount = 0;
@@ -12181,9 +12171,6 @@ var Vue = (function (exports) {
12181
12171
  ? 0 /* NOT_CONSTANT */
12182
12172
  : getConstantType(child, context);
12183
12173
  if (constantType > 0 /* NOT_CONSTANT */) {
12184
- if (constantType < 3 /* CAN_STRINGIFY */) {
12185
- canStringify = false;
12186
- }
12187
12174
  if (constantType >= 2 /* CAN_HOIST */) {
12188
12175
  child.codegenNode.patchFlag =
12189
12176
  -1 /* HOISTED */ + (` /* HOISTED */` );
@@ -12214,17 +12201,10 @@ var Vue = (function (exports) {
12214
12201
  }
12215
12202
  }
12216
12203
  }
12217
- else if (child.type === 12 /* TEXT_CALL */) {
12218
- const contentType = getConstantType(child.content, context);
12219
- if (contentType > 0) {
12220
- if (contentType < 3 /* CAN_STRINGIFY */) {
12221
- canStringify = false;
12222
- }
12223
- if (contentType >= 2 /* CAN_HOIST */) {
12224
- child.codegenNode = context.hoist(child.codegenNode);
12225
- hoistedCount++;
12226
- }
12227
- }
12204
+ else if (child.type === 12 /* TEXT_CALL */ &&
12205
+ getConstantType(child.content, context) >= 2 /* CAN_HOIST */) {
12206
+ child.codegenNode = context.hoist(child.codegenNode);
12207
+ hoistedCount++;
12228
12208
  }
12229
12209
  // walk further
12230
12210
  if (child.type === 1 /* ELEMENT */) {
@@ -12248,7 +12228,7 @@ var Vue = (function (exports) {
12248
12228
  }
12249
12229
  }
12250
12230
  }
12251
- if (canStringify && hoistedCount && context.transformHoist) {
12231
+ if (hoistedCount && context.transformHoist) {
12252
12232
  context.transformHoist(children, context, node);
12253
12233
  }
12254
12234
  // all children were hoisted - the entire children array is hoistable.