Skip to content

Commit 0431de4

Browse files
authored
Merge pull request #310 from spoo-me/chore/dep-bumps
chore(deps): upgrade python and edge toolchain dependencies
2 parents 781b614 + a54f777 commit 0431de4

11 files changed

Lines changed: 3845 additions & 4063 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ updates:
1515
patterns:
1616
- "*"
1717
open-pull-requests-limit: 5
18+
ignore:
19+
# redis-py 8.x is blocked for now (see pyproject.toml pin).
20+
- dependency-name: "redis"
21+
versions: [">=8"]
1822

1923
- package-ecosystem: "docker"
2024
directory: "/"

edge/spoo-edge-cache/package-lock.json

Lines changed: 2107 additions & 2824 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

edge/spoo-edge-cache/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
"check": "wrangler types --check --strict-vars=false && tsc --noEmit && vitest run"
1313
},
1414
"devDependencies": {
15-
"@cloudflare/vitest-pool-workers": "^0.9.12",
15+
"@cloudflare/vitest-pool-workers": "^0.22.0",
16+
"msw": "^2.15.0",
1617
"typescript": "^5.9.0",
17-
"vitest": "^3.2.0",
18-
"wrangler": "^4.30.0"
18+
"vitest": "^4.1.11",
19+
"wrangler": "^4.124.0"
1920
}
2021
}

edge/spoo-edge-cache/test/index.spec.ts

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import {
22
createExecutionContext,
33
env,
4-
fetchMock,
54
waitOnExecutionContext,
65
} from "cloudflare:test";
7-
import { afterEach, beforeAll, describe, expect, it } from "vitest";
6+
import { HttpResponse, http } from "msw";
7+
import { setupServer } from "msw/node";
8+
import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest";
89

910
import fixtures from "../contract/fixtures.json";
1011
import worker, { lookupKey } from "../src/index";
1112

12-
beforeAll(() => {
13-
fetchMock.activate();
14-
fetchMock.disableNetConnect();
15-
});
16-
afterEach(() => fetchMock.assertNoPendingInterceptors());
13+
// onUnhandledRequest: "error" is the disableNetConnect() of MSW — any
14+
// outbound fetch a test didn't arm via expectOriginFetch fails loudly.
15+
const server = setupServer();
16+
beforeAll(() => server.listen({ onUnhandledRequest: "error" }));
17+
afterEach(() => server.resetHandlers());
18+
afterAll(() => server.close());
1719

1820
/** Stub the next passthrough to origin and tag it so tests can assert
1921
* "this request reached origin" unambiguously. */
@@ -22,7 +24,21 @@ function expectOriginFetch(
2224
path: string | RegExp = /.*/,
2325
method = "GET",
2426
) {
25-
fetchMock.get(host).intercept({ path, method }).reply(200, "origin-served");
27+
server.use(
28+
http.all(
29+
`${host}/*`,
30+
({ request }) => {
31+
const url = new URL(request.url);
32+
const pathMatches =
33+
typeof path === "string"
34+
? url.pathname === path
35+
: path.test(url.pathname);
36+
if (request.method !== method || !pathMatches) return undefined;
37+
return HttpResponse.text("origin-served");
38+
},
39+
{ once: true },
40+
),
41+
);
2642
}
2743

2844
// The handler is typed for edge-ingress requests (IncomingRequestCfProperties);

edge/spoo-edge-cache/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"module": "es2022",
55
"moduleResolution": "bundler",
66
"lib": ["es2022"],
7-
"types": ["@cloudflare/vitest-pool-workers"],
7+
"types": ["@cloudflare/vitest-pool-workers/types"],
88
"strict": true,
99
"noEmit": true,
1010
"skipLibCheck": true,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { cloudflareTest } from "@cloudflare/vitest-pool-workers";
2+
import { defineConfig } from "vitest/config";
3+
4+
// Tests run inside actual workerd with the KV binding simulated from
5+
// wrangler.jsonc — the closest thing to production short of a PoP.
6+
export default defineConfig({
7+
plugins: [
8+
cloudflareTest({
9+
wrangler: { configPath: "./wrangler.jsonc" },
10+
// A developer's .dev.vars (ORIGIN_OVERRIDE for `wrangler dev`)
11+
// must not leak into tests — passthrough behavior is under test
12+
// and expects the plain fetch(request) path.
13+
miniflare: { bindings: { ORIGIN_OVERRIDE: "" } },
14+
}),
15+
],
16+
});

edge/spoo-edge-cache/vitest.config.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

edge/spoo-edge-cache/worker-configuration.d.ts

Lines changed: 444 additions & 220 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ dependencies = [
2323
"pymongo>=4.13.0",
2424
"python-dotenv>=1.1.0",
2525
"python-multipart>=0.0.20",
26-
"redis>=6.2.0",
26+
# redis-py 8.x is blocked for now — keep the client on 7.x.
27+
"redis>=6.2.0,<8",
2728
"regex>=2026.1.15",
2829
"sentry-sdk>=2.44.0",
2930
"slowapi>=0.1.9",

requirements.txt

Lines changed: 27 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,75 @@
11
aiohappyeyeballs==2.7.1
2-
aiohttp==3.14.1
2+
aiohttp==3.14.3
33
aiosignal==1.4.0
4-
annotated-doc==0.0.4
5-
annotated-types==0.7.0
6-
anyio==4.14.1
4+
annotated-doc==0.0.5
5+
annotated-types==0.8.0
6+
anyio==4.14.2
77
argon2-cffi==25.1.0
88
argon2-cffi-bindings==25.1.0
99
attrs==26.1.0
1010
authlib==1.7.2
11-
certifi==2026.6.17
12-
cffi==2.0.0
13-
cfgv==3.5.0
14-
charset-normalizer==3.4.7
11+
certifi==2026.7.22
12+
cffi==2.1.1
13+
charset-normalizer==3.5.1
1514
click==8.4.2
16-
coverage==7.15.0
17-
crawlerdetect==0.3.2
18-
cryptography==49.0.0
15+
crawlerdetect==0.4.2
16+
cryptography==50.0.0
1917
deprecated==1.3.1
2018
dicttoxml==1.7.16
21-
distlib==0.4.3
2219
dnspython==2.8.0
2320
email-validator==2.3.0
2421
emoji==2.15.0
2522
et-xmlfile==2.0.0
26-
execnet==2.1.2
2723
fast-depends==3.0.8
28-
fastapi==0.139.0
29-
faststream==0.7.1
30-
filelock==3.29.5
24+
fastapi==0.141.1
25+
faststream==0.7.4
26+
filelock==3.32.3
3127
frozenlist==1.8.0
32-
geoip2==5.2.0
28+
geoip2==5.3.0
3329
h11==0.16.0
3430
httpcore==1.0.9
3531
httptools==0.8.0
3632
httpx==0.28.1
37-
identify==2.6.19
38-
idna==3.18
39-
iniconfig==2.3.0
33+
idna==3.19
4034
itsdangerous==2.2.0
4135
jinja2==3.1.6
42-
joserfc==1.7.2
36+
joserfc==1.7.4
4337
limits==5.8.0
44-
markdown-it-py==4.2.0
4538
markupsafe==3.0.3
4639
maxminddb==3.1.1
47-
mdurl==0.1.2
4840
multidict==6.7.1
49-
nodeenv==1.10.0
5041
openpyxl==3.1.5
51-
outcome==1.3.0.post0
52-
packaging==26.2
53-
platformdirs==4.10.0
54-
pluggy==1.6.0
55-
pprintpp==0.4.0
56-
pre-commit==4.6.0
42+
packaging==26.3
5743
propcache==0.5.2
5844
pycountry==26.2.16
5945
pycparser==3.0
6046
pydantic==2.13.4
6147
pydantic-core==2.46.4
62-
pydantic-settings==2.14.2
63-
pygments==2.20.0
48+
pydantic-settings==2.15.0
6449
pyjwt==2.13.0
6550
pymongo==4.17.0
66-
pytest==9.1.1
67-
pytest-asyncio==1.4.0
68-
pytest-clarity==1.0.1
69-
pytest-cov==7.1.0
70-
pytest-mock==3.15.1
71-
pytest-randomly==4.1.0
72-
pytest-sugar==1.1.1
73-
pytest-xdist==3.8.0
74-
python-discovery==1.4.3
75-
python-dotenv==1.2.2
51+
python-dotenv==1.2.3
7652
python-multipart==0.0.32
7753
pyyaml==6.0.3
7854
redis==7.4.1
79-
regex==2026.6.28
55+
regex==2026.7.19
8056
requests==2.34.2
8157
requests-file==3.0.1
82-
rich==15.0.0
83-
ruff==0.15.20
84-
sentry-sdk==2.64.0
58+
sentry-sdk==2.68.0
8559
slowapi==0.1.10
86-
sniffio==1.3.1
87-
sortedcontainers==2.4.0
88-
starlette==1.3.1
60+
starlette==1.6.0
8961
structlog==26.1.0
90-
termcolor==3.3.0
91-
tldextract==5.3.1
92-
trio==0.33.0
62+
tldextract==5.3.2
9363
typing-extensions==4.16.0
94-
typing-inspection==0.4.2
64+
typing-inspection==0.4.4
9565
ua-parser==1.0.2
9666
ua-parser-builtins==202606
9767
ua-parser-rs==0.1.5
9868
urllib3==2.7.0
99-
uv==0.11.26
100-
uvicorn==0.49.0
69+
uvicorn==0.52.4
10170
uvloop==0.22.1
10271
validators==0.35.0
103-
virtualenv==21.5.1
10472
watchfiles==1.2.0
105-
websockets==16.0
106-
wrapt==2.2.2
107-
yarl==1.24.2
73+
websockets==17.0.1
74+
wrapt==2.3.0
75+
yarl==1.24.5

0 commit comments

Comments
 (0)