diff --git a/src/vs/platform/remote/common/remoteAgentConnection.ts b/src/vs/platform/remote/common/remoteAgentConnection.ts index 34108aab23fe180deb731ed384806f5d24cbf4fa..9b3e2e63d31ec98f687be63eb373e2186760e7a8 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 5afacd6023d2a3d6dd6023d11a6bf4c3f31d726c..a39cb20d276498f66b4e639cb950ca2498aa746b 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