Skip to content

Commit 52353f6

Browse files
authored
GLSP-944 Remove usage of vscode-ws-jsonrpc (#76)
* GLSP-944 Remove usage of vscode-ws-jsonrpc Requires eclipse-glsp/glsp-client#215 Part of eclipse-glsp/glsp#944 * Update yarn.lock
1 parent f524bb2 commit 52353f6

File tree

3 files changed

+807
-1231
lines changed

3 files changed

+807
-1231
lines changed

client/examples/workflow-webapp/src/app.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
TYPES
2626
} from '@eclipse-glsp/client';
2727
import { getParameters } from '@eclipse-glsp/ide';
28-
import { ApplicationIdProvider, GLSPClient } from '@eclipse-glsp/protocol';
28+
import { ApplicationIdProvider, GLSPClient, listen } from '@eclipse-glsp/protocol';
2929
import { MessageConnection } from 'vscode-jsonrpc';
3030
import createContainer from './di.config';
3131

@@ -47,10 +47,8 @@ const container = createContainer(widgetId);
4747
const diagramServer = container.get<GLSPDiagramServer>(TYPES.ModelSource);
4848
diagramServer.clientId = clientId;
4949

50-
import('vscode-ws-jsonrpc').then(jsonrpc => {
51-
const websocket = new WebSocket(`ws://localhost:${port}/${id}`);
52-
jsonrpc.listen({ webSocket: websocket, onConnection: connection => initialize(connection) });
53-
});
50+
const websocket = new WebSocket(`ws://localhost:${port}/${id}`);
51+
listen(websocket, connection => initialize(connection));
5452

5553
async function initialize(connectionProvider: MessageConnection): Promise<void> {
5654
const client = new BaseJsonrpcGLSPClient({ id, connectionProvider });

client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"watch": "lerna run --parallel watch"
2424
},
2525
"devDependencies": {
26-
"@eclipse-glsp/dev": "1.1.0-next.164cf99.124",
26+
"@eclipse-glsp/dev": "1.1.0-next.7026c40.129",
2727
"@types/node": "16.x",
2828
"copyfiles": "^2.4.1",
2929
"typescript": "^4.9.3"
3030
},
3131
"engines": {
32-
"node": ">=14.18.0",
32+
"node": ">=16.11.0",
3333
"yarn": ">=1.7.0 <2.x.x"
3434
}
3535
}

0 commit comments

Comments
 (0)