Skip to content

Commit 1fe0ec0

Browse files
authored
feat: Update vscode-languageclient (#169)
* Update vscode-languageclient * Fixing import path * Upgrade tests * Remove old test helper files
1 parent cb71e2b commit 1fe0ec0

8 files changed

+1006
-125
lines changed

.vscode-test.mjs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
workspaceFolder: 'src/test'
6+
});

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## [unreleased]
4+
5+
- Update vscode-languageclient to support debugger inline values
6+
37
## [1.6.0] - 2024-12-05
48

59
- Bundle phpactor 2024.11.28.1

package-lock.json

+989-61
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"eslint": "eslint \"src/**/*.ts\"",
2525
"prettier": "prettier \"**/{*.json,*.yml,.*.yml,*.ts,.prettierrc,*.md}\" --write --list-different",
2626
"prettier-check": "npm run prettier -- --write=false",
27-
"test": "node ./out/test/runTests.js"
27+
"test": "vscode-test"
2828
},
2929
"activationEvents": [
3030
"onLanguage:php",
@@ -141,6 +141,7 @@
141141
"@types/vscode": "^1.61.0",
142142
"@typescript-eslint/eslint-plugin": "^8.0.0",
143143
"@typescript-eslint/parser": "^8.0.0",
144+
"@vscode/test-cli": "^0.0.10",
144145
"@vscode/test-electron": "^2.1.3",
145146
"@vscode/vsce": "^3.0.0",
146147
"eslint": "^8.51.0",
@@ -157,7 +158,7 @@
157158
"typescript": "^5.0.0"
158159
},
159160
"dependencies": {
160-
"vscode-languageclient": "^6.1.3"
161+
"vscode-languageclient": "^9.0"
161162
},
162163
"repository": {
163164
"type": "git",

src/extension.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LanguageClient, ServerOptions, LanguageClientOptions, StreamInfo } from 'vscode-languageclient'
1+
import { LanguageClient, ServerOptions, LanguageClientOptions, StreamInfo } from 'vscode-languageclient/node'
22
import { EvaluatableExpressionRequest } from './protocol'
33

44
import * as vscode from 'vscode'
@@ -23,7 +23,7 @@ interface PhpactorConfig {
2323
launchServerArgs: string[]
2424
}
2525

26-
export function activate(context: vscode.ExtensionContext): void {
26+
export async function activate(context: vscode.ExtensionContext): Promise<void> {
2727
if (!checkPlatform()) {
2828
return
2929
}
@@ -50,7 +50,7 @@ export function activate(context: vscode.ExtensionContext): void {
5050
if (enable === false) return
5151

5252
languageClient = createClient(config)
53-
languageClient.start()
53+
await languageClient.start()
5454

5555
context.subscriptions.push(
5656
vscode.languages.registerEvaluatableExpressionProvider('php', {

src/protocol.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* eslint @typescript-eslint/no-namespace: 0 */
33
import { Range } from 'vscode'
44
// import { Range } from 'vscode-languageserver-types'
5-
import { ProtocolRequestType } from 'vscode-languageserver-protocol/lib/messages'
5+
import { ProtocolRequestType } from 'vscode-languageserver-protocol/lib/common/messages'
66
import {
77
TextDocumentPositionParams,
88
TextDocumentRegistrationOptions,

src/test/runTests.ts

-25
This file was deleted.

src/test/suite/index.ts

-33
This file was deleted.

0 commit comments

Comments
 (0)