Skip to content

Commit 2f10c0f

Browse files
committed
Fix missing adapter in test configs and add broadcast channel flag
- Add adapter to makeBaseConfig in pyodide config-cli test - Add adapter-web dependency to pyodide and python runtime agent packages - Add makeInMemoryAdapter to python runtime agent dummy config - Add --unstable-broadcast-channel flag to all test tasks - This fixes CI type checking and runtime errors with in-memory adapter
1 parent 9c34707 commit 2f10c0f

File tree

6 files changed

+18
-21
lines changed

6 files changed

+18
-21
lines changed

deno.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
},
3030
"lock": false,
3131
"tasks": {
32-
"test": "DENO_TESTING=true RUNT_LOG_LEVEL=ERROR RUNT_DISABLE_CONSOLE_LOGS=true deno test --allow-all --reporter=dot",
33-
"test:watch": "DENO_TESTING=true deno test --allow-all --watch",
34-
"test:coverage": "DENO_TESTING=true deno test --allow-all --coverage=cov/ --reporter=dot && deno coverage --lcov cov/ > cov.lcov",
32+
"test": "DENO_TESTING=true RUNT_LOG_LEVEL=ERROR RUNT_DISABLE_CONSOLE_LOGS=true deno test --allow-all --unstable-broadcast-channel --reporter=dot",
33+
"test:watch": "DENO_TESTING=true deno test --allow-all --unstable-broadcast-channel --watch",
34+
"test:coverage": "DENO_TESTING=true deno test --allow-all --unstable-broadcast-channel --coverage=cov/ --reporter=dot && deno coverage --lcov cov/ > cov.lcov",
3535
"check": "deno check $(find packages -name '*.ts' -not -path '*/tui/*' | tr '\n' ' ')",
3636
"check:tui": "deno check $(find packages/tui -name '*.ts' -o -name '*.tsx' | tr '\n' ' ') --config packages/tui/deno.json",
3737
"fmt": "deno fmt",

packages/lib/deno.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
},
2929
"tasks": {
3030
"dev": "deno run --allow-net --allow-env examples/echo-agent.ts",
31-
"test": "deno test --allow-net --allow-env --allow-read --allow-sys",
32-
"test:unit": "deno test --allow-net --allow-env --allow-read --allow-sys src/",
33-
"test:integration": "deno test --allow-net --allow-env --allow-read --allow-sys test/",
34-
"test:watch": "deno test --allow-net --allow-env --allow-read --allow-sys --watch",
35-
"test:summary": "echo '🧪 Running @runt/lib test suite...' && deno test --allow-net --allow-env --allow-read --allow-sys --reporter=pretty && echo '✅ All tests completed!'",
31+
"test": "deno test --allow-net --allow-env --allow-read --allow-sys --unstable-broadcast-channel",
32+
"test:unit": "deno test --allow-net --allow-env --allow-read --allow-sys --unstable-broadcast-channel src/",
33+
"test:integration": "deno test --allow-net --allow-env --allow-read --allow-sys --unstable-broadcast-channel test/",
34+
"test:watch": "deno test --allow-net --allow-env --allow-read --allow-sys --unstable-broadcast-channel --watch",
35+
"test:summary": "echo '🧪 Running @runt/lib test suite...' && deno test --allow-net --allow-env --allow-read --allow-sys --unstable-broadcast-channel --reporter=pretty && echo '✅ All tests completed!'",
3636
"check": "deno check mod.ts src/*.ts examples/*.ts",
3737
"fmt": "deno fmt",
3838
"lint": "deno lint"

packages/pyodide-runtime-agent/deno.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@std/cli": "jsr:@std/cli@^1.0.0",
2323
"npm:@livestore/livestore": "npm:@livestore/livestore@^0.3.1",
2424
"npm:@livestore/adapter-node": "npm:@livestore/adapter-node@^0.3.1",
25+
"npm:@livestore/adapter-web": "npm:@livestore/adapter-web@^0.3.1",
2526
"npm:@livestore/sync-cf": "npm:@livestore/sync-cf@^0.3.1",
2627
"npm:strip-ansi": "npm:strip-ansi@^7.1.0"
2728
},

packages/pyodide-runtime-agent/test/config-cli.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
createBaseRuntimeConfig,
77
parseBaseRuntimeArgs,
88
} from "../src/config-cli.ts";
9+
import { makeInMemoryAdapter } from "npm:@livestore/adapter-web";
910

1011
const REQUIRED_PARAMS = ["--notebook", "test-nb", "--auth-token", "test-token"];
1112

@@ -21,6 +22,7 @@ function makeBaseConfig(overrides: Partial<Record<string, unknown>> = {}) {
2122
authToken: "test-token",
2223
notebookId: "test-nb",
2324
clientId: "test-client",
25+
adapter: makeInMemoryAdapter({}),
2426
capabilities: {
2527
canExecuteCode: true,
2628
canExecuteSql: false,

packages/python-runtime-agent/deno.json

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
},
1616
"imports": {
1717
"@runt/lib": "jsr:@runt/lib@^0.11.1",
18-
"@runt/schema": "jsr:@runt/schema@^0.11.1"
18+
"@runt/schema": "jsr:@runt/schema@^0.11.1",
19+
"npm:@livestore/adapter-web": "npm:@livestore/adapter-web@^0.3.1"
1920
},
2021
"tasks": {
2122
"test": "deno test --allow-all",
@@ -39,20 +40,11 @@
3940
},
4041
"lint": {
4142
"rules": {
42-
"tags": [
43-
"recommended"
44-
]
43+
"tags": ["recommended"]
4544
}
4645
},
4746
"publish": {
48-
"include": [
49-
"mod.ts",
50-
"src/",
51-
"README.md"
52-
],
53-
"exclude": [
54-
"**/*.test.ts",
55-
"**/test_*.ts"
56-
]
47+
"include": ["mod.ts", "src/", "README.md"],
48+
"exclude": ["**/*.test.ts", "**/test_*.ts"]
5749
}
5850
}

packages/python-runtime-agent/src/python-runtime-agent.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { RuntimeAgent, RuntimeConfig } from "@runt/lib";
2+
import { makeInMemoryAdapter } from "npm:@livestore/adapter-web";
23

34
export class PythonRuntimeAgent extends RuntimeAgent {
45
constructor(_args: string[] = Deno.args) {
@@ -15,6 +16,7 @@ export class PythonRuntimeAgent extends RuntimeAgent {
1516
canExecuteAi: false,
1617
},
1718
clientId: "dummy",
19+
adapter: makeInMemoryAdapter({}),
1820
});
1921

2022
super(dummyConfig, dummyConfig.capabilities, {});

0 commit comments

Comments
 (0)