@flint.fyi/svelte-language 0.2.1 → 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
@@ -7,6 +7,5 @@ interface SvelteServices {
7
7
  sourceText: string;
8
8
  };
9
9
  }
10
- declare const svelteLanguage: VolarLanguage<SvelteServices>;
11
- //#endregion
12
- 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.1",
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.26.0",
26
- "@flint.fyi/ts-patch": "^0.16.0",
27
- "@flint.fyi/typescript-language": "^0.20.1",
25
+ "@flint.fyi/core": "^0.27.0",
26
+ "@flint.fyi/ts-patch": "^0.17.0",
27
+ "@flint.fyi/typescript-language": "^0.21.0",
28
28
  "@flint.fyi/utils": "^0.16.0",
29
- "@flint.fyi/volar-language": "^0.3.1",
29
+ "@flint.fyi/volar-language": "^0.4.0",
30
30
  "@jridgewell/sourcemap-codec": "^1.5.5",
31
31
  "@volar/language-core": "2.4.28",
32
+ "pathe": "^2.0.3",
32
33
  "svelte": "^5.0.0",
33
34
  "svelte2tsx": "^0.7.55",
34
- "typescript": "^5.9.0 || ^6.0.0"
35
+ "typescript": "^6.0.3"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@flint.fyi/build": "^0.1.0",
38
- "tsdown": "0.22.14",
39
- "vitest": "4.1.11"
39
+ "tsdown": "0.23.0",
40
+ "vitest": "5.0.1"
40
41
  },
41
42
  "engines": {
42
43
  "node": ">=26.1.0"