Skip to content

Commit 13cbf43

Browse files
authored
Test against pycrdt-websocket v0.16.0 & update dev dependencies (#339)
* Update tests for `pycrdt-websocket` 0.16 * Update for `pycrdt-websocket` 0.16 * Test against `pycrdt-websocket` `v0.16.0` * Fix websocket provider import in tests * Fix websocket provider in test_pycrdt_yjs.py * Update dev dependencies to fix docs
1 parent 165247d commit 13cbf43

File tree

5 files changed

+1318
-558
lines changed

5 files changed

+1318
-558
lines changed

javascript/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@
4949
"yjs": "^13.5.40"
5050
},
5151
"devDependencies": {
52-
"@types/jest": "^29.0.0",
53-
"@typescript-eslint/eslint-plugin": "^5.36.0",
54-
"@typescript-eslint/parser": "^5.36.0",
55-
"eslint": "^8.17.0",
56-
"eslint-config-prettier": "^8.5.0",
57-
"eslint-plugin-jest": "^27.0.0",
58-
"eslint-plugin-prettier": "^4.0.0",
59-
"jest": "^29.0.0",
60-
"prettier": "^2.8.4",
61-
"rimraf": "^4.4.0",
52+
"@types/jest": "^29.2.0",
53+
"@typescript-eslint/eslint-plugin": "^6.1.0",
54+
"@typescript-eslint/parser": "^6.1.0",
55+
"eslint": "^8.36.0",
56+
"eslint-config-prettier": "^8.8.0",
57+
"eslint-plugin-jest": "^27.6.0",
58+
"eslint-plugin-prettier": "^5.0.0",
59+
"jest": "^29.2.0",
60+
"prettier": "^3.0.0",
61+
"rimraf": "^5.0.1",
6262
"tsc-esm-fix": "^2.20.0",
6363
"typedoc": "^0.23.21",
64-
"typescript": "^4.9.5"
64+
"typescript": "~5.8.0"
6565
},
6666
"publishConfig": {
6767
"access": "public"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test = [
3232
"pytest-asyncio",
3333
"httpx-ws >=0.5.2",
3434
"hypercorn >=0.16.0",
35-
"pycrdt-websocket >=0.15.0,<0.16.0",
35+
"pycrdt-websocket >=0.16.0,<0.17.0",
3636
]
3737
docs = [
3838
"sphinx",

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from anyio import Event, create_task_group
1111
from hypercorn import Config
1212
from hypercorn.asyncio import serve
13-
from pycrdt_websocket import ASGIServer, WebsocketServer
13+
from pycrdt.websocket import ASGIServer, WebsocketServer
1414
from utils import ensure_server_running
1515

1616
# workaround until these PRs are merged:

tests/test_pycrdt_yjs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
import pytest
88
from anyio import Event, create_task_group, move_on_after
99
from httpx_ws import aconnect_ws
10-
from pycrdt import Doc, Map
11-
from pycrdt_websocket import WebsocketProvider
10+
from pycrdt import Doc, Map, Provider
1211
from utils import Websocket
1312

1413
from jupyter_ydoc import YNotebook
@@ -66,7 +65,7 @@ async def test_ypy_yjs_0(yws_server, yjs_client):
6665
ydoc = Doc()
6766
ynotebook = YNotebook(ydoc)
6867
room_name = "my-roomname"
69-
async with aconnect_ws(f"http://localhost:{port}/{room_name}") as websocket, WebsocketProvider(
68+
async with aconnect_ws(f"http://localhost:{port}/{room_name}") as websocket, Provider(
7069
ydoc, Websocket(websocket, room_name)
7170
):
7271
nb = stringify_source(json.loads((files_dir / "nb0.ipynb").read_text()))
@@ -86,7 +85,7 @@ async def test_ypy_yjs_1(yws_server, yjs_client):
8685
nb = stringify_source(json.loads((files_dir / "nb1.ipynb").read_text()))
8786
ynotebook.source = nb
8887
room_name = "my-roomname"
89-
async with aconnect_ws(f"http://localhost:{port}/{room_name}") as websocket, WebsocketProvider(
88+
async with aconnect_ws(f"http://localhost:{port}/{room_name}") as websocket, Provider(
9089
ydoc, Websocket(websocket, room_name)
9190
):
9291
output_text = ynotebook.ycells[0]["outputs"][0]["text"]

0 commit comments

Comments
 (0)