From 97a95add9a76a2e53d1861326a2f36dde20ecb56 Mon Sep 17 00:00:00 2001 From: Leila Lali Date: Wed, 24 Aug 2016 16:21:52 -0700 Subject: [PATCH] Updating language client library to 2.0.0 --- gulpfile.js | 2 +- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- packages.config | 2 +- src/controllers/QueryNotificationHandler.ts | 4 ++-- src/languageservice/serviceclient.ts | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index f4c5b273..88238a50 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -144,7 +144,7 @@ gulp.task('ext:copy-tests', () => { }); gulp.task('ext:copy-packages', () => { - var serviceHostVersion = "0.0.3"; + var serviceHostVersion = "0.0.6"; return gulp.src(config.paths.project.root + '/packages/Microsoft.SqlTools.ServiceLayer.' + serviceHostVersion + '/lib/netcoreapp1.0/**/*') .pipe(gulp.dest(config.paths.project.root + '/out/tools/')) }); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 3f7e6a62..3ad63b5c 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2885,9 +2885,9 @@ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-1.2.0.tgz" }, "vscode-languageclient": { - "version": "1.4.2", - "from": "vscode-languageclient@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-1.4.2.tgz" + "version": "2.0.0", + "from": "vscode-languageclient@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.0.0.tgz" }, "when": { "version": "3.7.7", diff --git a/package.json b/package.json index f23576ba..2999d747 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "request": "^2.73.0", "typemoq": "^0.3.2", "vscode-extension-telemetry": "^0.0.5", - "vscode-languageclient": "^1.0.0" + "vscode-languageclient": "^2.0.0" }, "contributes": { "languages": [ diff --git a/packages.config b/packages.config index c3357ed5..ea117aa9 100644 --- a/packages.config +++ b/packages.config @@ -1,4 +1,4 @@ - + diff --git a/src/controllers/QueryNotificationHandler.ts b/src/controllers/QueryNotificationHandler.ts index 6947c0f5..4c0d56a9 100644 --- a/src/controllers/QueryNotificationHandler.ts +++ b/src/controllers/QueryNotificationHandler.ts @@ -5,7 +5,7 @@ import QueryRunner from './queryRunner'; import SqlToolsServiceClient from '../languageservice/serviceclient'; import {QueryExecuteCompleteNotification} from '../models/contracts'; -import {INotificationHandler} from 'vscode-languageclient'; +import {NotificationHandler} from 'vscode-languageclient'; export class QueryNotificationHandler { private static _instance: QueryNotificationHandler; @@ -32,7 +32,7 @@ export class QueryNotificationHandler { } // handles distributing notifications to appropriate - private handleNotification(): INotificationHandler { + private handleNotification(): NotificationHandler { const self = this; return (event) => { self._queryRunners.get(event.ownerUri).handleResult(event); diff --git a/src/languageservice/serviceclient.ts b/src/languageservice/serviceclient.ts index 64405077..de894194 100644 --- a/src/languageservice/serviceclient.ts +++ b/src/languageservice/serviceclient.ts @@ -7,7 +7,7 @@ import * as path from 'path'; import { ExtensionContext } from 'vscode'; import { LanguageClient, LanguageClientOptions, ServerOptions, - TransportKind, RequestType, NotificationType, INotificationHandler } from 'vscode-languageclient'; + TransportKind, RequestType, NotificationType, NotificationHandler } from 'vscode-languageclient'; import * as Utils from '../models/utils'; import {VersionRequest} from '../models/contracts'; import Constants = require('../models/constants'); @@ -82,13 +82,13 @@ export default class SqlToolsServiceClient { * @param type The notification type to register the handler for * @param handler The handler to register */ - public onNotification

(type: NotificationType

, handler: INotificationHandler

): void { + public onNotification

(type: NotificationType

, handler: NotificationHandler

): void { return this.client.onNotification(type, handler); } public checkServiceCompatibility(): Promise { return new Promise((resolve, reject) => { - this._client.sendRequest(VersionRequest.type).then((result) => { + this._client.sendRequest(VersionRequest.type, undefined).then((result) => { Utils.logDebug('sqlserverclient version: ' + result); if (!result || !result.startsWith(Constants.serviceCompatibleVersion)) {