File tree Expand file tree Collapse file tree 4 files changed +44
-1
lines changed Expand file tree Collapse file tree 4 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 6161 "rollup-plugin-sourcemaps" : " ^0.6.3" ,
6262 "terser" : " ^5.18.1" ,
6363 "tslib" : " ^2.5.3" ,
64- "typescript" : " ~5.1.3"
64+ "typescript" : " ~5.1.3" ,
65+ "ws" : " ^8.18.2"
6566 },
6667 "publishConfig" : {
6768 "access" : " public"
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ export { Poll } from './poll';
1313
1414export { Debouncer , RateLimiter , Throttler } from './ratelimiter' ;
1515
16+ export { SocketStream } from './socketstream' ;
17+
1618/**
1719 * A readonly poll that calls an asynchronous function with each tick.
1820 *
Original file line number Diff line number Diff line change 1+ // Copyright (c) Jupyter Development Team.
2+ // Distributed under the terms of the Modified BSD License.
3+
4+ import { expect } from 'chai' ;
5+
6+ import WebSocket from 'ws' ;
7+
8+ import { SocketStream } from '@lumino/polling' ;
9+
10+ describe ( 'SocketStream' , ( ) => {
11+ let stream : SocketStream < unknown , unknown > ;
12+
13+ afterEach ( ( ) => {
14+ stream . dispose ( ) ;
15+ } ) ;
16+
17+ describe ( '#constructor()' , ( ) => {
18+ it ( 'should create a socket stream' , ( ) => {
19+ const url = 'https://www.example.com/' ;
20+ stream = new SocketStream ( null , ( ) => new WebSocket ( url ) as any ) ;
21+ expect ( stream ) . to . be . an . instanceof ( SocketStream ) ;
22+ } ) ;
23+ } ) ;
24+ } ) ;
Original file line number Diff line number Diff line change @@ -718,6 +718,7 @@ __metadata:
718718 terser : ^5.18.1
719719 tslib : ^2.5.3
720720 typescript : ~5.1.3
721+ ws : ^8.18.2
721722 languageName : unknown
722723 linkType : soft
723724
@@ -12600,6 +12601,21 @@ __metadata:
1260012601 languageName : node
1260112602 linkType : hard
1260212603
12604+ " ws@npm:^8.18.2 " :
12605+ version : 8.18.2
12606+ resolution : " ws@npm:8.18.2"
12607+ peerDependencies :
12608+ bufferutil : ^4.0.1
12609+ utf-8-validate : " >=5.0.2"
12610+ peerDependenciesMeta :
12611+ bufferutil :
12612+ optional : true
12613+ utf-8-validate :
12614+ optional : true
12615+ checksum : e38beae19ba4d68577ec24eb34fbfab376333fedd10f99b07511a8e842e22dbc102de39adac333a18e4c58868d0703cd5f239b04b345e22402d0ed8c34ea0aa0
12616+ languageName : node
12617+ linkType : hard
12618+
1260312619" xtend@npm:~4.0.1 " :
1260412620 version : 4.0.2
1260512621 resolution : " xtend@npm:4.0.2"
You can’t perform that action at this time.
0 commit comments