Skip to content

Commit 6e35c5d

Browse files
committed
feat: update dependencies and fix e2e test
Signed-off-by: Christian Stewart <[email protected]>
1 parent e417768 commit 6e35c5d

File tree

4 files changed

+373
-380
lines changed

4 files changed

+373
-380
lines changed

e2e/e2e_test.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"io"
66
"net"
77
"testing"
8+
"time"
89

910
"github.com/aperturerobotics/starpc/echo"
1011
"github.com/aperturerobotics/starpc/srpc"
@@ -30,17 +31,21 @@ func RunE2E(t *testing.T, cb func(client echo.SRPCEchoerClient) error) {
3031
// construct the client
3132
clientPipe, serverPipe := net.Pipe()
3233

34+
clientMp, err := mp.NewMultiplex(clientPipe, false, nil)
35+
if err != nil {
36+
t.Fatal(err.Error())
37+
}
38+
client := srpc.NewClientWithMuxedConn(mplex.NewMuxedConn(clientMp))
39+
3340
ctx := context.Background()
41+
serverMp, _ := mp.NewMultiplex(serverPipe, true, nil)
3442
go func() {
35-
serverMp, _ := mp.NewMultiplex(serverPipe, false, nil)
3643
_ = server.AcceptMuxedConn(ctx, mplex.NewMuxedConn(serverMp))
3744
}()
3845

39-
clientMp, err := mp.NewMultiplex(clientPipe, true, nil)
40-
if err != nil {
41-
t.Fatal(err.Error())
42-
}
43-
client := srpc.NewClientWithMuxedConn(mplex.NewMuxedConn(clientMp))
46+
// TODO: requires a moment for the listener to start: not sure why.
47+
// the packets /should/ be buffered in the pipe.
48+
<-time.After(time.Millisecond * 100)
4449

4550
// construct the client rpc interface
4651
clientEcho := echo.NewSRPCEchoerClient(client)

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "starpc",
3-
"version": "0.4.7",
3+
"version": "0.4.8",
44
"description": "Streaming protobuf RPC service protocol over any two-way channel.",
55
"license": "MIT",
66
"author": {
@@ -56,23 +56,23 @@
5656
"singleQuote": true
5757
},
5858
"devDependencies": {
59-
"@typescript-eslint/eslint-plugin": "^5.27.1",
60-
"@typescript-eslint/parser": "^5.27.1",
59+
"@typescript-eslint/eslint-plugin": "^5.30.0",
60+
"@typescript-eslint/parser": "^5.30.0",
6161
"depcheck": "^1.4.3",
62-
"esbuild": "^0.14.46",
62+
"esbuild": "^0.14.47",
6363
"eslint": "^8.18.0",
6464
"eslint-config-prettier": "^8.5.0",
6565
"prettier": "^2.7.1",
6666
"rimraf": "^3.0.2",
67-
"ts-proto": "^1.115.4",
67+
"ts-proto": "^1.115.5",
6868
"typescript": "^4.7.4"
6969
},
7070
"dependencies": {
71-
"@libp2p/interface-connection": "^2.0.0",
72-
"@libp2p/interface-stream-muxer": "^1.0.2",
73-
"@libp2p/mplex": "^3.0.0",
71+
"@libp2p/interface-connection": "^2.1.1",
72+
"@libp2p/interface-stream-muxer": "^2.0.1",
73+
"@libp2p/mplex": "^4.0.0",
7474
"event-iterator": "^2.0.0",
75-
"isomorphic-ws": "^4.0.1",
75+
"isomorphic-ws": "^5.0.0",
7676
"it-length-prefixed": "^7.0.1",
7777
"it-pipe": "^2.0.3",
7878
"it-pushable": "^3.0.0",

patches/ts-poet+4.13.0.patch renamed to patches/ts-poet+4.14.0.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/ts-poet/build/Import.js b/node_modules/ts-poet/build/Import.js
2-
index c43569e..a77a1b1 100644
2+
index fe1f6d2..280df8f 100644
33
--- a/node_modules/ts-poet/build/Import.js
44
+++ b/node_modules/ts-poet/build/Import.js
55
@@ -293,6 +293,14 @@ function emitImports(imports, ourModulePath, importMappings) {

0 commit comments

Comments
 (0)