typescript-language-server 5.1.2 → 5.1.3

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 CHANGED
@@ -1,6 +1,14 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [5.1.3](https://github.com/typescript-language-server/typescript-language-server/compare/v5.1.2...v5.1.3) (2025-11-19)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * announce all supported commands ([#1053](https://github.com/typescript-language-server/typescript-language-server/issues/1053)) ([e9fe952](https://github.com/typescript-language-server/typescript-language-server/commit/e9fe952baee4030aad6fbc24fb55bf2b84ad98e8))
10
+ * don't send duplicate refactors when more than one context.only ([#1055](https://github.com/typescript-language-server/typescript-language-server/issues/1055)) ([6ca045a](https://github.com/typescript-language-server/typescript-language-server/commit/6ca045aede0931180077c43daa14d586bdccc38f))
11
+
4
12
  ## [5.1.2](https://github.com/typescript-language-server/typescript-language-server/compare/v5.1.1...v5.1.2) (2025-11-18)
5
13
 
6
14
 
package/lib/cli.mjs CHANGED
@@ -22476,6 +22476,9 @@ class CommandManager {
22476
22476
  this.commands.set(command.id, command);
22477
22477
  }
22478
22478
  }
22479
+ get registeredIds() {
22480
+ return Array.from(this.commands.keys());
22481
+ }
22479
22482
  async handle(commandId, ...args) {
22480
22483
  const entry = this.commands.get(commandId);
22481
22484
  if (entry) {
@@ -23320,7 +23323,7 @@ class LspServer {
23320
23323
  documentHighlightProvider: true,
23321
23324
  documentSymbolProvider: true,
23322
23325
  executeCommandProvider: {
23323
- commands: [ Commands.APPLY_REFACTORING, Commands.CONFIGURE_PLUGIN, Commands.ORGANIZE_IMPORTS, Commands.APPLY_RENAME_FILE, Commands.SOURCE_DEFINITION, Commands.TS_SERVER_REQUEST ]
23326
+ commands: [ Commands.APPLY_REFACTORING, Commands.CONFIGURE_PLUGIN, Commands.ORGANIZE_IMPORTS, Commands.APPLY_RENAME_FILE, Commands.SOURCE_DEFINITION, Commands.TS_SERVER_REQUEST, ...this.commandManager.registeredIds ]
23324
23327
  },
23325
23328
  hoverProvider: true,
23326
23329
  inlayHintProvider: true,
@@ -23819,7 +23822,7 @@ class LspServer {
23819
23822
  return actions;
23820
23823
  }
23821
23824
  async getRefactors(fileRangeArgs, context, features, token) {
23822
- const kinds = context.only || [ undefined ];
23825
+ const kinds = (context.only || [ undefined ]).filter(kind => kind === undefined || CodeActionKind.Refactor.contains(new CodeActionKind(kind)));
23823
23826
  const responses = await Promise.all(kinds.map(async kind => {
23824
23827
  const args = {
23825
23828
  ...fileRangeArgs,