Skip to content

Commit

Permalink
feat: transmit required protocol version (#484)
Browse files Browse the repository at this point in the history
* feat: transmit required protocol version

* docs: CHANGELOG.md

* fix: linter error
  • Loading branch information
bastiandoetsch authored Jun 27, 2024
1 parent cdcbbd3 commit 5ba8dc9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [2.12.4]
- Fix `.suggestion` class to ensure it is scrollable and not overlapped by the `.suggestion-actions` fixed element. This change prevents the suggestion content from being hidden.
- transmit required protocol version to language server

## [2.12.3]
- Fix a bug in AI Applyfix on Windows.
Expand Down
3 changes: 3 additions & 0 deletions src/snyk/common/languageServer/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import _ from 'lodash';
import { CLI_INTEGRATION_NAME } from '../../cli/contants/integration';
import { Configuration, IConfiguration, SeverityFilter } from '../configuration/configuration';
import { User } from '../user';
import { PROTOCOL_VERSION } from '../constants/languageServer';

export type ServerSettings = {
// Feature toggles
Expand Down Expand Up @@ -38,6 +39,7 @@ export type ServerSettings = {
integrationName?: string;
integrationVersion?: string;
deviceId?: string;
requiredProtocolVersion?: string;
};

export class LanguageServerSettings {
Expand Down Expand Up @@ -75,6 +77,7 @@ export class LanguageServerSettings {
integrationName: CLI_INTEGRATION_NAME,
integrationVersion: await Configuration.getVersion(),
deviceId: user.anonymousId,
requiredProtocolVersion: `${PROTOCOL_VERSION}`,
};
}
}
1 change: 1 addition & 0 deletions src/test/unit/common/languageServer/languageServer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ suite('Language Server', () => {
enableTrustedFoldersFeature: 'true',
trustedFolders: ['/trusted/test/folder'],
insecure: 'true',
requiredProtocolVersion: '12',
scanningMode: 'auto',
};

Expand Down

0 comments on commit 5ba8dc9

Please sign in to comment.