typescript-language-server 0.7.1 → 0.9.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/CHANGELOG.md +46 -0
- package/README.md +47 -4
- package/lib/calls.js +28 -30
- package/lib/calls.js.map +1 -1
- package/lib/cli.js +1 -2
- package/lib/cli.js.map +1 -1
- package/lib/commands.d.ts +0 -3
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +1 -4
- package/lib/commands.js.map +1 -1
- package/lib/completion.d.ts +4 -1
- package/lib/completion.d.ts.map +1 -1
- package/lib/completion.js +143 -11
- package/lib/completion.js.map +1 -1
- package/lib/diagnostic-queue.d.ts +5 -1
- package/lib/diagnostic-queue.d.ts.map +1 -1
- package/lib/diagnostic-queue.js +19 -3
- package/lib/diagnostic-queue.js.map +1 -1
- package/lib/features/fix-all.d.ts +12 -0
- package/lib/features/fix-all.d.ts.map +1 -0
- package/lib/features/fix-all.js +193 -0
- package/lib/features/fix-all.js.map +1 -0
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +1 -0
- package/lib/logger.js.map +1 -1
- package/lib/lsp-client.d.ts +10 -0
- package/lib/lsp-client.d.ts.map +1 -1
- package/lib/lsp-client.js +38 -0
- package/lib/lsp-client.js.map +1 -1
- package/lib/lsp-connection.d.ts.map +1 -1
- package/lib/lsp-connection.js +2 -0
- package/lib/lsp-connection.js.map +1 -1
- package/lib/lsp-server.d.ts +11 -13
- package/lib/lsp-server.d.ts.map +1 -1
- package/lib/lsp-server.js +224 -80
- package/lib/lsp-server.js.map +1 -1
- package/lib/lsp-server.spec.js +358 -9
- package/lib/lsp-server.spec.js.map +1 -1
- package/lib/organize-imports.js +2 -2
- package/lib/organize-imports.js.map +1 -1
- package/lib/organize-imports.spec.js +2 -2
- package/lib/organize-imports.spec.js.map +1 -1
- package/lib/protocol-translation.js +6 -9
- package/lib/protocol-translation.js.map +1 -1
- package/lib/semantic-tokens.d.ts +9 -0
- package/lib/semantic-tokens.d.ts.map +1 -0
- package/lib/semantic-tokens.js +47 -0
- package/lib/semantic-tokens.js.map +1 -0
- package/lib/test-utils.d.ts +2 -2
- package/lib/test-utils.d.ts.map +1 -1
- package/lib/test-utils.js +16 -6
- package/lib/test-utils.js.map +1 -1
- package/lib/ts-protocol.d.ts +18 -0
- package/lib/ts-protocol.d.ts.map +1 -1
- package/lib/ts-protocol.js +10 -1
- package/lib/ts-protocol.js.map +1 -1
- package/lib/tsp-client.d.ts +7 -2
- package/lib/tsp-client.d.ts.map +1 -1
- package/lib/tsp-client.js +20 -13
- package/lib/tsp-client.js.map +1 -1
- package/lib/tsp-client.spec.js +74 -82
- package/lib/tsp-client.spec.js.map +1 -1
- package/lib/tsp-command-types.d.ts +5 -2
- package/lib/tsp-command-types.d.ts.map +1 -1
- package/lib/tsp-command-types.js.map +1 -1
- package/lib/utils/SnippetString.d.ts +12 -0
- package/lib/utils/SnippetString.d.ts.map +1 -0
- package/lib/utils/SnippetString.js +69 -0
- package/lib/utils/SnippetString.js.map +1 -0
- package/lib/utils/configuration.d.ts +10 -0
- package/lib/utils/configuration.d.ts.map +1 -0
- package/lib/utils/configuration.js +3 -0
- package/lib/utils/configuration.js.map +1 -0
- package/lib/utils/errorCodes.d.ts +12 -0
- package/lib/utils/errorCodes.d.ts.map +1 -0
- package/lib/utils/errorCodes.js +19 -0
- package/lib/utils/errorCodes.js.map +1 -0
- package/lib/utils/fixNames.d.ts +14 -0
- package/lib/utils/fixNames.d.ts.map +1 -0
- package/lib/utils/fixNames.js +21 -0
- package/lib/utils/fixNames.js.map +1 -0
- package/lib/utils/modules-resolver.d.ts +2 -0
- package/lib/utils/modules-resolver.d.ts.map +1 -0
- package/lib/{modules-resolver.js → utils/modules-resolver.js} +8 -22
- package/lib/utils/modules-resolver.js.map +1 -0
- package/lib/{modules-resolver.spec.d.ts → utils/modules-resolver.spec.d.ts} +0 -0
- package/lib/utils/modules-resolver.spec.d.ts.map +1 -0
- package/lib/{modules-resolver.spec.js → utils/modules-resolver.spec.js} +9 -9
- package/lib/utils/modules-resolver.spec.js.map +1 -0
- package/lib/utils/typeConverters.d.ts +11 -0
- package/lib/utils/typeConverters.d.ts.map +1 -0
- package/lib/utils/typeConverters.js +22 -0
- package/lib/utils/typeConverters.js.map +1 -0
- package/lib/utils/types.d.ts +41 -0
- package/lib/utils/types.d.ts.map +1 -0
- package/lib/utils/types.js +78 -0
- package/lib/utils/types.js.map +1 -0
- package/lib/utils/versionProvider.d.ts +30 -0
- package/lib/utils/versionProvider.d.ts.map +1 -0
- package/lib/utils/versionProvider.js +147 -0
- package/lib/utils/versionProvider.js.map +1 -0
- package/lib/utils.d.ts +0 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -8
- package/lib/utils.js.map +1 -1
- package/package.json +34 -17
- package/lib/modules-resolver.d.ts +0 -3
- package/lib/modules-resolver.d.ts.map +0 -1
- package/lib/modules-resolver.js.map +0 -1
- package/lib/modules-resolver.spec.d.ts.map +0 -1
- package/lib/modules-resolver.spec.js.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare class CodeActionKind {
|
|
2
|
+
readonly value: string;
|
|
3
|
+
private static readonly sep;
|
|
4
|
+
static readonly Empty: CodeActionKind;
|
|
5
|
+
static readonly QuickFix: CodeActionKind;
|
|
6
|
+
static readonly Refactor: CodeActionKind;
|
|
7
|
+
static readonly Source: CodeActionKind;
|
|
8
|
+
static readonly SourceAddMissingImportsTs: CodeActionKind;
|
|
9
|
+
static readonly SourceRemoveUnusedTs: CodeActionKind;
|
|
10
|
+
static readonly SourceOrganizeImports: CodeActionKind;
|
|
11
|
+
static readonly SourceOrganizeImportsTs: CodeActionKind;
|
|
12
|
+
static readonly SourceFixAll: CodeActionKind;
|
|
13
|
+
static readonly SourceFixAllTs: CodeActionKind;
|
|
14
|
+
constructor(value: string);
|
|
15
|
+
equals(other: CodeActionKind): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Checks if `other` is a sub-kind of this `CodeActionKind`.
|
|
18
|
+
*
|
|
19
|
+
* The kind `"refactor.extract"` for example contains `"refactor.extract"` and ``"refactor.extract.function"`,
|
|
20
|
+
* but not `"unicorn.refactor.extract"`, or `"refactor.extractAll"` or `refactor`.
|
|
21
|
+
*
|
|
22
|
+
* @param other Kind to check.
|
|
23
|
+
*/
|
|
24
|
+
contains(other: CodeActionKind): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Checks if this code action kind intersects `other`.
|
|
27
|
+
*
|
|
28
|
+
* The kind `"refactor.extract"` for example intersects `refactor`, `"refactor.extract"` and ``"refactor.extract.function"`,
|
|
29
|
+
* but not `"unicorn.refactor.extract"`, or `"refactor.extractAll"`.
|
|
30
|
+
*
|
|
31
|
+
* @param other Kind to check.
|
|
32
|
+
*/
|
|
33
|
+
intersects(other: CodeActionKind): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Create a new kind by appending a more specific selector to the current kind.
|
|
36
|
+
*
|
|
37
|
+
* Does not modify the current kind.
|
|
38
|
+
*/
|
|
39
|
+
append(part: string): CodeActionKind;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAOA,qBAAa,cAAc;aAeH,KAAK,EAAE,MAAM;IAdjC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAO;IAElC,gBAAuB,KAAK,iBAAgD;IAC5E,gBAAuB,QAAQ,iBAAmD;IAClF,gBAAuB,QAAQ,iBAAmD;IAClF,gBAAuB,MAAM,iBAAiD;IAC9E,gBAAuB,yBAAyB,iBAA0E;IAC1H,gBAAuB,oBAAoB,iBAA6D;IACxG,gBAAuB,qBAAqB,iBAAgE;IAC5G,gBAAuB,uBAAuB,iBAAqD;IACnG,gBAAuB,YAAY,iBAAuD;IAC1F,gBAAuB,cAAc,iBAA4C;gBAG7D,KAAK,EAAE,MAAM;IAG1B,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;IAI7C;;;;;;;OAOG;IACI,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;IAI/C;;;;;;;OAOG;IACI,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;IAIjD;;;;OAIG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc;CAG9C"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.CodeActionKind = void 0;
|
|
27
|
+
const lsp = __importStar(require("vscode-languageserver/node"));
|
|
28
|
+
class CodeActionKind {
|
|
29
|
+
constructor(value) {
|
|
30
|
+
this.value = value;
|
|
31
|
+
}
|
|
32
|
+
equals(other) {
|
|
33
|
+
return this.value === other.value;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Checks if `other` is a sub-kind of this `CodeActionKind`.
|
|
37
|
+
*
|
|
38
|
+
* The kind `"refactor.extract"` for example contains `"refactor.extract"` and ``"refactor.extract.function"`,
|
|
39
|
+
* but not `"unicorn.refactor.extract"`, or `"refactor.extractAll"` or `refactor`.
|
|
40
|
+
*
|
|
41
|
+
* @param other Kind to check.
|
|
42
|
+
*/
|
|
43
|
+
contains(other) {
|
|
44
|
+
return this.equals(other) || this.value === '' || other.value.startsWith(this.value + CodeActionKind.sep);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Checks if this code action kind intersects `other`.
|
|
48
|
+
*
|
|
49
|
+
* The kind `"refactor.extract"` for example intersects `refactor`, `"refactor.extract"` and ``"refactor.extract.function"`,
|
|
50
|
+
* but not `"unicorn.refactor.extract"`, or `"refactor.extractAll"`.
|
|
51
|
+
*
|
|
52
|
+
* @param other Kind to check.
|
|
53
|
+
*/
|
|
54
|
+
intersects(other) {
|
|
55
|
+
return this.contains(other) || other.contains(this);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create a new kind by appending a more specific selector to the current kind.
|
|
59
|
+
*
|
|
60
|
+
* Does not modify the current kind.
|
|
61
|
+
*/
|
|
62
|
+
append(part) {
|
|
63
|
+
return new CodeActionKind(this.value + CodeActionKind.sep + part);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.CodeActionKind = CodeActionKind;
|
|
67
|
+
CodeActionKind.sep = '.';
|
|
68
|
+
CodeActionKind.Empty = new CodeActionKind(lsp.CodeActionKind.Empty);
|
|
69
|
+
CodeActionKind.QuickFix = new CodeActionKind(lsp.CodeActionKind.QuickFix);
|
|
70
|
+
CodeActionKind.Refactor = new CodeActionKind(lsp.CodeActionKind.Refactor);
|
|
71
|
+
CodeActionKind.Source = new CodeActionKind(lsp.CodeActionKind.Source);
|
|
72
|
+
CodeActionKind.SourceAddMissingImportsTs = CodeActionKind.Source.append('SourceAddMissingImportsTs').append('ts');
|
|
73
|
+
CodeActionKind.SourceRemoveUnusedTs = CodeActionKind.Source.append('removeUnused').append('ts');
|
|
74
|
+
CodeActionKind.SourceOrganizeImports = new CodeActionKind(lsp.CodeActionKind.SourceOrganizeImports);
|
|
75
|
+
CodeActionKind.SourceOrganizeImportsTs = CodeActionKind.SourceOrganizeImports.append('ts');
|
|
76
|
+
CodeActionKind.SourceFixAll = new CodeActionKind(lsp.CodeActionKind.SourceFixAll);
|
|
77
|
+
CodeActionKind.SourceFixAllTs = CodeActionKind.SourceFixAll.append('ts');
|
|
78
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;;;;;;;;;;;;;;;;;AAEhG,gEAAkD;AAElD,MAAa,cAAc;IAcvB,YACoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAC7B,CAAC;IAEE,MAAM,CAAC,KAAqB;QAC/B,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACtC,CAAC;IAED;;;;;;;OAOG;IACI,QAAQ,CAAC,KAAqB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAC9G,CAAC;IAED;;;;;;;OAOG;IACI,UAAU,CAAC,KAAqB;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,K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"bundled",
|
|
5
|
+
UserSetting = "user-setting",
|
|
6
|
+
Workspace = "workspace"
|
|
7
|
+
}
|
|
8
|
+
export declare class TypeScriptVersion {
|
|
9
|
+
readonly source: TypeScriptVersionSource;
|
|
10
|
+
readonly path: string;
|
|
11
|
+
private readonly _pathLabel?;
|
|
12
|
+
private _api;
|
|
13
|
+
constructor(source: TypeScriptVersionSource, path: string, _pathLabel?: string | undefined);
|
|
14
|
+
get tscPath(): string;
|
|
15
|
+
get tsServerPath(): string;
|
|
16
|
+
get pathLabel(): string;
|
|
17
|
+
get isValid(): boolean;
|
|
18
|
+
get version(): API | null;
|
|
19
|
+
get versionString(): string | null;
|
|
20
|
+
private getTypeScriptVersion;
|
|
21
|
+
}
|
|
22
|
+
export declare const MODULE_FOLDERS: string[];
|
|
23
|
+
export declare class TypeScriptVersionProvider {
|
|
24
|
+
private configuration?;
|
|
25
|
+
constructor(configuration?: IServerOptions | undefined);
|
|
26
|
+
getUserSettingVersion(): TypeScriptVersion | null;
|
|
27
|
+
getWorkspaceVersion(workspaceFolders: string[]): TypeScriptVersion | null;
|
|
28
|
+
bundledVersion(): TypeScriptVersion | null;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=versionProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionProvider.d.ts","sourceRoot":"","sources":["../../src/utils/versionProvider.ts"],"names":[],"mappings":"AAQA,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,0BAAkB,uBAAuB;IACrC,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,SAAS,cAAc;CAC1B;AAED,qBAAa,iBAAiB;aAGN,MAAM,EAAE,uBAAuB;aAC/B,IAAI,EAAE,MAAM;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;IAJhC,OAAO,CAAC,IAAI,CAAyB;gBAEjB,MAAM,EAAE,uBAAuB,EAC/B,IAAI,EAAE,MAAM,EACX,UAAU,CAAC,oBAAQ;IAKxC,IAAW,OAAO,IAAI,MAAM,CAE3B;IAED,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,IAAW,SAAS,IAAI,MAAM,CAE7B;IAED,IAAW,OAAO,IAAI,OAAO,CAE5B;IAED,IAAW,OAAO,IAAI,GAAG,GAAG,IAAI,CAM/B;IAED,IAAW,aAAa,IAAI,MAAM,GAAG,IAAI,CAGxC;IAED,OAAO,CAAC,oBAAoB;CAkC/B;AAED,eAAO,MAAM,cAAc,UAAgG,CAAC;AAE5H,qBAAa,yBAAyB;IACf,OAAO,CAAC,aAAa,CAAC;gBAAd,aAAa,CAAC,4BAAgB;IAElD,qBAAqB,IAAI,iBAAiB,GAAG,IAAI;IAsCjD,mBAAmB,CAAC,gBAAgB,EAAE,MAAM,EAAE,GAAG,iBAAiB,GAAG,IAAI;IAazE,cAAc,IAAI,iBAAiB,GAAG,IAAI;CAapD"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TypeScriptVersionProvider = exports.MODULE_FOLDERS = exports.TypeScriptVersion = void 0;
|
|
7
|
+
/*---------------------------------------------------------------------------------------------
|
|
8
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
const fs_1 = __importDefault(require("fs"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const which_1 = __importDefault(require("which"));
|
|
14
|
+
const pkg_up_1 = __importDefault(require("pkg-up"));
|
|
15
|
+
const api_1 = __importDefault(require("./api"));
|
|
16
|
+
const modules_resolver_1 = require("./modules-resolver");
|
|
17
|
+
class TypeScriptVersion {
|
|
18
|
+
constructor(source, path, _pathLabel) {
|
|
19
|
+
this.source = source;
|
|
20
|
+
this.path = path;
|
|
21
|
+
this._pathLabel = _pathLabel;
|
|
22
|
+
this._api = null;
|
|
23
|
+
}
|
|
24
|
+
get tscPath() {
|
|
25
|
+
return path_1.default.resolve(this.path, '../bin/tsc');
|
|
26
|
+
}
|
|
27
|
+
get tsServerPath() {
|
|
28
|
+
return path_1.default.resolve(this.path, 'tsserver.js');
|
|
29
|
+
}
|
|
30
|
+
get pathLabel() {
|
|
31
|
+
return typeof this._pathLabel === 'undefined' ? this.path : this._pathLabel;
|
|
32
|
+
}
|
|
33
|
+
get isValid() {
|
|
34
|
+
return this.version !== null;
|
|
35
|
+
}
|
|
36
|
+
get version() {
|
|
37
|
+
if (this._api) {
|
|
38
|
+
return this._api;
|
|
39
|
+
}
|
|
40
|
+
this._api = this.getTypeScriptVersion(this.tsServerPath);
|
|
41
|
+
return this._api;
|
|
42
|
+
}
|
|
43
|
+
get versionString() {
|
|
44
|
+
const version = this.version;
|
|
45
|
+
return version ? version.displayName : null;
|
|
46
|
+
}
|
|
47
|
+
getTypeScriptVersion(serverPath) {
|
|
48
|
+
if (!fs_1.default.existsSync(serverPath)) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const p = serverPath.split(path_1.default.sep);
|
|
52
|
+
if (p.length <= 2) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const p2 = p.slice(0, -2);
|
|
56
|
+
const modulePath = p2.join(path_1.default.sep);
|
|
57
|
+
let fileName = path_1.default.join(modulePath, 'package.json');
|
|
58
|
+
if (!fs_1.default.existsSync(fileName)) {
|
|
59
|
+
// Special case for ts dev versions
|
|
60
|
+
if (path_1.default.basename(modulePath) === 'built') {
|
|
61
|
+
fileName = path_1.default.join(modulePath, '..', 'package.json');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (!fs_1.default.existsSync(fileName)) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
const contents = fs_1.default.readFileSync(fileName).toString();
|
|
68
|
+
let desc = null;
|
|
69
|
+
try {
|
|
70
|
+
desc = JSON.parse(contents);
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
if (!desc || !desc.version) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
return desc.version ? api_1.default.fromVersionString(desc.version) : null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.TypeScriptVersion = TypeScriptVersion;
|
|
82
|
+
exports.MODULE_FOLDERS = ['node_modules/typescript/lib', '.vscode/pnpify/typescript/lib', '.yarn/sdks/typescript/lib'];
|
|
83
|
+
class TypeScriptVersionProvider {
|
|
84
|
+
constructor(configuration) {
|
|
85
|
+
this.configuration = configuration;
|
|
86
|
+
}
|
|
87
|
+
getUserSettingVersion() {
|
|
88
|
+
const { tsserverPath } = this.configuration || {};
|
|
89
|
+
if (!tsserverPath) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
let resolvedPath = tsserverPath;
|
|
93
|
+
// Resolve full path to the binary if path is not absolute.
|
|
94
|
+
if (!path_1.default.isAbsolute(resolvedPath)) {
|
|
95
|
+
const binaryPath = which_1.default.sync(tsserverPath, { nothrow: true });
|
|
96
|
+
if (binaryPath) {
|
|
97
|
+
resolvedPath = binaryPath;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// Resolve symbolic link.
|
|
101
|
+
let stat = fs_1.default.lstatSync(resolvedPath, { throwIfNoEntry: false });
|
|
102
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isSymbolicLink()) {
|
|
103
|
+
resolvedPath = fs_1.default.realpathSync(resolvedPath);
|
|
104
|
+
}
|
|
105
|
+
// Get directory path
|
|
106
|
+
stat = fs_1.default.lstatSync(resolvedPath, { throwIfNoEntry: false });
|
|
107
|
+
if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
|
|
108
|
+
resolvedPath = path_1.default.dirname(resolvedPath);
|
|
109
|
+
}
|
|
110
|
+
// Resolve path to the "lib" dir.
|
|
111
|
+
try {
|
|
112
|
+
const packageJsonPath = pkg_up_1.default.sync({ cwd: resolvedPath });
|
|
113
|
+
if (packageJsonPath) {
|
|
114
|
+
resolvedPath = path_1.default.join(path_1.default.dirname(packageJsonPath), 'lib');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (_a) {
|
|
118
|
+
// ignore
|
|
119
|
+
}
|
|
120
|
+
return new TypeScriptVersion("user-setting" /* UserSetting */, resolvedPath);
|
|
121
|
+
}
|
|
122
|
+
getWorkspaceVersion(workspaceFolders) {
|
|
123
|
+
for (const p of workspaceFolders) {
|
|
124
|
+
const libFolder = (0, modules_resolver_1.findPathToModule)(p, exports.MODULE_FOLDERS);
|
|
125
|
+
if (libFolder) {
|
|
126
|
+
const version = new TypeScriptVersion("workspace" /* Workspace */, libFolder);
|
|
127
|
+
if (version.isValid) {
|
|
128
|
+
return version;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
bundledVersion() {
|
|
135
|
+
try {
|
|
136
|
+
const file = require.resolve('typescript');
|
|
137
|
+
const bundledVersion = new TypeScriptVersion("bundled" /* Bundled */, path_1.default.dirname(file), '');
|
|
138
|
+
return bundledVersion;
|
|
139
|
+
}
|
|
140
|
+
catch (e) {
|
|
141
|
+
// window.showMessage('Bundled typescript module not found', 'error');
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.TypeScriptVersionProvider = TypeScriptVersionProvider;
|
|
147
|
+
//# sourceMappingURL=versionProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionProvider.js","sourceRoot":"","sources":["../../src/utils/versionProvider.ts"],"names":[],"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KAAK,IAAI,CAAC;IAEhC,OAAO,aAGJ;CACN
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,qBAAa,QAAQ,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAEhC,OAAO,aAGJ;CACN"}
|
package/lib/utils.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.Deferred = void 0;
|
|
10
10
|
class Deferred {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.promise = new Promise((resolve, reject) => {
|
|
@@ -16,11 +16,4 @@ class Deferred {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.Deferred = Deferred;
|
|
19
|
-
function getTsserverExecutable() {
|
|
20
|
-
return isWindows() ? 'tsserver.cmd' : 'tsserver';
|
|
21
|
-
}
|
|
22
|
-
exports.getTsserverExecutable = getTsserverExecutable;
|
|
23
|
-
function isWindows() {
|
|
24
|
-
return /^win/.test(process.platform);
|
|
25
|
-
}
|
|
26
19
|
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,MAAa,QAAQ;IAArB;QAII,YAAO,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACzB,CAAC,CAAC,CAAC;IACP,CAAC;CAAA;AARD,4BAQC
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,MAAa,QAAQ;IAArB;QAII,YAAO,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACzB,CAAC,CAAC,CAAC;IACP,CAAC;CAAA;AARD,4BAQC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript-language-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Language Server Protocol (LSP) implementation for TypeScript using tsserver",
|
|
5
5
|
"author": "TypeFox and others",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=12"
|
|
9
|
+
},
|
|
7
10
|
"eslintIgnore": [
|
|
8
11
|
"!.eslintrc.js"
|
|
9
12
|
],
|
|
@@ -17,40 +20,54 @@
|
|
|
17
20
|
"bin": {
|
|
18
21
|
"typescript-language-server": "./lib/cli.js"
|
|
19
22
|
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"clean": "rimraf lib *.tsbuildinfo",
|
|
25
|
+
"test": "cross-env TS_NODE_PROJECT=./tsconfig.json mocha --exit --watch-files \"./src/**/*.ts\" --reporter spec \"./src/**/*.spec.ts\" --require source-map-support/register --require ts-node/register",
|
|
26
|
+
"test:watch": "cross-env TS_NODE_PROJECT=./tsconfig.json mocha --exit --watch-files \"./src/**/*.ts\" --reporter spec \"./src/**/*.spec.ts\" --require source-map-support/register --require ts-node/register --watch",
|
|
27
|
+
"test:compiled": "mocha --exit --reporter spec \"./lib/**/*.spec.js\"",
|
|
28
|
+
"lint": "eslint --ext \".js,.ts\" src",
|
|
29
|
+
"build": "concurrently -n compile,lint -c blue,green \"yarn compile\" \"yarn lint\"",
|
|
30
|
+
"compile": "tsc -b",
|
|
31
|
+
"watch": "tsc -b --watch --verbose",
|
|
32
|
+
"postversion": "git push --follow-tags",
|
|
33
|
+
"prepare": "cd test-data/jsx && yarn"
|
|
34
|
+
},
|
|
35
|
+
"husky": {
|
|
36
|
+
"hooks": {
|
|
37
|
+
"pre-commit": "yarn lint && yarn build && yarn test:compiled",
|
|
38
|
+
"post-merge": "yarn"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
20
41
|
"dependencies": {
|
|
21
|
-
"
|
|
22
|
-
"commander": "^7.2.0",
|
|
42
|
+
"commander": "^8.3.0",
|
|
23
43
|
"fs-extra": "^10.0.0",
|
|
24
44
|
"p-debounce": "^2.1.0",
|
|
45
|
+
"pkg-up": "^3.1.0",
|
|
25
46
|
"semver": "^7.3.5",
|
|
26
47
|
"tempy": "^1.0.1",
|
|
27
48
|
"vscode-languageserver": "^7.0.0",
|
|
28
49
|
"vscode-languageserver-protocol": "^3.16.0",
|
|
29
50
|
"vscode-languageserver-textdocument": "^1.0.1",
|
|
30
|
-
"vscode-uri": "^
|
|
31
|
-
|
|
32
|
-
"scripts": {
|
|
33
|
-
"clean": "rimraf lib *.tsbuildinfo",
|
|
34
|
-
"test": "mocha --exit --reporter spec \"./lib/**/*.spec.js\"",
|
|
35
|
-
"lint": "eslint --ext \".js,.ts\" src",
|
|
36
|
-
"build": "concurrently -n compile,lint -c blue,green \"yarn compile\" \"yarn lint\"",
|
|
37
|
-
"compile": "tsc -b",
|
|
38
|
-
"watch": "tsc -b --watch --verbose"
|
|
51
|
+
"vscode-uri": "^3.0.2",
|
|
52
|
+
"which": "^2.0.2"
|
|
39
53
|
},
|
|
40
54
|
"devDependencies": {
|
|
41
55
|
"@types/chai": "^4.2.19",
|
|
42
56
|
"@types/fs-extra": "^9.0.11",
|
|
43
57
|
"@types/mocha": "^9.0.0",
|
|
44
58
|
"@types/node": "^16.11.6",
|
|
45
|
-
"@
|
|
46
|
-
"@typescript-eslint/
|
|
59
|
+
"@types/which": "^2.0.1",
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
|
61
|
+
"@typescript-eslint/parser": "^5.3.1",
|
|
47
62
|
"chai": "^4.3.4",
|
|
48
|
-
"concurrently": "^
|
|
49
|
-
"
|
|
63
|
+
"concurrently": "^7.0.0",
|
|
64
|
+
"cross-env": "^7.0.3",
|
|
65
|
+
"eslint": "^8.2.0",
|
|
66
|
+
"husky": "4.x.x",
|
|
50
67
|
"mocha": "^9.0.1",
|
|
51
68
|
"rimraf": "^3.0.2",
|
|
52
69
|
"source-map-support": "^0.5.19",
|
|
53
|
-
"ts-node": "
|
|
70
|
+
"ts-node": "^10.4.0",
|
|
54
71
|
"typescript": "^4.4.3"
|
|
55
72
|
}
|
|
56
73
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules-resolver.d.ts","sourceRoot":"","sources":["../src/modules-resolver.ts"],"names":[],"mappings":"AASA,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAC,SAAS,CAMlF;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYrF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules-resolver.js","sourceRoot":"","sources":["../src/modules-resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,uCAAyB;AACzB,2CAA6B;AAE7B,SAAgB,gBAAgB,CAAC,GAAW,EAAE,UAAkB;IAC5D,IAAI;QACA,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KACxD;IAAC,WAAM;QACJ,OAAO,SAAS,CAAC;KACpB;AACL,CAAC;AAND,4CAMC;AAED,SAAgB,iBAAiB,CAAC,GAAW,EAAE,UAAkB;IAC7D,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACjE,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC1B,OAAO,SAAS,CAAC;SACpB;KACJ;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACvC,IAAI,MAAM,KAAK,GAAG,EAAE;QAChB,OAAO,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KAChD;AACL,CAAC;AAZD,8CAYC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules-resolver.spec.d.ts","sourceRoot":"","sources":["../src/modules-resolver.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules-resolver.spec.js","sourceRoot":"","sources":["../src/modules-resolver.spec.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAC7B,2CAA6B;AAC7B,yDAAsD;AAEtD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACnC,MAAM,YAAY,GAAG,IAAA,mCAAgB,EAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;QAC5E,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,yCAAyC,CAAC,EAAE,YAAY,CAAC,CAAC;IACxG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|