@vue/shared 3.5.8 → 3.5.9

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/shared v3.5.8
2
+ * @vue/shared v3.5.9
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -114,6 +114,12 @@ const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
114
114
  function genPropsAccessExp(name) {
115
115
  return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
116
116
  }
117
+ function genCacheKey(source, options) {
118
+ return source + JSON.stringify(
119
+ options,
120
+ (_, val) => typeof val === "function" ? val.toString() : val
121
+ );
122
+ }
117
123
 
118
124
  const PatchFlags = {
119
125
  "TEXT": 1,
@@ -530,6 +536,7 @@ exports.def = def;
530
536
  exports.escapeHtml = escapeHtml;
531
537
  exports.escapeHtmlComment = escapeHtmlComment;
532
538
  exports.extend = extend;
539
+ exports.genCacheKey = genCacheKey;
533
540
  exports.genPropsAccessExp = genPropsAccessExp;
534
541
  exports.generateCodeFrame = generateCodeFrame;
535
542
  exports.getEscapedCssVarName = getEscapedCssVarName;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.5.8
2
+ * @vue/shared v3.5.9
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -114,6 +114,12 @@ const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
114
114
  function genPropsAccessExp(name) {
115
115
  return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
116
116
  }
117
+ function genCacheKey(source, options) {
118
+ return source + JSON.stringify(
119
+ options,
120
+ (_, val) => typeof val === "function" ? val.toString() : val
121
+ );
122
+ }
117
123
 
118
124
  const PatchFlags = {
119
125
  "TEXT": 1,
@@ -530,6 +536,7 @@ exports.def = def;
530
536
  exports.escapeHtml = escapeHtml;
531
537
  exports.escapeHtmlComment = escapeHtmlComment;
532
538
  exports.extend = extend;
539
+ exports.genCacheKey = genCacheKey;
533
540
  exports.genPropsAccessExp = genPropsAccessExp;
534
541
  exports.generateCodeFrame = generateCodeFrame;
535
542
  exports.getEscapedCssVarName = getEscapedCssVarName;
package/dist/shared.d.ts CHANGED
@@ -70,6 +70,7 @@ export declare const looseToNumber: (val: any) => any;
70
70
  export declare const toNumber: (val: any) => any;
71
71
  export declare const getGlobalThis: () => any;
72
72
  export declare function genPropsAccessExp(name: string): string;
73
+ export declare function genCacheKey(source: string, options: any): string;
73
74
 
74
75
  /**
75
76
  * Patch flags are optimization hints generated by the compiler.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.5.8
2
+ * @vue/shared v3.5.9
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -110,6 +110,12 @@ const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
110
110
  function genPropsAccessExp(name) {
111
111
  return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
112
112
  }
113
+ function genCacheKey(source, options) {
114
+ return source + JSON.stringify(
115
+ options,
116
+ (_, val) => typeof val === "function" ? val.toString() : val
117
+ );
118
+ }
113
119
 
114
120
  const PatchFlags = {
115
121
  "TEXT": 1,
@@ -511,4 +517,4 @@ const stringifySymbol = (v, i = "") => {
511
517
  );
512
518
  };
513
519
 
514
- export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
520
+ export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/shared",
3
- "version": "3.5.8",
3
+ "version": "3.5.9",
4
4
  "description": "internal utils shared across @vue packages",
5
5
  "main": "index.js",
6
6
  "module": "dist/shared.esm-bundler.js",