@angular/language-server 18.0.0 → 18.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 +72 -29
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -41,6 +41,7 @@ var require_cmdline_utils = __commonJS({
|
|
|
41
41
|
includeCompletionsWithSnippetText: hasArgument(argv, "--includeCompletionsWithSnippetText"),
|
|
42
42
|
forceStrictTemplates: hasArgument(argv, "--forceStrictTemplates"),
|
|
43
43
|
disableBlockSyntax: hasArgument(argv, "--disableBlockSyntax"),
|
|
44
|
+
disableLetSyntax: hasArgument(argv, "--disableLetSyntax"),
|
|
44
45
|
angularCoreVersion: findArgument(argv, "--angularCoreVersion")
|
|
45
46
|
};
|
|
46
47
|
}
|
|
@@ -417,6 +418,7 @@ var require_cmdline_utils = __commonJS({
|
|
|
417
418
|
includeCompletionsWithSnippetText: hasArgument(argv, "--includeCompletionsWithSnippetText"),
|
|
418
419
|
forceStrictTemplates: hasArgument(argv, "--forceStrictTemplates"),
|
|
419
420
|
disableBlockSyntax: hasArgument(argv, "--disableBlockSyntax"),
|
|
421
|
+
disableLetSyntax: hasArgument(argv, "--disableLetSyntax"),
|
|
420
422
|
angularCoreVersion: findArgument(argv, "--angularCoreVersion")
|
|
421
423
|
};
|
|
422
424
|
}
|
|
@@ -765,9 +767,9 @@ var require_server_host = __commonJS({
|
|
|
765
767
|
}
|
|
766
768
|
});
|
|
767
769
|
|
|
768
|
-
// ../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@angular+language-service@registry.npmjs.org+@angular+language-service@18.0.0/node_modules/@angular/language-service/api_bundle.js
|
|
770
|
+
// ../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@angular+language-service@registry.npmjs.org+@angular+language-service@18.1.0-rc.0/node_modules/@angular/language-service/api_bundle.js
|
|
769
771
|
var require_api_bundle = __commonJS({
|
|
770
|
-
"../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@angular+language-service@registry.npmjs.org+@angular+language-service@18.0.0/node_modules/@angular/language-service/api_bundle.js"(exports2, module2) {
|
|
772
|
+
"../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/@angular+language-service@registry.npmjs.org+@angular+language-service@18.1.0-rc.0/node_modules/@angular/language-service/api_bundle.js"(exports2, module2) {
|
|
771
773
|
var __defProp2 = Object.defineProperty;
|
|
772
774
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
773
775
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
@@ -3541,9 +3543,9 @@ var require_diagnostic = __commonJS({
|
|
|
3541
3543
|
}
|
|
3542
3544
|
});
|
|
3543
3545
|
|
|
3544
|
-
// ../../../../../../../../../../../../../Users/
|
|
3546
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/base64.js
|
|
3545
3547
|
var require_base64 = __commonJS({
|
|
3546
|
-
"../../../../../../../../../../../../../Users/
|
|
3548
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/base64.js"(exports2) {
|
|
3547
3549
|
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
3548
3550
|
exports2.encode = function(number) {
|
|
3549
3551
|
if (0 <= number && number < intToCharMap.length) {
|
|
@@ -3582,9 +3584,9 @@ var require_base64 = __commonJS({
|
|
|
3582
3584
|
}
|
|
3583
3585
|
});
|
|
3584
3586
|
|
|
3585
|
-
// ../../../../../../../../../../../../../Users/
|
|
3587
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/base64-vlq.js
|
|
3586
3588
|
var require_base64_vlq = __commonJS({
|
|
3587
|
-
"../../../../../../../../../../../../../Users/
|
|
3589
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/base64-vlq.js"(exports2) {
|
|
3588
3590
|
var base64 = require_base64();
|
|
3589
3591
|
var VLQ_BASE_SHIFT = 5;
|
|
3590
3592
|
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
@@ -3636,9 +3638,9 @@ var require_base64_vlq = __commonJS({
|
|
|
3636
3638
|
}
|
|
3637
3639
|
});
|
|
3638
3640
|
|
|
3639
|
-
// ../../../../../../../../../../../../../Users/
|
|
3641
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/util.js
|
|
3640
3642
|
var require_util = __commonJS({
|
|
3641
|
-
"../../../../../../../../../../../../../Users/
|
|
3643
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/util.js"(exports2) {
|
|
3642
3644
|
function getArg(aArgs, aName, aDefaultValue) {
|
|
3643
3645
|
if (aName in aArgs) {
|
|
3644
3646
|
return aArgs[aName];
|
|
@@ -3937,9 +3939,9 @@ var require_util = __commonJS({
|
|
|
3937
3939
|
}
|
|
3938
3940
|
});
|
|
3939
3941
|
|
|
3940
|
-
// ../../../../../../../../../../../../../Users/
|
|
3942
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/array-set.js
|
|
3941
3943
|
var require_array_set = __commonJS({
|
|
3942
|
-
"../../../../../../../../../../../../../Users/
|
|
3944
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/array-set.js"(exports2) {
|
|
3943
3945
|
var util = require_util();
|
|
3944
3946
|
var has = Object.prototype.hasOwnProperty;
|
|
3945
3947
|
var hasNativeMap = typeof Map !== "undefined";
|
|
@@ -4007,9 +4009,9 @@ var require_array_set = __commonJS({
|
|
|
4007
4009
|
}
|
|
4008
4010
|
});
|
|
4009
4011
|
|
|
4010
|
-
// ../../../../../../../../../../../../../Users/
|
|
4012
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/mapping-list.js
|
|
4011
4013
|
var require_mapping_list = __commonJS({
|
|
4012
|
-
"../../../../../../../../../../../../../Users/
|
|
4014
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/mapping-list.js"(exports2) {
|
|
4013
4015
|
var util = require_util();
|
|
4014
4016
|
function generatedPositionAfter(mappingA, mappingB) {
|
|
4015
4017
|
var lineA = mappingA.generatedLine;
|
|
@@ -4046,9 +4048,9 @@ var require_mapping_list = __commonJS({
|
|
|
4046
4048
|
}
|
|
4047
4049
|
});
|
|
4048
4050
|
|
|
4049
|
-
// ../../../../../../../../../../../../../Users/
|
|
4051
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/source-map-generator.js
|
|
4050
4052
|
var require_source_map_generator = __commonJS({
|
|
4051
|
-
"../../../../../../../../../../../../../Users/
|
|
4053
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/source-map-generator.js"(exports2) {
|
|
4052
4054
|
var base64VLQ = require_base64_vlq();
|
|
4053
4055
|
var util = require_util();
|
|
4054
4056
|
var ArraySet = require_array_set().ArraySet;
|
|
@@ -4322,9 +4324,9 @@ var require_source_map_generator = __commonJS({
|
|
|
4322
4324
|
}
|
|
4323
4325
|
});
|
|
4324
4326
|
|
|
4325
|
-
// ../../../../../../../../../../../../../Users/
|
|
4327
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/binary-search.js
|
|
4326
4328
|
var require_binary_search = __commonJS({
|
|
4327
|
-
"../../../../../../../../../../../../../Users/
|
|
4329
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/binary-search.js"(exports2) {
|
|
4328
4330
|
exports2.GREATEST_LOWER_BOUND = 1;
|
|
4329
4331
|
exports2.LEAST_UPPER_BOUND = 2;
|
|
4330
4332
|
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
@@ -4378,9 +4380,9 @@ var require_binary_search = __commonJS({
|
|
|
4378
4380
|
}
|
|
4379
4381
|
});
|
|
4380
4382
|
|
|
4381
|
-
// ../../../../../../../../../../../../../Users/
|
|
4383
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/quick-sort.js
|
|
4382
4384
|
var require_quick_sort = __commonJS({
|
|
4383
|
-
"../../../../../../../../../../../../../Users/
|
|
4385
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/quick-sort.js"(exports2) {
|
|
4384
4386
|
function swap(ary, x, y) {
|
|
4385
4387
|
var temp = ary[x];
|
|
4386
4388
|
ary[x] = ary[y];
|
|
@@ -4413,9 +4415,9 @@ var require_quick_sort = __commonJS({
|
|
|
4413
4415
|
}
|
|
4414
4416
|
});
|
|
4415
4417
|
|
|
4416
|
-
// ../../../../../../../../../../../../../Users/
|
|
4418
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/source-map-consumer.js
|
|
4417
4419
|
var require_source_map_consumer = __commonJS({
|
|
4418
|
-
"../../../../../../../../../../../../../Users/
|
|
4420
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/source-map-consumer.js"(exports2) {
|
|
4419
4421
|
var util = require_util();
|
|
4420
4422
|
var binarySearch = require_binary_search();
|
|
4421
4423
|
var ArraySet = require_array_set().ArraySet;
|
|
@@ -5014,9 +5016,9 @@ var require_source_map_consumer = __commonJS({
|
|
|
5014
5016
|
}
|
|
5015
5017
|
});
|
|
5016
5018
|
|
|
5017
|
-
// ../../../../../../../../../../../../../Users/
|
|
5019
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/source-node.js
|
|
5018
5020
|
var require_source_node = __commonJS({
|
|
5019
|
-
"../../../../../../../../../../../../../Users/
|
|
5021
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/lib/source-node.js"(exports2) {
|
|
5020
5022
|
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
5021
5023
|
var util = require_util();
|
|
5022
5024
|
var REGEX_NEWLINE = /(\r?\n)/;
|
|
@@ -5280,18 +5282,18 @@ var require_source_node = __commonJS({
|
|
|
5280
5282
|
}
|
|
5281
5283
|
});
|
|
5282
5284
|
|
|
5283
|
-
// ../../../../../../../../../../../../../Users/
|
|
5285
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/source-map.js
|
|
5284
5286
|
var require_source_map = __commonJS({
|
|
5285
|
-
"../../../../../../../../../../../../../Users/
|
|
5287
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map/source-map.js"(exports2) {
|
|
5286
5288
|
exports2.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
5287
5289
|
exports2.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
5288
5290
|
exports2.SourceNode = require_source_node().SourceNode;
|
|
5289
5291
|
}
|
|
5290
5292
|
});
|
|
5291
5293
|
|
|
5292
|
-
// ../../../../../../../../../../../../../Users/
|
|
5294
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/buffer-from/index.js
|
|
5293
5295
|
var require_buffer_from = __commonJS({
|
|
5294
|
-
"../../../../../../../../../../../../../Users/
|
|
5296
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/buffer-from/index.js"(exports2, module2) {
|
|
5295
5297
|
var toString = Object.prototype.toString;
|
|
5296
5298
|
var isModern = typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
|
|
5297
5299
|
function isArrayBuffer(input) {
|
|
@@ -5338,9 +5340,9 @@ var require_buffer_from = __commonJS({
|
|
|
5338
5340
|
}
|
|
5339
5341
|
});
|
|
5340
5342
|
|
|
5341
|
-
// ../../../../../../../../../../../../../Users/
|
|
5343
|
+
// ../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map-support/source-map-support.js
|
|
5342
5344
|
var require_source_map_support = __commonJS({
|
|
5343
|
-
"../../../../../../../../../../../../../Users/
|
|
5345
|
+
"../../../../../../../../../../../../../Users/atscott/github/vscode-ng-language-service/node_modules/source-map-support/source-map-support.js"(exports2, module2) {
|
|
5344
5346
|
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
|
5345
5347
|
var path = require("path");
|
|
5346
5348
|
var fs;
|
|
@@ -209300,6 +209302,9 @@ var require_session = __commonJS({
|
|
|
209300
209302
|
if (options2.disableBlockSyntax) {
|
|
209301
209303
|
pluginConfig.enableBlockSyntax = false;
|
|
209302
209304
|
}
|
|
209305
|
+
if (options2.disableLetSyntax) {
|
|
209306
|
+
pluginConfig.enableLetSyntax = false;
|
|
209307
|
+
}
|
|
209303
209308
|
if (options2.angularCoreVersion !== null) {
|
|
209304
209309
|
pluginConfig.angularCoreVersion = options2.angularCoreVersion;
|
|
209305
209310
|
}
|
|
@@ -210133,7 +210138,8 @@ var require_session = __commonJS({
|
|
|
210133
210138
|
if (details === void 0) {
|
|
210134
210139
|
return item;
|
|
210135
210140
|
}
|
|
210136
|
-
const { kind, kindModifiers, displayParts, documentation, tags } = details;
|
|
210141
|
+
const { kind, kindModifiers, displayParts, documentation, tags, codeActions } = details;
|
|
210142
|
+
const codeActionsDetail = generateCommandAndTextEditsFromCodeActions(codeActions !== null && codeActions !== void 0 ? codeActions : [], filePath, (path) => this.projectService.getScriptInfo(path));
|
|
210137
210143
|
let desc = kindModifiers ? kindModifiers + " " : "";
|
|
210138
210144
|
if (displayParts && displayParts.length > 0) {
|
|
210139
210145
|
desc += displayParts.map((dp) => dp.text).join("");
|
|
@@ -210148,6 +210154,8 @@ var require_session = __commonJS({
|
|
|
210148
210154
|
return (_a2 = this.getLSAndScriptInfo(fileName)) === null || _a2 === void 0 ? void 0 : _a2.scriptInfo;
|
|
210149
210155
|
}).join("\n")
|
|
210150
210156
|
};
|
|
210157
|
+
item.additionalTextEdits = codeActionsDetail.additionalTextEdits;
|
|
210158
|
+
item.command = codeActionsDetail.command;
|
|
210151
210159
|
return item;
|
|
210152
210160
|
}
|
|
210153
210161
|
/**
|
|
@@ -210248,6 +210256,40 @@ var require_session = __commonJS({
|
|
|
210248
210256
|
}
|
|
210249
210257
|
return lspCodeActions;
|
|
210250
210258
|
}
|
|
210259
|
+
function generateCommandAndTextEditsFromCodeActions(codeActions, currentFilePath, getScriptInfo) {
|
|
210260
|
+
if (codeActions.length === 0) {
|
|
210261
|
+
return {};
|
|
210262
|
+
}
|
|
210263
|
+
const additionalTextEdits = [];
|
|
210264
|
+
const commandTextEditors = [];
|
|
210265
|
+
for (const tsAction of codeActions) {
|
|
210266
|
+
const currentFileChanges = tsAction.changes.filter((change) => change.fileName === currentFilePath);
|
|
210267
|
+
const otherWorkspaceFileChanges = tsAction.changes.filter((change) => change.fileName !== currentFilePath);
|
|
210268
|
+
if (currentFileChanges.length > 0) {
|
|
210269
|
+
const additionalWorkspaceEdit = (0, utils_1.tsFileTextChangesToLspWorkspaceEdit)(currentFileChanges, getScriptInfo).changes;
|
|
210270
|
+
if (additionalWorkspaceEdit !== void 0) {
|
|
210271
|
+
for (const edit of Object.values(additionalWorkspaceEdit)) {
|
|
210272
|
+
additionalTextEdits.push(...edit);
|
|
210273
|
+
}
|
|
210274
|
+
}
|
|
210275
|
+
}
|
|
210276
|
+
if (otherWorkspaceFileChanges.length > 0) {
|
|
210277
|
+
commandTextEditors.push((0, utils_1.tsFileTextChangesToLspWorkspaceEdit)(otherWorkspaceFileChanges, getScriptInfo));
|
|
210278
|
+
}
|
|
210279
|
+
}
|
|
210280
|
+
let command = void 0;
|
|
210281
|
+
if (commandTextEditors.length > 0) {
|
|
210282
|
+
command = {
|
|
210283
|
+
title: "",
|
|
210284
|
+
command: "angular.applyCompletionCodeAction",
|
|
210285
|
+
arguments: [commandTextEditors]
|
|
210286
|
+
};
|
|
210287
|
+
}
|
|
210288
|
+
return {
|
|
210289
|
+
command,
|
|
210290
|
+
additionalTextEdits: additionalTextEdits.length ? additionalTextEdits : void 0
|
|
210291
|
+
};
|
|
210292
|
+
}
|
|
210251
210293
|
}
|
|
210252
210294
|
});
|
|
210253
210295
|
|
|
@@ -210507,6 +210549,7 @@ function main() {
|
|
|
210507
210549
|
includeCompletionsWithSnippetText: options.includeCompletionsWithSnippetText,
|
|
210508
210550
|
forceStrictTemplates: isG3 || options.forceStrictTemplates,
|
|
210509
210551
|
disableBlockSyntax: options.disableBlockSyntax,
|
|
210552
|
+
disableLetSyntax: options.disableLetSyntax,
|
|
210510
210553
|
angularCoreVersion: (_a = options.angularCoreVersion) !== null && _a !== void 0 ? _a : null
|
|
210511
210554
|
});
|
|
210512
210555
|
session.info(`Angular language server process ID: ${process.pid}`);
|
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": "18.
|
|
4
|
+
"version": "18.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": "18.0.0",
|
|
18
|
+
"@angular/language-service": "18.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",
|