@flint.fyi/volar-language 0.3.0 → 0.3.1

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
@@ -3,7 +3,6 @@ import { FileAboutData, FileReport, Language, LanguageFileCacheImpacts, Language
3
3
  import { AST, ExtractedDirective, TypeScriptFileServices, TypeScriptNodesByName } from "@flint.fyi/typescript-language";
4
4
  import { Language as Language$1, LanguagePlugin, SourceScript } from "@volar/language-core";
5
5
  import { TypeScriptServiceScript } from "@volar/typescript";
6
-
7
6
  //#region src/language.d.ts
8
7
  type VolarLanguagePluginInitializer<FileServices extends object> = (typescript: typeof ts, options: CreateProgramOptions) => {
9
8
  createFile: VolarBasedLanguageCreateFile<FileServices>;
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import { NodeSyntaxKinds, convertTypeScriptDiagnosticToLanguageReport, extractDi
6
6
  import { FlintAssertionError, assert, nullThrows } from "@flint.fyi/utils";
7
7
  //#region package.json
8
8
  var name = "@flint.fyi/volar-language";
9
- var version = "0.3.0";
9
+ var version = "0.3.1";
10
10
  //#endregion
11
11
  //#region src/language.ts
12
12
  const stateSymbol = Symbol.for("@flint.fyi/volar-language/state");
@@ -18,7 +18,7 @@ const { pluginInitializers } = globalTyped[stateSymbol] = {
18
18
  };
19
19
  setTSProgramCreationProxy((ts, createProgram) => new Proxy(function() {}, { apply(_, thisArg, args) {
20
20
  let volarLanguage = null;
21
- const proxied = proxyCreateProgram(ts, new Proxy(createProgram, { apply(target, thisArg, [options]) {
21
+ const createProgramProxy = new Proxy(createProgram, { apply(target, thisArg, [options]) {
22
22
  assert(options.host != null, "Expected options.host to be defined");
23
23
  const patchedGetSourceFile = options.host.getSourceFile.bind(options.host);
24
24
  options.host.getSourceFile = (...args) => {
@@ -30,7 +30,8 @@ setTSProgramCreationProxy((ts, createProgram) => new Proxy(function() {}, { appl
30
30
  }
31
31
  };
32
32
  return Reflect.apply(target, thisArg, args);
33
- } }), (ts, options) => {
33
+ } });
34
+ const proxied = proxyCreateProgram(ts, createProgramProxy, (ts, options) => {
34
35
  return {
35
36
  languagePlugins: Array.from(pluginInitializers).map((initializer) => initializer(ts, options)).flatMap(({ createFile, languagePlugins }) => languagePlugins.map((plugin) => {
36
37
  if (plugin.typescript == null) return plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flint.fyi/volar-language",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "[Experimental] Volar.js language for Flint.",
5
5
  "homepage": "https://flint.fyi",
6
6
  "repository": {
@@ -22,18 +22,18 @@
22
22
  "dist/"
23
23
  ],
24
24
  "dependencies": {
25
- "@volar/language-core": "2.4.28",
26
- "@volar/typescript": "2.4.28",
27
- "typescript": "^5.9.0 || ^6.0.0",
28
- "@flint.fyi/core": "^0.25.0",
25
+ "@flint.fyi/core": "^0.26.0",
29
26
  "@flint.fyi/ts-patch": "^0.16.0",
27
+ "@flint.fyi/typescript-language": "^0.20.1",
30
28
  "@flint.fyi/utils": "^0.16.0",
31
- "@flint.fyi/typescript-language": "^0.20.0"
29
+ "@volar/language-core": "2.4.28",
30
+ "@volar/typescript": "2.4.28",
31
+ "typescript": "^5.9.0 || ^6.0.0"
32
32
  },
33
33
  "devDependencies": {
34
- "tsdown": "0.22.3",
35
- "vitest": "4.1.0",
36
- "@flint.fyi/build": "^0.1.0"
34
+ "@flint.fyi/build": "^0.1.0",
35
+ "tsdown": "0.22.14",
36
+ "vitest": "4.1.11"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=26.1.0"