@flint.fyi/svelte-language 0.2.0 → 0.3.0

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/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { AST } from "svelte/compiler";
2
2
  import { VolarLanguage } from "@flint.fyi/volar-language";
3
-
4
3
  //#region src/language.d.ts
5
4
  interface SvelteServices {
6
5
  svelte: {
@@ -8,6 +7,5 @@ interface SvelteServices {
8
7
  sourceText: string;
9
8
  };
10
9
  }
11
- declare const svelteLanguage: VolarLanguage<SvelteServices>;
12
- //#endregion
13
- export { svelteLanguage };
10
+ export declare const svelteLanguage: VolarLanguage<SvelteServices>;
11
+ //#endregion
package/dist/index.mjs CHANGED
@@ -3,10 +3,10 @@ import { setTSExtraSupportedExtensions } from "@flint.fyi/ts-patch";
3
3
  import { createVolarBasedLanguage } from "@flint.fyi/volar-language";
4
4
  import { getColumnAndLineOfPosition, getPositionOfColumnAndLine } from "@flint.fyi/core";
5
5
  import { nullThrows } from "@flint.fyi/utils";
6
- import path from "node:path";
7
6
  import url from "node:url";
8
7
  import { decode } from "@jridgewell/sourcemap-codec";
9
8
  import { forEachEmbeddedCode } from "@volar/language-core";
9
+ import { dirname } from "pathe";
10
10
  import { internalHelpers, svelte2tsx } from "svelte2tsx";
11
11
  //#region src/extractDirectives.ts
12
12
  function extractDirectives(ast, source) {
@@ -31,10 +31,10 @@ function extractDirectives(ast, source) {
31
31
  }
32
32
  //#endregion
33
33
  //#region src/volarLanguagePlugin.ts
34
- const sveltePath = path.dirname(url.fileURLToPath(import.meta.resolve("svelte/package.json")));
35
- const svelte2tsxPath = path.dirname(url.fileURLToPath(import.meta.resolve("svelte2tsx/package.json")));
34
+ const sveltePath = dirname(url.fileURLToPath(import.meta.resolve("svelte/package.json")));
35
+ const svelte2tsxPath = dirname(url.fileURLToPath(import.meta.resolve("svelte2tsx/package.json")));
36
36
  function volarLanguagePlugin(typescript, options) {
37
- const cwd = typeof options.options.configFilePath === "string" ? path.dirname(options.options.configFilePath) : (options.host ?? typescript.sys).getCurrentDirectory();
37
+ const cwd = typeof options.options.configFilePath === "string" ? dirname(options.options.configFilePath) : (options.host ?? typescript.sys).getCurrentDirectory();
38
38
  return {
39
39
  createVirtualCode(fileName, languageId, snapshot) {
40
40
  if (languageId !== "svelte") return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flint.fyi/svelte-language",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "[Experimental] Svelte language for Flint.",
5
5
  "homepage": "https://flint.fyi",
6
6
  "repository": {
@@ -22,21 +22,22 @@
22
22
  "dist/"
23
23
  ],
24
24
  "dependencies": {
25
+ "@flint.fyi/core": "^0.27.0",
26
+ "@flint.fyi/ts-patch": "^0.17.0",
27
+ "@flint.fyi/typescript-language": "^0.21.0",
28
+ "@flint.fyi/utils": "^0.16.0",
29
+ "@flint.fyi/volar-language": "^0.4.0",
25
30
  "@jridgewell/sourcemap-codec": "^1.5.5",
26
31
  "@volar/language-core": "2.4.28",
32
+ "pathe": "^2.0.3",
27
33
  "svelte": "^5.0.0",
28
34
  "svelte2tsx": "^0.7.55",
29
- "typescript": "^5.9.0 || ^6.0.0",
30
- "@flint.fyi/utils": "^0.16.0",
31
- "@flint.fyi/ts-patch": "^0.16.0",
32
- "@flint.fyi/typescript-language": "^0.20.0",
33
- "@flint.fyi/volar-language": "^0.3.0",
34
- "@flint.fyi/core": "^0.25.0"
35
+ "typescript": "^6.0.3"
35
36
  },
36
37
  "devDependencies": {
37
- "tsdown": "0.22.3",
38
- "vitest": "4.1.0",
39
- "@flint.fyi/build": "^0.1.0"
38
+ "@flint.fyi/build": "^0.1.0",
39
+ "tsdown": "0.23.0",
40
+ "vitest": "5.0.1"
40
41
  },
41
42
  "engines": {
42
43
  "node": ">=26.1.0"