@vue/language-core 2.0.14 → 2.0.15
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/lib/codegen/script/component.d.ts +1 -1
- package/lib/codegen/script/component.js +12 -4
- package/lib/codegen/script/globalTypes.js +1 -1
- package/lib/codegen/script/internalComponent.js +1 -1
- package/lib/codegen/script/scriptSetup.js +52 -19
- package/lib/codegen/script/template.js +5 -2
- package/lib/codegen/template/context.js +0 -1
- package/lib/codegen/template/element.d.ts +2 -1
- package/lib/codegen/template/element.js +101 -48
- package/lib/codegen/template/elementChildren.d.ts +2 -2
- package/lib/codegen/template/elementChildren.js +8 -3
- package/lib/codegen/template/elementEvents.d.ts +2 -0
- package/lib/codegen/template/elementEvents.js +47 -31
- package/lib/codegen/template/elementProps.js +33 -8
- package/lib/codegen/template/index.d.ts +10 -10
- package/lib/codegen/template/index.js +12 -99
- package/lib/codegen/template/slotOutlet.d.ts +1 -1
- package/lib/codegen/template/slotOutlet.js +2 -2
- package/lib/codegen/template/templateChild.d.ts +1 -1
- package/lib/codegen/template/templateChild.js +14 -10
- package/lib/codegen/template/vFor.d.ts +1 -1
- package/lib/codegen/template/vFor.js +2 -2
- package/lib/codegen/template/vIf.d.ts +1 -1
- package/lib/codegen/template/vIf.js +2 -2
- package/lib/languageModule.d.ts +1 -2
- package/lib/languageModule.js +30 -12
- package/lib/parsers/scriptSetupRanges.d.ts +1 -0
- package/lib/parsers/scriptSetupRanges.js +6 -1
- package/lib/plugins/file-html.js +63 -66
- package/lib/plugins/file-md.js +47 -50
- package/lib/plugins/vue-tsx.d.ts +1 -0
- package/lib/plugins.d.ts +2 -1
- package/lib/plugins.js +18 -9
- package/lib/types.d.ts +2 -0
- package/lib/utils/ts.js +20 -3
- package/lib/virtualFile/computedFiles.d.ts +1 -0
- package/lib/virtualFile/computedFiles.js +19 -3
- package/package.json +3 -3
package/lib/plugins/file-html.js
CHANGED
|
@@ -6,74 +6,71 @@ const plugin = () => {
|
|
|
6
6
|
return {
|
|
7
7
|
version: 2,
|
|
8
8
|
parseSFC(fileName, content) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
// ignore `<script src="...">`
|
|
47
|
-
else if (tag === 'script' && attrs.indexOf('src=') === -1) {
|
|
48
|
-
let type = attrs.indexOf('type=') >= 0 ? 'scriptSetup' : 'script';
|
|
49
|
-
sfc.descriptor[type] = {
|
|
50
|
-
attrs: {},
|
|
51
|
-
content,
|
|
52
|
-
loc: {
|
|
53
|
-
start: { column: -1, line: -1, offset: contentStart },
|
|
54
|
-
end: { column: -1, line: -1, offset: contentStart + content.length },
|
|
55
|
-
source: content,
|
|
56
|
-
},
|
|
57
|
-
type: 'script',
|
|
58
|
-
lang,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
templateContent = templateContent.substring(0, match.index) + ' '.repeat(matchText.length) + templateContent.substring(match.index + matchText.length);
|
|
9
|
+
let sfc = {
|
|
10
|
+
descriptor: {
|
|
11
|
+
filename: fileName,
|
|
12
|
+
source: content,
|
|
13
|
+
template: null,
|
|
14
|
+
script: null,
|
|
15
|
+
scriptSetup: null,
|
|
16
|
+
styles: [],
|
|
17
|
+
customBlocks: [],
|
|
18
|
+
cssVars: [],
|
|
19
|
+
shouldForceReload: () => false,
|
|
20
|
+
slotted: false,
|
|
21
|
+
},
|
|
22
|
+
errors: [],
|
|
23
|
+
};
|
|
24
|
+
let templateContent = content;
|
|
25
|
+
for (const match of content.matchAll(sfcBlockReg)) {
|
|
26
|
+
const matchText = match[0];
|
|
27
|
+
const tag = match[1];
|
|
28
|
+
const attrs = match[2];
|
|
29
|
+
const lang = attrs.match(langReg)?.[2];
|
|
30
|
+
const content = match[3];
|
|
31
|
+
const contentStart = match.index + matchText.indexOf(content);
|
|
32
|
+
if (tag === 'style') {
|
|
33
|
+
sfc.descriptor.styles.push({
|
|
34
|
+
attrs: {},
|
|
35
|
+
content,
|
|
36
|
+
loc: {
|
|
37
|
+
start: { column: -1, line: -1, offset: contentStart },
|
|
38
|
+
end: { column: -1, line: -1, offset: contentStart + content.length },
|
|
39
|
+
source: content,
|
|
40
|
+
},
|
|
41
|
+
type: 'style',
|
|
42
|
+
lang,
|
|
43
|
+
});
|
|
62
44
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
45
|
+
// ignore `<script src="...">`
|
|
46
|
+
else if (tag === 'script' && attrs.indexOf('src=') === -1) {
|
|
47
|
+
let type = attrs.indexOf('type=') >= 0 ? 'scriptSetup' : 'script';
|
|
48
|
+
sfc.descriptor[type] = {
|
|
49
|
+
attrs: {},
|
|
50
|
+
content,
|
|
51
|
+
loc: {
|
|
52
|
+
start: { column: -1, line: -1, offset: contentStart },
|
|
53
|
+
end: { column: -1, line: -1, offset: contentStart + content.length },
|
|
54
|
+
source: content,
|
|
55
|
+
},
|
|
56
|
+
type: 'script',
|
|
57
|
+
lang,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
templateContent = templateContent.substring(0, match.index) + ' '.repeat(matchText.length) + templateContent.substring(match.index + matchText.length);
|
|
75
61
|
}
|
|
76
|
-
|
|
62
|
+
sfc.descriptor.template = {
|
|
63
|
+
attrs: {},
|
|
64
|
+
content: templateContent,
|
|
65
|
+
loc: {
|
|
66
|
+
start: { column: -1, line: -1, offset: 0 },
|
|
67
|
+
end: { column: -1, line: -1, offset: templateContent.length },
|
|
68
|
+
source: templateContent,
|
|
69
|
+
},
|
|
70
|
+
type: 'template',
|
|
71
|
+
ast: {},
|
|
72
|
+
};
|
|
73
|
+
return sfc;
|
|
77
74
|
}
|
|
78
75
|
};
|
|
79
76
|
};
|
package/lib/plugins/file-md.js
CHANGED
|
@@ -12,58 +12,55 @@ const codeSnippetImportReg = /^\s*<<<\s*.+/gm;
|
|
|
12
12
|
const plugin = () => {
|
|
13
13
|
return {
|
|
14
14
|
version: 2,
|
|
15
|
-
parseSFC(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
content = content.substring(0, match.index) + ' '.repeat(matchText.length) + content.substring(match.index + matchText.length);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
content = content
|
|
36
|
-
// angle bracket: <http://foo.com>
|
|
37
|
-
.replace(angleBracketReg, match => ' '.repeat(match.length))
|
|
38
|
-
// [foo](http://foo.com)
|
|
39
|
-
.replace(linkReg, match => ' '.repeat(match.length));
|
|
40
|
-
codes.push('<template>\n');
|
|
41
|
-
codes.push([content, undefined, 0]);
|
|
42
|
-
codes.push('\n</template>');
|
|
43
|
-
const file2VueSourceMap = new language_core_1.SourceMap((0, language_core_1.buildMappings)(codes));
|
|
44
|
-
const sfc = (0, parseSfc_1.parse)((0, language_core_1.toString)(codes));
|
|
45
|
-
if (sfc.descriptor.template) {
|
|
46
|
-
transformRange(sfc.descriptor.template);
|
|
47
|
-
}
|
|
48
|
-
if (sfc.descriptor.script) {
|
|
49
|
-
transformRange(sfc.descriptor.script);
|
|
50
|
-
}
|
|
51
|
-
if (sfc.descriptor.scriptSetup) {
|
|
52
|
-
transformRange(sfc.descriptor.scriptSetup);
|
|
53
|
-
}
|
|
54
|
-
for (const style of sfc.descriptor.styles) {
|
|
55
|
-
transformRange(style);
|
|
56
|
-
}
|
|
57
|
-
for (const customBlock of sfc.descriptor.customBlocks) {
|
|
58
|
-
transformRange(customBlock);
|
|
59
|
-
}
|
|
60
|
-
return sfc;
|
|
61
|
-
function transformRange(block) {
|
|
62
|
-
block.loc.start.offset = file2VueSourceMap.getSourceOffset(block.loc.start.offset)?.[0] ?? -1;
|
|
63
|
-
block.loc.end.offset = file2VueSourceMap.getSourceOffset(block.loc.end.offset)?.[0] ?? -1;
|
|
15
|
+
parseSFC(_fileName, content) {
|
|
16
|
+
content = content
|
|
17
|
+
// code block
|
|
18
|
+
.replace(codeblockReg, (match, quotes) => quotes + ' '.repeat(match.length - quotes.length * 2) + quotes)
|
|
19
|
+
// inline code block
|
|
20
|
+
.replace(inlineCodeblockReg, match => `\`${' '.repeat(match.length - 2)}\``)
|
|
21
|
+
// # \<script setup>
|
|
22
|
+
.replace(scriptSetupReg, match => ' '.repeat(match.length))
|
|
23
|
+
// <<< https://vitepress.dev/guide/markdown#import-code-snippets
|
|
24
|
+
.replace(codeSnippetImportReg, match => ' '.repeat(match.length));
|
|
25
|
+
const codes = [];
|
|
26
|
+
for (const match of content.matchAll(sfcBlockReg)) {
|
|
27
|
+
if (match.index !== undefined) {
|
|
28
|
+
const matchText = match[0];
|
|
29
|
+
codes.push([matchText, undefined, match.index]);
|
|
30
|
+
codes.push('\n\n');
|
|
31
|
+
content = content.substring(0, match.index) + ' '.repeat(matchText.length) + content.substring(match.index + matchText.length);
|
|
64
32
|
}
|
|
65
33
|
}
|
|
66
|
-
|
|
34
|
+
content = content
|
|
35
|
+
// angle bracket: <http://foo.com>
|
|
36
|
+
.replace(angleBracketReg, match => ' '.repeat(match.length))
|
|
37
|
+
// [foo](http://foo.com)
|
|
38
|
+
.replace(linkReg, match => ' '.repeat(match.length));
|
|
39
|
+
codes.push('<template>\n');
|
|
40
|
+
codes.push([content, undefined, 0]);
|
|
41
|
+
codes.push('\n</template>');
|
|
42
|
+
const file2VueSourceMap = new language_core_1.SourceMap((0, language_core_1.buildMappings)(codes));
|
|
43
|
+
const sfc = (0, parseSfc_1.parse)((0, language_core_1.toString)(codes));
|
|
44
|
+
if (sfc.descriptor.template) {
|
|
45
|
+
transformRange(sfc.descriptor.template);
|
|
46
|
+
}
|
|
47
|
+
if (sfc.descriptor.script) {
|
|
48
|
+
transformRange(sfc.descriptor.script);
|
|
49
|
+
}
|
|
50
|
+
if (sfc.descriptor.scriptSetup) {
|
|
51
|
+
transformRange(sfc.descriptor.scriptSetup);
|
|
52
|
+
}
|
|
53
|
+
for (const style of sfc.descriptor.styles) {
|
|
54
|
+
transformRange(style);
|
|
55
|
+
}
|
|
56
|
+
for (const customBlock of sfc.descriptor.customBlocks) {
|
|
57
|
+
transformRange(customBlock);
|
|
58
|
+
}
|
|
59
|
+
return sfc;
|
|
60
|
+
function transformRange(block) {
|
|
61
|
+
block.loc.start.offset = file2VueSourceMap.getSourceOffset(block.loc.start.offset)?.[0] ?? -1;
|
|
62
|
+
block.loc.end.offset = file2VueSourceMap.getSourceOffset(block.loc.end.offset)?.[0] ?? -1;
|
|
63
|
+
}
|
|
67
64
|
}
|
|
68
65
|
};
|
|
69
66
|
};
|
package/lib/plugins/vue-tsx.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const tsCodegen: WeakMap<Sfc, {
|
|
|
30
30
|
};
|
|
31
31
|
slots: {
|
|
32
32
|
name?: string | undefined;
|
|
33
|
+
isObjectBindingPattern?: boolean | undefined;
|
|
33
34
|
define?: (import("../types").TextRange & {
|
|
34
35
|
arg?: import("../types").TextRange | undefined;
|
|
35
36
|
typeArg?: import("../types").TextRange | undefined;
|
package/lib/plugins.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type VueLanguagePlugin } from './types';
|
|
2
|
-
export
|
|
2
|
+
export * from './plugins/shared';
|
|
3
|
+
export declare function getBasePlugins(pluginContext: Parameters<VueLanguagePlugin>[0]): {
|
|
3
4
|
version: 2;
|
|
4
5
|
name?: string | undefined;
|
|
5
6
|
order?: number | undefined;
|
package/lib/plugins.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const file_html_1 = require("./plugins/file-html");
|
|
5
|
-
const file_md_1 = require("./plugins/file-md");
|
|
6
|
-
const file_vue_1 = require("./plugins/file-vue");
|
|
17
|
+
exports.getBasePlugins = void 0;
|
|
7
18
|
const vue_sfc_customblocks_1 = require("./plugins/vue-sfc-customblocks");
|
|
8
19
|
const vue_sfc_scripts_1 = require("./plugins/vue-sfc-scripts");
|
|
9
20
|
const vue_sfc_styles_1 = require("./plugins/vue-sfc-styles");
|
|
@@ -13,11 +24,9 @@ const vue_template_inline_css_1 = require("./plugins/vue-template-inline-css");
|
|
|
13
24
|
const vue_template_inline_ts_1 = require("./plugins/vue-template-inline-ts");
|
|
14
25
|
const vue_tsx_1 = require("./plugins/vue-tsx");
|
|
15
26
|
const types_1 = require("./types");
|
|
16
|
-
|
|
27
|
+
__exportStar(require("./plugins/shared"), exports);
|
|
28
|
+
function getBasePlugins(pluginContext) {
|
|
17
29
|
const plugins = [
|
|
18
|
-
file_md_1.default, // .md for VitePress
|
|
19
|
-
file_html_1.default, // .html for PetiteVue
|
|
20
|
-
file_vue_1.default, // .vue and others for Vue
|
|
21
30
|
vue_template_html_1.default,
|
|
22
31
|
vue_template_inline_css_1.default,
|
|
23
32
|
vue_template_inline_ts_1.default,
|
|
@@ -53,5 +62,5 @@ function getDefaultVueLanguagePlugins(pluginContext) {
|
|
|
53
62
|
return valid;
|
|
54
63
|
});
|
|
55
64
|
}
|
|
56
|
-
exports.
|
|
65
|
+
exports.getBasePlugins = getBasePlugins;
|
|
57
66
|
//# sourceMappingURL=plugins.js.map
|
package/lib/types.d.ts
CHANGED
package/lib/utils/ts.js
CHANGED
|
@@ -16,7 +16,11 @@ function createParsedCommandLineByJson(ts, parseConfigHost, rootDir, json, confi
|
|
|
16
16
|
catch (err) { }
|
|
17
17
|
}
|
|
18
18
|
const resolvedVueOptions = resolveVueCompilerOptions(vueOptions);
|
|
19
|
-
const parsed = ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, configFileName, undefined,
|
|
19
|
+
const parsed = ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, configFileName, undefined, [
|
|
20
|
+
...resolvedVueOptions.extensions,
|
|
21
|
+
...resolvedVueOptions.vitePressExtensions,
|
|
22
|
+
...resolvedVueOptions.petiteVueExtensions,
|
|
23
|
+
].map(extension => ({
|
|
20
24
|
extension: extension.slice(1),
|
|
21
25
|
isMixedContent: true,
|
|
22
26
|
scriptKind: ts.ScriptKind.Deferred,
|
|
@@ -47,7 +51,11 @@ function createParsedCommandLine(ts, parseConfigHost, tsConfigPath) {
|
|
|
47
51
|
catch (err) { }
|
|
48
52
|
}
|
|
49
53
|
const resolvedVueOptions = resolveVueCompilerOptions(vueOptions);
|
|
50
|
-
const parsed = ts.parseJsonSourceFileConfigFileContent(config, proxyHost.host, path.dirname(tsConfigPath), {}, tsConfigPath, undefined,
|
|
54
|
+
const parsed = ts.parseJsonSourceFileConfigFileContent(config, proxyHost.host, path.dirname(tsConfigPath), {}, tsConfigPath, undefined, [
|
|
55
|
+
...resolvedVueOptions.extensions,
|
|
56
|
+
...resolvedVueOptions.vitePressExtensions,
|
|
57
|
+
...resolvedVueOptions.petiteVueExtensions,
|
|
58
|
+
].map(extension => ({
|
|
51
59
|
extension: extension.slice(1),
|
|
52
60
|
isMixedContent: true,
|
|
53
61
|
scriptKind: ts.ScriptKind.Deferred,
|
|
@@ -121,7 +129,14 @@ function getPartialVueCompilerOptions(ts, tsConfigSourceFile) {
|
|
|
121
129
|
const resolvedPath = resolvePath(pluginPath);
|
|
122
130
|
if (resolvedPath) {
|
|
123
131
|
const plugin = require(resolvedPath);
|
|
124
|
-
plugin
|
|
132
|
+
if (Array.isArray(plugin)) {
|
|
133
|
+
for (let i = 0; i < plugin.length; i++) {
|
|
134
|
+
plugin[i].__moduleName = `${pluginPath} (${i})`;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
plugin.__moduleName = pluginPath;
|
|
139
|
+
}
|
|
125
140
|
return plugin;
|
|
126
141
|
}
|
|
127
142
|
else {
|
|
@@ -158,6 +173,8 @@ function resolveVueCompilerOptions(vueOptions) {
|
|
|
158
173
|
...vueOptions,
|
|
159
174
|
target,
|
|
160
175
|
extensions: vueOptions.extensions ?? ['.vue'],
|
|
176
|
+
vitePressExtensions: vueOptions.vitePressExtensions ?? [],
|
|
177
|
+
petiteVueExtensions: vueOptions.petiteVueExtensions ?? [],
|
|
161
178
|
lib,
|
|
162
179
|
jsxSlots: vueOptions.jsxSlots ?? false,
|
|
163
180
|
strictTemplates: vueOptions.strictTemplates ?? false,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { VirtualCode } from '@volar/language-core';
|
|
2
2
|
import type { Sfc, VueLanguagePlugin } from '../types';
|
|
3
3
|
export declare function computedFiles(plugins: ReturnType<VueLanguagePlugin>[], fileName: string, sfc: Sfc): () => VirtualCode[];
|
|
4
|
+
export declare function resolveCommonLanguageId(lang: string): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.computedFiles = void 0;
|
|
3
|
+
exports.resolveCommonLanguageId = exports.computedFiles = void 0;
|
|
4
4
|
const language_core_1 = require("@volar/language-core");
|
|
5
5
|
const computeds_1 = require("computeds");
|
|
6
6
|
const embeddedFile_1 = require("./embeddedFile");
|
|
@@ -46,7 +46,7 @@ function computedFiles(plugins, fileName, sfc) {
|
|
|
46
46
|
if (!file.parentCodeId) {
|
|
47
47
|
embeddedCodes.push({
|
|
48
48
|
id: file.id,
|
|
49
|
-
languageId:
|
|
49
|
+
languageId: resolveCommonLanguageId(file.lang),
|
|
50
50
|
linkedCodeMappings: file.linkedCodeMappings,
|
|
51
51
|
snapshot,
|
|
52
52
|
mappings,
|
|
@@ -60,7 +60,7 @@ function computedFiles(plugins, fileName, sfc) {
|
|
|
60
60
|
parent.embeddedCodes ??= [];
|
|
61
61
|
parent.embeddedCodes.push({
|
|
62
62
|
id: file.id,
|
|
63
|
-
languageId:
|
|
63
|
+
languageId: resolveCommonLanguageId(file.lang),
|
|
64
64
|
linkedCodeMappings: file.linkedCodeMappings,
|
|
65
65
|
snapshot,
|
|
66
66
|
mappings,
|
|
@@ -215,4 +215,20 @@ function fullDiffTextChangeRange(oldText, newText) {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
+
function resolveCommonLanguageId(lang) {
|
|
219
|
+
switch (lang) {
|
|
220
|
+
case 'js': return 'javascript';
|
|
221
|
+
case 'cjs': return 'javascript';
|
|
222
|
+
case 'mjs': return 'javascript';
|
|
223
|
+
case 'ts': return 'typescript';
|
|
224
|
+
case 'cts': return 'typescript';
|
|
225
|
+
case 'mts': return 'typescript';
|
|
226
|
+
case 'jsx': return 'javascriptreact';
|
|
227
|
+
case 'tsx': return 'typescriptreact';
|
|
228
|
+
case 'pug': return 'jade';
|
|
229
|
+
case 'md': return 'markdown';
|
|
230
|
+
}
|
|
231
|
+
return lang;
|
|
232
|
+
}
|
|
233
|
+
exports.resolveCommonLanguageId = resolveCommonLanguageId;
|
|
218
234
|
//# sourceMappingURL=computedFiles.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/language-core"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@volar/language-core": "2.2.0-alpha.
|
|
15
|
+
"@volar/language-core": "2.2.0-alpha.12",
|
|
16
16
|
"@vue/compiler-dom": "^3.4.0",
|
|
17
17
|
"@vue/shared": "^3.4.0",
|
|
18
18
|
"computeds": "^0.0.1",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"optional": true
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "095f44449d71cd5a4730306c9c8c40df4d44dce3"
|
|
38
38
|
}
|