Skip to content

fix: remove unused vscode-languageclient dependency - #1912

Open
dependabot[bot] wants to merge 4 commits into
mainfrom
dependabot/npm_and_yarn/vscode-languageclient-10.1.0
Open

fix: remove unused vscode-languageclient dependency#1912
dependabot[bot] wants to merge 4 commits into
mainfrom
dependabot/npm_and_yarn/vscode-languageclient-10.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 20, 2026

Copy link
Copy Markdown
Contributor

The original update exposed that vscode-languageclient was used only through a removed private protocol-converter import. The generation command now converts the returned LSP workspace edit through the public vscode-languageserver-types API, so the direct vscode-languageclient dependency is removed instead of upgraded.

This also preserves the existing VS Code 1.88 minimum and adds regression coverage for text edits, annotated resource changes, and snippet edits.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Aug 20, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/vscode-languageclient-10.1.0 branch 3 times, most recently from a26b7f7 to e9eaafc Compare August 29, 2026 09:26
@chagong

Copy link
Copy Markdown
Contributor

Dependabot (@dependabot) rebase

@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/vscode-languageclient-10.1.0 branch 3 times, most recently from 833d405 to 423bda3 Compare September 3, 2026 11:20
@chagong

Copy link
Copy Markdown
Contributor

Dependabot (@dependabot) rebase

Bumps [vscode-languageclient](https://github.com/Microsoft/vscode-languageserver-node/tree/HEAD/client) from 6.0.0-next.9 to 10.1.0.
- [Release notes](https://github.com/Microsoft/vscode-languageserver-node/releases)
- [Commits](https://github.com/Microsoft/vscode-languageserver-node/commits/release/client/10.1.0/client)

---
updated-dependencies:
- dependency-name: vscode-languageclient
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/vscode-languageclient-10.1.0 branch from 423bda3 to c57d886 Compare September 3, 2026 12:04
Replace the removed private protocol converter import with the public LSP types API and align the VS Code engine requirement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@chagong Changyong Gong (chagong) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: the vscode-languageclient 10 migration uses supported APIs, aligns the VS Code engine, adds regression coverage, and all checks pass.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new asWorkspaceEdit implementation doesn’t correctly handle SnippetTextEdit entries under WorkspaceEdit.changes, which can lead to incorrect edit application when snippet edits are returned in that form.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the extension’s language-client dependency to vscode-languageclient@10.1.0 and replaces the previous protocolConverter-based workspace-edit conversion with an in-repo asWorkspaceEdit implementation to handle newer LSP workspace edit shapes (including snippet edits and change annotations).

Changes:

  • Bump vscode-languageclient to 10.1.0 and raise VS Code engine requirement to ^1.91.0.
  • Implement a custom asWorkspaceEdit converter (including support for annotated/resource changes and snippet edits in documentChanges).
  • Add a test suite covering workspace edit conversion basics.
File summaries
File Description
src/commands/generationCommands.ts Replaces vscode-languageclient protocol converter usage with a custom LSP WorkspaceEdit → VS Code WorkspaceEdit conversion function.
test/suite/generationCommands.test.ts Adds unit tests for the new asWorkspaceEdit conversion behavior.
package.json Bumps vscode-languageclient, adds vscode-languageserver-types, and updates the VS Code engine requirement.
package-lock.json Updates lockfile to reflect the new dependency versions.
Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/commands/generationCommands.ts
The private converter was the package’s only usage. Keep the focused protocol conversion, restore the VS Code 1.88 minimum, and strengthen snippet-edit coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chagong Changyong Gong (chagong) changed the title chore(deps): bump vscode-languageclient from 6.0.0-next.9 to 10.1.0 fix: remove unused vscode-languageclient dependency Sep 4, 2026

@chagong Changyong Gong (chagong) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: the unused direct language-client dependency is removed, the supported protocol conversion preserves the VS Code 1.88 minimum, and current-head CI passes.

Regenerate the removal from the base lockfile so unrelated transitive semver resolution stays unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new test file has a TypeScript type error (unknown accessed as SnippetTextEdit) that should be fixed to keep tsc compilation passing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread test/suite/generationCommands.test.ts

@chagong Changyong Gong (chagong) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: the unused direct language-client dependency is removed, the minimal lockfile preserves unrelated resolutions, and all checks pass on the current head.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new metadata conversion currently assumes annotationId is always a string key, which can drop inline ChangeAnnotation objects accepted by the upstream type guards and lose edit metadata.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/commands/generationCommands.ts:32

  • AnnotatedTextEdit.is(...) and SnippetTextEdit.is(...) in vscode-languageserver-types accept annotationId values that are either a string identifier or an inline ChangeAnnotation object. The current metadata() helper assumes annotationId is always a string key into protocolEdit.changeAnnotations, so inline annotations would be silently dropped and metadata (label/needsConfirmation/description) lost.

Consider supporting both shapes by treating non-string annotationId values as the annotation itself, and also avoid coercing needsConfirmation to false when it’s omitted (preserve undefined).

  • Files reviewed: 3/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants