@angular/language-server 20.0.1 → 20.1.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/index.js +59 -7
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -17,6 +17,28 @@ var require_cmdline_utils = __commonJS({
|
|
|
17
17
|
}
|
|
18
18
|
return argv[index + 1];
|
|
19
19
|
}
|
|
20
|
+
function findArgumentWithDefault(argv, argName, defaultValue) {
|
|
21
|
+
const index = argv.indexOf(argName);
|
|
22
|
+
if (index < 0) {
|
|
23
|
+
return defaultValue;
|
|
24
|
+
}
|
|
25
|
+
if (index === argv.length - 1) {
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
const argValue = argv[index + 1];
|
|
29
|
+
if (argValue.startsWith("-")) {
|
|
30
|
+
return void 0;
|
|
31
|
+
} else {
|
|
32
|
+
return argValue;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function parseBooleanArgument(argv, argName) {
|
|
36
|
+
const argValue = findArgumentWithDefault(argv, argName, "true");
|
|
37
|
+
if (argValue === void 0 || argValue === "true") {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
20
42
|
function parseStringArray(argv, argName) {
|
|
21
43
|
const arg = findArgument(argv, argName);
|
|
22
44
|
if (!arg) {
|
|
@@ -39,6 +61,7 @@ var require_cmdline_utils = __commonJS({
|
|
|
39
61
|
tsdk: (_a = findArgument(argv, "--tsdk")) !== null && _a !== void 0 ? _a : null,
|
|
40
62
|
includeAutomaticOptionalChainCompletions: hasArgument(argv, "--includeAutomaticOptionalChainCompletions"),
|
|
41
63
|
includeCompletionsWithSnippetText: hasArgument(argv, "--includeCompletionsWithSnippetText"),
|
|
64
|
+
includeCompletionsForModuleExports: parseBooleanArgument(argv, "--includeCompletionsForModuleExports"),
|
|
42
65
|
forceStrictTemplates: hasArgument(argv, "--forceStrictTemplates"),
|
|
43
66
|
disableBlockSyntax: hasArgument(argv, "--disableBlockSyntax"),
|
|
44
67
|
disableLetSyntax: hasArgument(argv, "--disableLetSyntax"),
|
|
@@ -396,6 +419,28 @@ var require_cmdline_utils = __commonJS({
|
|
|
396
419
|
}
|
|
397
420
|
return argv[index + 1];
|
|
398
421
|
}
|
|
422
|
+
function findArgumentWithDefault(argv, argName, defaultValue) {
|
|
423
|
+
const index = argv.indexOf(argName);
|
|
424
|
+
if (index < 0) {
|
|
425
|
+
return defaultValue;
|
|
426
|
+
}
|
|
427
|
+
if (index === argv.length - 1) {
|
|
428
|
+
return void 0;
|
|
429
|
+
}
|
|
430
|
+
const argValue = argv[index + 1];
|
|
431
|
+
if (argValue.startsWith("-")) {
|
|
432
|
+
return void 0;
|
|
433
|
+
} else {
|
|
434
|
+
return argValue;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
function parseBooleanArgument(argv, argName) {
|
|
438
|
+
const argValue = findArgumentWithDefault(argv, argName, "true");
|
|
439
|
+
if (argValue === void 0 || argValue === "true") {
|
|
440
|
+
return true;
|
|
441
|
+
}
|
|
442
|
+
return false;
|
|
443
|
+
}
|
|
399
444
|
function parseStringArray(argv, argName) {
|
|
400
445
|
const arg = findArgument(argv, argName);
|
|
401
446
|
if (!arg) {
|
|
@@ -418,6 +463,7 @@ var require_cmdline_utils = __commonJS({
|
|
|
418
463
|
tsdk: (_a = findArgument(argv, "--tsdk")) !== null && _a !== void 0 ? _a : null,
|
|
419
464
|
includeAutomaticOptionalChainCompletions: hasArgument(argv, "--includeAutomaticOptionalChainCompletions"),
|
|
420
465
|
includeCompletionsWithSnippetText: hasArgument(argv, "--includeCompletionsWithSnippetText"),
|
|
466
|
+
includeCompletionsForModuleExports: parseBooleanArgument(argv, "--includeCompletionsForModuleExports"),
|
|
421
467
|
forceStrictTemplates: hasArgument(argv, "--forceStrictTemplates"),
|
|
422
468
|
disableBlockSyntax: hasArgument(argv, "--disableBlockSyntax"),
|
|
423
469
|
disableLetSyntax: hasArgument(argv, "--disableLetSyntax"),
|
|
@@ -771,9 +817,9 @@ var require_server_host = __commonJS({
|
|
|
771
817
|
}
|
|
772
818
|
});
|
|
773
819
|
|
|
774
|
-
// ../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@angular+language-service@registry.npmjs.org+@angular+language-service@20.
|
|
820
|
+
// ../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@angular+language-service@registry.npmjs.org+@angular+language-service@20.1.0-rc.0/node_modules/@angular/language-service/api_bundle.js
|
|
775
821
|
var require_api_bundle = __commonJS({
|
|
776
|
-
"../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@angular+language-service@registry.npmjs.org+@angular+language-service@20.
|
|
822
|
+
"../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@angular+language-service@registry.npmjs.org+@angular+language-service@20.1.0-rc.0/node_modules/@angular/language-service/api_bundle.js"(exports2, module2) {
|
|
777
823
|
var __defProp2 = Object.defineProperty;
|
|
778
824
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
779
825
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
@@ -3461,7 +3507,8 @@ var require_completion = __commonJS({
|
|
|
3461
3507
|
item.data = {
|
|
3462
3508
|
kind: "ngCompletionOriginData",
|
|
3463
3509
|
filePath: scriptInfo.fileName,
|
|
3464
|
-
position
|
|
3510
|
+
position,
|
|
3511
|
+
tsData: entry.data
|
|
3465
3512
|
};
|
|
3466
3513
|
return item;
|
|
3467
3514
|
}
|
|
@@ -217742,8 +217789,10 @@ var require_session = __commonJS({
|
|
|
217742
217789
|
this.clientCapabilities = {};
|
|
217743
217790
|
this.includeAutomaticOptionalChainCompletions = options2.includeAutomaticOptionalChainCompletions;
|
|
217744
217791
|
this.includeCompletionsWithSnippetText = options2.includeCompletionsWithSnippetText;
|
|
217792
|
+
this.includeCompletionsForModuleExports = options2.includeCompletionsForModuleExports;
|
|
217745
217793
|
this.logger = options2.logger;
|
|
217746
217794
|
this.logToConsole = options2.logToConsole;
|
|
217795
|
+
defaultPreferences = Object.assign(Object.assign({}, defaultPreferences), { includeCompletionsForModuleExports: options2.includeCompletionsForModuleExports });
|
|
217747
217796
|
this.connection = lsp.createConnection({
|
|
217748
217797
|
// cancelUndispatched is a "middleware" to handle all cancellation requests.
|
|
217749
217798
|
// LSP spec requires every request to send a response back, even if it is
|
|
@@ -217800,7 +217849,8 @@ var require_session = __commonJS({
|
|
|
217800
217849
|
preferences: {
|
|
217801
217850
|
// We don't want the AutoImportProvider projects to be created. See
|
|
217802
217851
|
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#smarter-auto-imports
|
|
217803
|
-
includePackageJsonAutoImports: "off"
|
|
217852
|
+
includePackageJsonAutoImports: "off",
|
|
217853
|
+
includeCompletionsForModuleExports: this.includeCompletionsForModuleExports
|
|
217804
217854
|
},
|
|
217805
217855
|
watchOptions: {
|
|
217806
217856
|
// Used as watch options when not specified by user's `tsconfig`.
|
|
@@ -218681,11 +218731,12 @@ var require_session = __commonJS({
|
|
|
218681
218731
|
const offset = (0, utils_1.lspPositionToTsPosition)(scriptInfo, params.position);
|
|
218682
218732
|
let options2 = {};
|
|
218683
218733
|
const includeCompletionsWithSnippetText = this.includeCompletionsWithSnippetText && this.snippetSupport;
|
|
218684
|
-
if (this.includeAutomaticOptionalChainCompletions || includeCompletionsWithSnippetText) {
|
|
218734
|
+
if (this.includeAutomaticOptionalChainCompletions || includeCompletionsWithSnippetText || this.includeCompletionsForModuleExports) {
|
|
218685
218735
|
options2 = {
|
|
218686
218736
|
includeAutomaticOptionalChainCompletions: this.includeAutomaticOptionalChainCompletions,
|
|
218687
218737
|
includeCompletionsWithSnippetText,
|
|
218688
|
-
includeCompletionsWithInsertText: this.includeAutomaticOptionalChainCompletions || includeCompletionsWithSnippetText
|
|
218738
|
+
includeCompletionsWithInsertText: this.includeAutomaticOptionalChainCompletions || includeCompletionsWithSnippetText,
|
|
218739
|
+
includeCompletionsForModuleExports: this.includeCompletionsForModuleExports
|
|
218689
218740
|
};
|
|
218690
218741
|
}
|
|
218691
218742
|
const completions = languageService.getCompletionsAtPosition(scriptInfo.fileName, offset, options2);
|
|
@@ -218707,7 +218758,7 @@ var require_session = __commonJS({
|
|
|
218707
218758
|
}
|
|
218708
218759
|
const { languageService, scriptInfo } = lsInfo;
|
|
218709
218760
|
const offset = (0, utils_1.lspPositionToTsPosition)(scriptInfo, position);
|
|
218710
|
-
const details = languageService.getCompletionEntryDetails(filePath, offset, (_a = item.insertText) !== null && _a !== void 0 ? _a : item.label, void 0, void 0,
|
|
218761
|
+
const details = languageService.getCompletionEntryDetails(filePath, offset, (_a = item.insertText) !== null && _a !== void 0 ? _a : item.label, void 0, void 0, defaultPreferences, data.tsData);
|
|
218711
218762
|
if (details === void 0) {
|
|
218712
218763
|
return item;
|
|
218713
218764
|
}
|
|
@@ -219121,6 +219172,7 @@ function main() {
|
|
|
219121
219172
|
logToConsole: options.logToConsole,
|
|
219122
219173
|
includeAutomaticOptionalChainCompletions: options.includeAutomaticOptionalChainCompletions,
|
|
219123
219174
|
includeCompletionsWithSnippetText: options.includeCompletionsWithSnippetText,
|
|
219175
|
+
includeCompletionsForModuleExports: options.includeCompletionsForModuleExports,
|
|
219124
219176
|
forceStrictTemplates: isG3 || options.forceStrictTemplates,
|
|
219125
219177
|
disableBlockSyntax: options.disableBlockSyntax,
|
|
219126
219178
|
disableLetSyntax: options.disableLetSyntax,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/language-server",
|
|
3
3
|
"description": "LSP server for Angular Language Service",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.1.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/angular/vscode-ng-language-service.git"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"ngserver": "./bin/ngserver"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@angular/language-service": "20.
|
|
18
|
+
"@angular/language-service": "20.1.0-rc.0",
|
|
19
19
|
"vscode-html-languageservice": "^4.2.5",
|
|
20
20
|
"vscode-jsonrpc": "6.0.0",
|
|
21
21
|
"vscode-languageserver": "7.0.0",
|