Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,6 @@
"lodash": "^4.17.21",
"minimatch": "^3.0.4",
"vscode-extension-telemetry-wrapper": "0.9.0",
"vscode-tas-client": "^0.1.17"
"vscode-tas-client": "^0.1.22"
}
}
6 changes: 3 additions & 3 deletions src/ExperimentationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import * as vscode from "vscode";
import { addContextProperty, sendInfo } from "vscode-extension-telemetry-wrapper";
import { getExperimentationService, IExperimentationService, IExperimentationTelemetry, TargetPopulation } from "vscode-tas-client";
import { getExperimentationServiceAsync, IExperimentationService, IExperimentationTelemetry, TargetPopulation } from "vscode-tas-client";

class ExperimentationTelemetry implements IExperimentationTelemetry {

Expand All @@ -27,12 +27,12 @@ export function getExpService() {
return expService;
}

export function init(context: vscode.ExtensionContext): void {
export async function init(context: vscode.ExtensionContext): Promise<void> {
const packageJson: {[key: string]: any} = require("../package.json");
// tslint:disable: no-string-literal
const extensionName = `${packageJson["publisher"]}.${packageJson["name"]}`;
const extensionVersion = packageJson["version"];
// tslint:enable: no-string-literal
expService = getExperimentationService(extensionName, extensionVersion,
expService = await getExperimentationServiceAsync(extensionName, extensionVersion,
TargetPopulation.Public, new ExperimentationTelemetry(), context.globalState);
}
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { EventCounter } from "./utility";
import { DependencyExplorer } from "./views/dependencyExplorer";

export async function activate(context: ExtensionContext): Promise<void> {
await initExpService(context);
contextManager.initialize(context);
await initializeFromJsonFile(context.asAbsolutePath("./package.json"), { firstParty: true });
await instrumentOperation("activation", activateExtension)(context);
Expand All @@ -30,7 +31,6 @@ async function activateExtension(_operationId: string, context: ExtensionContext
context.subscriptions.push(contextManager);
context.subscriptions.push(syncHandler);
context.subscriptions.push(tasks.registerTaskProvider(ExportJarTaskProvider.exportJarType, new ExportJarTaskProvider()));
initExpService(context);
}

// this method is called when your extension is deactivated
Expand Down