@flint.fyi/vue-language 0.1.0 → 0.1.2
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,4 +1,3 @@
|
|
|
1
|
-
import type { ExtractedDirective } from "@flint.fyi/typescript-language";
|
|
2
1
|
import { type RootNode } from "@vue/compiler-dom";
|
|
2
|
+
import type { ExtractedDirective } from "@flint.fyi/typescript-language";
|
|
3
3
|
export declare function extractTemplateDirectives(ast: RootNode): ExtractedDirective[];
|
|
4
|
-
//# sourceMappingURL=extractTemplateDirectives.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { nullThrows } from "@flint.fyi/utils";
|
|
2
1
|
import { NodeTypes } from "@vue/compiler-dom";
|
|
2
|
+
import { nullThrows } from "@flint.fyi/utils";
|
|
3
3
|
//#region src/extractTemplateDirectives.ts
|
|
4
4
|
function extractTemplateDirectives(ast) {
|
|
5
5
|
const directives = [];
|
|
@@ -34,5 +34,3 @@ function extractTemplateDirectives(ast) {
|
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
export { extractTemplateDirectives };
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=extractTemplateDirectives.js.map
|
package/lib/language.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _flint_fyi_volar_language0 from "@flint.fyi/volar-language";
|
|
2
1
|
import { RootNode } from "@vue/compiler-dom";
|
|
3
2
|
import { VueVirtualCode, tsCodegen } from "@vue/language-core";
|
|
4
|
-
import * as _flint_fyi_typescript_language0 from "@flint.fyi/typescript-language";
|
|
5
3
|
import { Mapper } from "@volar/language-core";
|
|
6
4
|
|
|
7
5
|
//#region src/language.d.ts
|
|
@@ -14,7 +12,6 @@ interface VueServices {
|
|
|
14
12
|
};
|
|
15
13
|
}
|
|
16
14
|
type VueCodegen = typeof tsCodegen extends WeakMap<WeakKey, infer V> ? V : never;
|
|
17
|
-
declare const vueLanguage:
|
|
15
|
+
declare const vueLanguage: import("@flint.fyi/volar-language").Language<import("@flint.fyi/typescript-language").TypeScriptNodesByName, Partial<VueServices> & import("@flint.fyi/typescript-language").TypeScriptFileServices>;
|
|
18
16
|
//#endregion
|
|
19
|
-
export { vueLanguage };
|
|
20
|
-
//# sourceMappingURL=language.d.ts.map
|
|
17
|
+
export { VueServices, vueLanguage };
|
package/lib/language.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { extractTemplateDirectives } from "./extractTemplateDirectives.js";
|
|
2
2
|
import { vueParsingErrorsToLanguageReports } from "./vueParsingErrorsToLanguageReports.js";
|
|
3
|
+
import { NodeTypes, parse } from "@vue/compiler-dom";
|
|
4
|
+
import { VueVirtualCode, createParsedCommandLine, createParsedCommandLineByJson, createVueLanguagePlugin, tsCodegen } from "@vue/language-core";
|
|
3
5
|
import { setTSExtraSupportedExtensions } from "@flint.fyi/ts-patch";
|
|
4
6
|
import { assert, nullThrows } from "@flint.fyi/utils";
|
|
5
7
|
import { createVolarBasedLanguage } from "@flint.fyi/volar-language";
|
|
6
|
-
import { NodeTypes, parse } from "@vue/compiler-dom";
|
|
7
|
-
import { VueVirtualCode, createParsedCommandLine, createParsedCommandLineByJson, createVueLanguagePlugin, tsCodegen } from "@vue/language-core";
|
|
8
8
|
//#region src/language.ts
|
|
9
9
|
setTSExtraSupportedExtensions([".vue"]);
|
|
10
10
|
const vueLanguage = createVolarBasedLanguage((ts, options) => {
|
|
@@ -46,5 +46,3 @@ const vueLanguage = createVolarBasedLanguage((ts, options) => {
|
|
|
46
46
|
});
|
|
47
47
|
//#endregion
|
|
48
48
|
export { vueLanguage };
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=language.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { LanguageReports } from "@flint.fyi/core";
|
|
2
1
|
import type { CompilerError } from "@vue/compiler-dom";
|
|
2
|
+
import type { LanguageReports } from "@flint.fyi/core";
|
|
3
3
|
export declare function vueParsingErrorsToLanguageReports(fileName: string, errors: (CompilerError | SyntaxError)[]): LanguageReports;
|
|
4
|
-
//# sourceMappingURL=vueParsingErrorsToLanguageReports.d.ts.map
|
|
@@ -9,11 +9,14 @@ function vueParsingErrorsToLanguageReports(fileName, errors) {
|
|
|
9
9
|
}
|
|
10
10
|
return {
|
|
11
11
|
code,
|
|
12
|
-
|
|
12
|
+
source: "vue",
|
|
13
|
+
text: `${fileName}${loc} - ${code}: ${error.name} - ${error.message}`,
|
|
14
|
+
..."code" in error && error.loc != null && { range: {
|
|
15
|
+
begin: error.loc.start.offset,
|
|
16
|
+
end: error.loc.end.offset
|
|
17
|
+
} }
|
|
13
18
|
};
|
|
14
19
|
});
|
|
15
20
|
}
|
|
16
21
|
//#endregion
|
|
17
22
|
export { vueParsingErrorsToLanguageReports };
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=vueParsingErrorsToLanguageReports.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flint.fyi/vue-language",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "[Experimental] Vue.js language for Flint.",
|
|
5
5
|
"homepage": "https://flint.fyi",
|
|
6
6
|
"repository": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": {
|
|
13
|
-
"name": "
|
|
14
|
-
"
|
|
13
|
+
"name": "Flint Team",
|
|
14
|
+
"url": "https://flint.fyi/team"
|
|
15
15
|
},
|
|
16
16
|
"sideEffects": true,
|
|
17
17
|
"type": "module",
|
|
@@ -19,23 +19,22 @@
|
|
|
19
19
|
".": "./lib/index.js"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
|
-
"lib/"
|
|
23
|
-
"!lib/**/*.map"
|
|
22
|
+
"lib/"
|
|
24
23
|
],
|
|
25
24
|
"dependencies": {
|
|
26
25
|
"@volar/language-core": "2.4.28",
|
|
27
26
|
"@vue/compiler-dom": "^3.5.0",
|
|
28
27
|
"@vue/language-core": "3.2.1",
|
|
29
28
|
"typescript": "^5.9.0 || ^6.0.0",
|
|
30
|
-
"@flint.fyi/ts-patch": "^0.
|
|
29
|
+
"@flint.fyi/ts-patch": "^0.14.0",
|
|
30
|
+
"@flint.fyi/typescript-language": "^0.18.4",
|
|
31
31
|
"@flint.fyi/utils": "^0.14.1",
|
|
32
|
-
"@flint.fyi/
|
|
33
|
-
"@flint.fyi/volar-language": "^0.1.0"
|
|
32
|
+
"@flint.fyi/volar-language": "^0.1.4"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"tsdown": "0.
|
|
35
|
+
"tsdown": "0.22.3",
|
|
37
36
|
"vitest": "4.1.0",
|
|
38
|
-
"@flint.fyi/core": "^0.
|
|
37
|
+
"@flint.fyi/core": "^0.23.3"
|
|
39
38
|
},
|
|
40
39
|
"engines": {
|
|
41
40
|
"node": ">=24.0.0"
|