From 4bd6a7a3eeeaed437fbccfb1b6b2fa3ebe4a1130 Mon Sep 17 00:00:00 2001 From: Abdelrahman Shawki Hassan Date: Wed, 9 Oct 2024 15:46:11 +0200 Subject: [PATCH] chore: bump ls protocol version to 16 (#539) --- src/snyk/common/constants/languageServer.ts | 2 +- src/test/unit/common/languageServer/languageServer.test.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/snyk/common/constants/languageServer.ts b/src/snyk/common/constants/languageServer.ts index 403ed63a2..17b4686e8 100644 --- a/src/snyk/common/constants/languageServer.ts +++ b/src/snyk/common/constants/languageServer.ts @@ -2,7 +2,7 @@ // Language Server name, used e.g. for the output channel export const SNYK_LANGUAGE_SERVER_NAME = 'Snyk Language Server'; // The internal language server protocol version for custom messages and configuration -export const PROTOCOL_VERSION = 15; +export const PROTOCOL_VERSION = 16; // LS protocol methods (needed for not having to rely on vscode dependencies in testing) export const DID_CHANGE_CONFIGURATION_METHOD = 'workspace/didChangeConfiguration'; diff --git a/src/test/unit/common/languageServer/languageServer.test.ts b/src/test/unit/common/languageServer/languageServer.test.ts index bd61efd78..5579f58f5 100644 --- a/src/test/unit/common/languageServer/languageServer.test.ts +++ b/src/test/unit/common/languageServer/languageServer.test.ts @@ -16,6 +16,7 @@ import { defaultFeaturesConfigurationStub } from '../../mocks/configuration.mock import { LoggerMock } from '../../mocks/logger.mock'; import { windowMock } from '../../mocks/window.mock'; import { stubWorkspaceConfiguration } from '../../mocks/workspace.mock'; +import { PROTOCOL_VERSION } from '../../../../snyk/common/constants/languageServer'; suite('Language Server', () => { const authServiceMock = {} as IAuthenticationService; @@ -228,7 +229,7 @@ suite('Language Server', () => { enableTrustedFoldersFeature: 'true', trustedFolders: ['/trusted/test/folder'], insecure: 'true', - requiredProtocolVersion: '15', + requiredProtocolVersion: PROTOCOL_VERSION.toString(), scanningMode: 'auto', folderConfigs: [], authenticationMethod: 'oauth',