mirror of
https://github.com/coder/code-server.git
synced 2026-05-13 07:47:26 +02:00
chore(vscode): update to 1.56.0
This commit is contained in:
@@ -72,7 +72,7 @@ export class Client extends IPCClient implements IDisposable {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.protocol.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ class ProtocolReader extends Disposable {
|
||||
return this._incomingData.read(this._incomingData.byteLength);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._isDisposed = true;
|
||||
super.dispose();
|
||||
}
|
||||
@@ -412,7 +412,7 @@ export class Client<TContext = string> extends IPCClient<TContext> {
|
||||
super(protocol, id, ipcLogger);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
const socket = this.protocol.getSocket();
|
||||
this.protocol.sendDisconnect();
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Client extends IPCClient implements IDisposable {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.protocol.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ export class WebSocketNodeSocket extends Disposable implements ISocket {
|
||||
this._register(this.socket.onClose(() => this._onClose.fire()));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._zlibDeflateFlushWaitingCount > 0) {
|
||||
// Wait for any outstanding writes to finish before disposing
|
||||
this._register(this._onDidZlibFlush.event(() => {
|
||||
@@ -581,7 +581,7 @@ export class Server extends IPCServer {
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
if (this.server) {
|
||||
this.server.close();
|
||||
|
||||
@@ -66,7 +66,7 @@ class TestIPCClient extends IPCClient<string> {
|
||||
super(protocol, id);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this._onDidDisconnect.fire();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -253,7 +253,7 @@ suite('Base IPC', function () {
|
||||
|
||||
test('call success', async function () {
|
||||
const r = await ipcService.marco();
|
||||
return assert.equal(r, 'polo');
|
||||
return assert.strictEqual(r, 'polo');
|
||||
});
|
||||
|
||||
test('call error', async function () {
|
||||
@@ -261,7 +261,7 @@ suite('Base IPC', function () {
|
||||
await ipcService.error('nice error');
|
||||
return assert.fail('should not reach here');
|
||||
} catch (err) {
|
||||
return assert.equal(err.message, 'nice error');
|
||||
return assert.strictEqual(err.message, 'nice error');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -304,20 +304,20 @@ suite('Base IPC', function () {
|
||||
ipcService.onPong(msg => messages.push(msg));
|
||||
await timeout(0);
|
||||
|
||||
assert.deepEqual(messages, []);
|
||||
assert.deepStrictEqual(messages, []);
|
||||
service.ping('hello');
|
||||
await timeout(0);
|
||||
|
||||
assert.deepEqual(messages, ['hello']);
|
||||
assert.deepStrictEqual(messages, ['hello']);
|
||||
service.ping('world');
|
||||
await timeout(0);
|
||||
|
||||
assert.deepEqual(messages, ['hello', 'world']);
|
||||
assert.deepStrictEqual(messages, ['hello', 'world']);
|
||||
});
|
||||
|
||||
test('buffers in arrays', async function () {
|
||||
const r = await ipcService.buffersLength([VSBuffer.alloc(2), VSBuffer.alloc(3)]);
|
||||
return assert.equal(r, 5);
|
||||
return assert.strictEqual(r, 5);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -345,7 +345,7 @@ suite('Base IPC', function () {
|
||||
|
||||
test('call success', async function () {
|
||||
const r = await ipcService.marco();
|
||||
return assert.equal(r, 'polo');
|
||||
return assert.strictEqual(r, 'polo');
|
||||
});
|
||||
|
||||
test('call error', async function () {
|
||||
@@ -353,7 +353,7 @@ suite('Base IPC', function () {
|
||||
await ipcService.error('nice error');
|
||||
return assert.fail('should not reach here');
|
||||
} catch (err) {
|
||||
return assert.equal(err.message, 'nice error');
|
||||
return assert.strictEqual(err.message, 'nice error');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -363,15 +363,15 @@ suite('Base IPC', function () {
|
||||
ipcService.onPong(msg => messages.push(msg));
|
||||
await timeout(0);
|
||||
|
||||
assert.deepEqual(messages, []);
|
||||
assert.deepStrictEqual(messages, []);
|
||||
service.ping('hello');
|
||||
await timeout(0);
|
||||
|
||||
assert.deepEqual(messages, ['hello']);
|
||||
assert.deepStrictEqual(messages, ['hello']);
|
||||
service.ping('world');
|
||||
await timeout(0);
|
||||
|
||||
assert.deepEqual(messages, ['hello', 'world']);
|
||||
assert.deepStrictEqual(messages, ['hello', 'world']);
|
||||
});
|
||||
|
||||
test('marshalling uri', async function () {
|
||||
@@ -383,7 +383,7 @@ suite('Base IPC', function () {
|
||||
|
||||
test('buffers in arrays', async function () {
|
||||
const r = await ipcService.buffersLength([VSBuffer.alloc(2), VSBuffer.alloc(3)]);
|
||||
return assert.equal(r, 5);
|
||||
return assert.strictEqual(r, 5);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -411,7 +411,7 @@ suite('Base IPC', function () {
|
||||
|
||||
test('call extra context', async function () {
|
||||
const r = await ipcService.context();
|
||||
return assert.equal(r, 'Super Context');
|
||||
return assert.strictEqual(r, 'Super Context');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -461,7 +461,7 @@ suite('Base IPC', function () {
|
||||
clientService1.ping('hello 1');
|
||||
|
||||
await timeout(1);
|
||||
assert.deepEqual(pings, ['hello 1']);
|
||||
assert.deepStrictEqual(pings, ['hello 1']);
|
||||
|
||||
const client2 = server.createConnection('client2');
|
||||
const clientService2 = new TestService();
|
||||
@@ -472,19 +472,19 @@ suite('Base IPC', function () {
|
||||
clientService2.ping('hello 2');
|
||||
|
||||
await timeout(1);
|
||||
assert.deepEqual(pings, ['hello 1', 'hello 2']);
|
||||
assert.deepStrictEqual(pings, ['hello 1', 'hello 2']);
|
||||
|
||||
client1.dispose();
|
||||
clientService1.ping('hello 1');
|
||||
|
||||
await timeout(1);
|
||||
assert.deepEqual(pings, ['hello 1', 'hello 2']);
|
||||
assert.deepStrictEqual(pings, ['hello 1', 'hello 2']);
|
||||
|
||||
await timeout(1);
|
||||
clientService2.ping('hello again 2');
|
||||
|
||||
await timeout(1);
|
||||
assert.deepEqual(pings, ['hello 1', 'hello 2', 'hello again 2']);
|
||||
assert.deepStrictEqual(pings, ['hello 1', 'hello 2', 'hello again 2']);
|
||||
|
||||
client2.dispose();
|
||||
server.dispose();
|
||||
|
||||
@@ -22,8 +22,8 @@ suite('IPC, Child Process', () => {
|
||||
const service = new TestServiceClient(channel);
|
||||
|
||||
const result = service.pong('ping').then(r => {
|
||||
assert.equal(r.incoming, 'ping');
|
||||
assert.equal(r.outgoing, 'pong');
|
||||
assert.strictEqual(r.incoming, 'ping');
|
||||
assert.strictEqual(r.outgoing, 'pong');
|
||||
});
|
||||
|
||||
return result.finally(() => client.dispose());
|
||||
@@ -37,7 +37,7 @@ suite('IPC, Child Process', () => {
|
||||
const event = new Promise((c, e) => {
|
||||
service.onMarco(({ answer }) => {
|
||||
try {
|
||||
assert.equal(answer, 'polo');
|
||||
assert.strictEqual(answer, 'polo');
|
||||
c(undefined);
|
||||
} catch (err) {
|
||||
e(err);
|
||||
@@ -60,17 +60,17 @@ suite('IPC, Child Process', () => {
|
||||
const disposable = service.onMarco(() => count++);
|
||||
|
||||
const result = service.marco().then(async answer => {
|
||||
assert.equal(answer, 'polo');
|
||||
assert.equal(count, 1);
|
||||
assert.strictEqual(answer, 'polo');
|
||||
assert.strictEqual(count, 1);
|
||||
|
||||
const answer_1 = await service.marco();
|
||||
assert.equal(answer_1, 'polo');
|
||||
assert.equal(count, 2);
|
||||
assert.strictEqual(answer_1, 'polo');
|
||||
assert.strictEqual(count, 2);
|
||||
disposable.dispose();
|
||||
|
||||
const answer_2 = await service.marco();
|
||||
assert.equal(answer_2, 'polo');
|
||||
assert.equal(count, 2);
|
||||
assert.strictEqual(answer_2, 'polo');
|
||||
assert.strictEqual(count, 2);
|
||||
});
|
||||
|
||||
return result.finally(() => client.dispose());
|
||||
|
||||
Reference in New Issue
Block a user