@volar/language-server 1.0.17 → 1.0.18

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.
@@ -14,7 +14,7 @@ export interface ProjectParams {
14
14
  }
15
15
  export type Project = ReturnType<typeof createProject>;
16
16
  export declare function createProject(params: ProjectParams): Promise<{
17
- tsConfig: ts.CompilerOptions | path.PosixPath;
17
+ tsConfig: path.PosixPath | ts.CompilerOptions;
18
18
  scripts: {
19
19
  clear: () => void;
20
20
  values: () => IterableIterator<{
@@ -47,6 +47,7 @@ function createProject(params) {
47
47
  if (!parsedCommandLine.fileNames.includes(fileName)) {
48
48
  parsedCommandLine.fileNames.push(fileName);
49
49
  projectVersion++;
50
+ projectVersionUpdateTime = cancelTokenHost.getMtime();
50
51
  }
51
52
  },
52
53
  dispose,
@@ -86,6 +87,7 @@ function createProject(params) {
86
87
  }
87
88
  function onWorkspaceFilesChanged(changes) {
88
89
  return __awaiter(this, void 0, void 0, function* () {
90
+ const _projectVersion = projectVersion;
89
91
  for (const change of changes) {
90
92
  const script = scripts.uriGet(change.uri);
91
93
  if (script && (change.type === vscode.FileChangeType.Changed || change.type === vscode.FileChangeType.Created)) {
@@ -110,6 +112,9 @@ function createProject(params) {
110
112
  projectVersion++;
111
113
  typeRootVersion++;
112
114
  }
115
+ if (_projectVersion !== projectVersion) {
116
+ projectVersionUpdateTime = cancelTokenHost.getMtime();
117
+ }
113
118
  });
114
119
  }
115
120
  function createLanguageServiceHost() {
@@ -88,7 +88,6 @@ function createCommonLanguageServer(params) {
88
88
  && ((_c = (_b = initParams.capabilities.workspace) === null || _b === void 0 ? void 0 : _b.didChangeWatchedFiles) === null || _c === void 0 ? void 0 : _c.dynamicRegistration)) {
89
89
  connection.client.register(vscode.DidChangeWatchedFilesNotification.type, {
90
90
  watchers: [
91
- ...plugins.map(plugin => plugin.extraFileExtensions.map(ext => ({ globPattern: `**/*.${ext.extension}` }))).flat(),
92
91
  {
93
92
  globPattern: `**/*.{${[
94
93
  'js',
@@ -12,7 +12,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
12
12
  projects: {
13
13
  clear: () => void;
14
14
  values: () => IterableIterator<Promise<{
15
- tsConfig: ts.CompilerOptions | path.PosixPath;
15
+ tsConfig: path.PosixPath | ts.CompilerOptions;
16
16
  scripts: {
17
17
  clear: () => void;
18
18
  values: () => IterableIterator<{
@@ -142,7 +142,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
142
142
  }>>;
143
143
  uriDelete: (_uri: string) => boolean;
144
144
  uriGet: (_uri: string) => Promise<{
145
- tsConfig: ts.CompilerOptions | path.PosixPath;
145
+ tsConfig: path.PosixPath | ts.CompilerOptions;
146
146
  scripts: {
147
147
  clear: () => void;
148
148
  values: () => IterableIterator<{
@@ -272,7 +272,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
272
272
  }> | undefined;
273
273
  uriHas: (_uri: string) => boolean;
274
274
  uriSet: (_uri: string, item: Promise<{
275
- tsConfig: ts.CompilerOptions | path.PosixPath;
275
+ tsConfig: path.PosixPath | ts.CompilerOptions;
276
276
  scripts: {
277
277
  clear: () => void;
278
278
  values: () => IterableIterator<{
@@ -402,7 +402,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
402
402
  }>) => void;
403
403
  pathDelete: (path: string) => boolean;
404
404
  pathGet: (path: string) => Promise<{
405
- tsConfig: ts.CompilerOptions | path.PosixPath;
405
+ tsConfig: path.PosixPath | ts.CompilerOptions;
406
406
  scripts: {
407
407
  clear: () => void;
408
408
  values: () => IterableIterator<{
@@ -531,7 +531,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
531
531
  dispose: () => void;
532
532
  }> | undefined;
533
533
  pathHas: (path: string) => Promise<{
534
- tsConfig: ts.CompilerOptions | path.PosixPath;
534
+ tsConfig: path.PosixPath | ts.CompilerOptions;
535
535
  scripts: {
536
536
  clear: () => void;
537
537
  values: () => IterableIterator<{
@@ -660,7 +660,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
660
660
  dispose: () => void;
661
661
  }> | undefined;
662
662
  pathSet: (path: string, item: Promise<{
663
- tsConfig: ts.CompilerOptions | path.PosixPath;
663
+ tsConfig: path.PosixPath | ts.CompilerOptions;
664
664
  scripts: {
665
665
  clear: () => void;
666
666
  values: () => IterableIterator<{
@@ -793,7 +793,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
793
793
  getProjectAndTsConfig: (uri: string) => Promise<{
794
794
  tsconfig: string;
795
795
  project: {
796
- tsConfig: ts.CompilerOptions | path.PosixPath;
796
+ tsConfig: path.PosixPath | ts.CompilerOptions;
797
797
  scripts: {
798
798
  clear: () => void;
799
799
  values: () => IterableIterator<{
@@ -923,7 +923,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
923
923
  };
924
924
  } | undefined>;
925
925
  getInferredProject: () => Promise<{
926
- tsConfig: ts.CompilerOptions | path.PosixPath;
926
+ tsConfig: path.PosixPath | ts.CompilerOptions;
927
927
  scripts: {
928
928
  clear: () => void;
929
929
  values: () => IterableIterator<{
@@ -1052,7 +1052,7 @@ export declare function createWorkspace(params: WorkspaceParams): Promise<{
1052
1052
  dispose: () => void;
1053
1053
  }>;
1054
1054
  getInferredProjectDontCreate: () => Promise<{
1055
- tsConfig: ts.CompilerOptions | path.PosixPath;
1055
+ tsConfig: path.PosixPath | ts.CompilerOptions;
1056
1056
  scripts: {
1057
1057
  clear: () => void;
1058
1058
  values: () => IterableIterator<{
@@ -25,7 +25,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
25
25
  projects: {
26
26
  clear: () => void;
27
27
  values: () => IterableIterator<Promise<{
28
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
28
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
29
29
  scripts: {
30
30
  clear: () => void;
31
31
  values: () => IterableIterator<{
@@ -155,7 +155,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
155
155
  }>>;
156
156
  uriDelete: (_uri: string) => boolean;
157
157
  uriGet: (_uri: string) => Promise<{
158
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
158
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
159
159
  scripts: {
160
160
  clear: () => void;
161
161
  values: () => IterableIterator<{
@@ -285,7 +285,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
285
285
  }> | undefined;
286
286
  uriHas: (_uri: string) => boolean;
287
287
  uriSet: (_uri: string, item: Promise<{
288
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
288
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
289
289
  scripts: {
290
290
  clear: () => void;
291
291
  values: () => IterableIterator<{
@@ -415,7 +415,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
415
415
  }>) => void;
416
416
  pathDelete: (path: string) => boolean;
417
417
  pathGet: (path: string) => Promise<{
418
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
418
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
419
419
  scripts: {
420
420
  clear: () => void;
421
421
  values: () => IterableIterator<{
@@ -544,7 +544,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
544
544
  dispose: () => void;
545
545
  }> | undefined;
546
546
  pathHas: (path: string) => Promise<{
547
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
547
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
548
548
  scripts: {
549
549
  clear: () => void;
550
550
  values: () => IterableIterator<{
@@ -673,7 +673,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
673
673
  dispose: () => void;
674
674
  }> | undefined;
675
675
  pathSet: (path: string, item: Promise<{
676
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
676
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
677
677
  scripts: {
678
678
  clear: () => void;
679
679
  values: () => IterableIterator<{
@@ -806,7 +806,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
806
806
  getProjectAndTsConfig: (uri: string) => Promise<{
807
807
  tsconfig: string;
808
808
  project: {
809
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
809
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
810
810
  scripts: {
811
811
  clear: () => void;
812
812
  values: () => IterableIterator<{
@@ -936,7 +936,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
936
936
  };
937
937
  } | undefined>;
938
938
  getInferredProject: () => Promise<{
939
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
939
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
940
940
  scripts: {
941
941
  clear: () => void;
942
942
  values: () => IterableIterator<{
@@ -1065,7 +1065,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
1065
1065
  dispose: () => void;
1066
1066
  }>;
1067
1067
  getInferredProjectDontCreate: () => Promise<{
1068
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
1068
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
1069
1069
  scripts: {
1070
1070
  clear: () => void;
1071
1071
  values: () => IterableIterator<{
@@ -1199,7 +1199,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
1199
1199
  getProject: (uri: string) => Promise<{
1200
1200
  tsconfig: string;
1201
1201
  project: {
1202
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
1202
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
1203
1203
  scripts: {
1204
1204
  clear: () => void;
1205
1205
  values: () => IterableIterator<{
@@ -1330,7 +1330,7 @@ export declare function createWorkspaces(params: WorkspacesParams): {
1330
1330
  } | {
1331
1331
  tsconfig: undefined;
1332
1332
  project: {
1333
- tsConfig: ts.CompilerOptions | import("typesafe-path").PosixPath;
1333
+ tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
1334
1334
  scripts: {
1335
1335
  clear: () => void;
1336
1336
  values: () => IterableIterator<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-server",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -17,9 +17,9 @@
17
17
  "directory": "packages/language-server"
18
18
  },
19
19
  "dependencies": {
20
- "@volar/language-core": "1.0.17",
21
- "@volar/language-service": "1.0.17",
22
- "@volar/shared": "1.0.17",
20
+ "@volar/language-core": "1.0.18",
21
+ "@volar/language-service": "1.0.18",
22
+ "@volar/shared": "1.0.18",
23
23
  "request-light": "^0.6.0",
24
24
  "typesafe-path": "^0.2.2",
25
25
  "vscode-html-languageservice": "^5.0.3",
@@ -28,5 +28,5 @@
28
28
  "vscode-languageserver-textdocument": "^1.0.8",
29
29
  "vscode-uri": "^3.0.7"
30
30
  },
31
- "gitHead": "b66b64f579b5cafee9b8d70aa9f9303f39b6df49"
31
+ "gitHead": "f102ee7bfc96792c63746a5dcb9742e3346d5cc7"
32
32
  }