From 01f3f61234c688ed65fe4b2cae332eb3b2eb1e8c Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 27 May 2019 16:17:01 +0200 Subject: [PATCH] remoteAgentConnection: await import('vsda') #74398 --- src/vs/platform/remote/common/remoteAgentConnection.ts | 4 ++-- tslint.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/platform/remote/common/remoteAgentConnection.ts b/src/vs/platform/remote/common/remoteAgentConnection.ts index 34108aab23f..9b3e2e63d31 100644 --- a/src/vs/platform/remote/common/remoteAgentConnection.ts +++ b/src/vs/platform/remote/common/remoteAgentConnection.ts @@ -92,7 +92,7 @@ async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptio return new Promise((c, e) => { - const messageRegistration = protocol.onControlMessage(raw => { + const messageRegistration = protocol.onControlMessage(async raw => { const msg = JSON.parse(raw.toString()); // Stop listening for further events messageRegistration.dispose(); @@ -107,7 +107,7 @@ async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptio let signed = msg.data; if (platform.isNative) { try { - const vsda = require.__$__nodeRequire('vsda'); + const vsda = await import('vsda'); const signer = new vsda.signer(); if (signer) { signed = signer.sign(msg.data); diff --git a/tslint.json b/tslint.json index 5afacd6023d..a39cb20d276 100644 --- a/tslint.json +++ b/tslint.json @@ -153,6 +153,7 @@ "restrictions": [ "vs/nls", "**/vs/base/common/**", + "vsda", "**/vs/base/parts/*/common/**", "**/vs/platform/*/common/**" ] @@ -592,4 +593,4 @@ "no-nls-in-standalone-editor": true }, "defaultSeverity": "warning" -} +} \ No newline at end of file