@vue/language-core 1.8.24 → 1.8.25

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.
@@ -859,6 +859,7 @@ function generate(ts, compilerOptions, vueCompilerOptions, template, shouldGener
859
859
  }
860
860
  }
861
861
  codes.push(`}, `);
862
+ const canCamelize = !nativeTags.has(node.tag) || node.tagType === 1 /* CompilerDOM.ElementTypes.COMPONENT */;
862
863
  for (const prop of props) {
863
864
  if (prop.type === 7 /* CompilerDOM.NodeTypes.DIRECTIVE */
864
865
  && (prop.name === 'bind' || prop.name === 'model')
@@ -884,9 +885,9 @@ function generate(ts, compilerOptions, vueCompilerOptions, template, shouldGener
884
885
  continue;
885
886
  }
886
887
  let camelized = false;
887
- if ((!prop.arg || (prop.arg.type === 4 /* CompilerDOM.NodeTypes.SIMPLE_EXPRESSION */ && prop.arg.isStatic)) // isStatic
888
+ if (canCamelize
889
+ && (!prop.arg || (prop.arg.type === 4 /* CompilerDOM.NodeTypes.SIMPLE_EXPRESSION */ && prop.arg.isStatic)) // isStatic
888
890
  && (0, shared_2.hyphenateAttr)(attrNameText) === attrNameText
889
- && !nativeTags.has(node.tag)
890
891
  && !vueCompilerOptions.htmlAttributes.some(pattern => (0, minimatch_1.minimatch)(attrNameText, pattern))) {
891
892
  attrNameText = (0, shared_1.camelize)(attrNameText);
892
893
  camelized = true;
@@ -963,8 +964,8 @@ function generate(ts, compilerOptions, vueCompilerOptions, template, shouldGener
963
964
  continue;
964
965
  }
965
966
  let camelized = false;
966
- if ((0, shared_2.hyphenateAttr)(prop.name) === prop.name
967
- && !nativeTags.has(node.tag)
967
+ if (canCamelize
968
+ && (0, shared_2.hyphenateAttr)(prop.name) === prop.name
968
969
  && !vueCompilerOptions.htmlAttributes.some(pattern => (0, minimatch_1.minimatch)(attrNameText, pattern))) {
969
970
  attrNameText = (0, shared_1.camelize)(prop.name);
970
971
  camelized = true;
@@ -0,0 +1,5 @@
1
+ import { VueCodeInformation } from '../types';
2
+ export declare function disableAllFeatures(override: Partial<VueCodeInformation>): VueCodeInformation;
3
+ export declare function enableAllFeatures(override: Partial<VueCodeInformation>): VueCodeInformation;
4
+ export declare function mergeFeatureSettings(base: VueCodeInformation, ...others: Partial<VueCodeInformation>[]): VueCodeInformation;
5
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mergeFeatureSettings = exports.enableAllFeatures = exports.disableAllFeatures = void 0;
4
+ function disableAllFeatures(override) {
5
+ return {
6
+ verification: false,
7
+ completion: false,
8
+ semantic: false,
9
+ navigation: false,
10
+ structure: false,
11
+ format: false,
12
+ ...override,
13
+ };
14
+ }
15
+ exports.disableAllFeatures = disableAllFeatures;
16
+ function enableAllFeatures(override) {
17
+ return {
18
+ verification: true,
19
+ completion: true,
20
+ semantic: true,
21
+ navigation: true,
22
+ structure: true,
23
+ format: true,
24
+ ...override,
25
+ };
26
+ }
27
+ exports.enableAllFeatures = enableAllFeatures;
28
+ function mergeFeatureSettings(base, ...others) {
29
+ const result = { ...base };
30
+ for (const info of others) {
31
+ for (const key in info) {
32
+ const value = info[key];
33
+ if (value) {
34
+ result[key] = value;
35
+ }
36
+ }
37
+ }
38
+ return result;
39
+ }
40
+ exports.mergeFeatureSettings = mergeFeatureSettings;
41
+ //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/language-core",
3
- "version": "1.8.24",
3
+ "version": "1.8.25",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -37,5 +37,5 @@
37
37
  "optional": true
38
38
  }
39
39
  },
40
- "gitHead": "6f850196d6b9cd1bee62104d3d92867cf0b6777e"
40
+ "gitHead": "6f8ca45025b8e38a86f6946bbc294a6a2d88b063"
41
41
  }