Skip to content

Comments

[pull] main from cloudflare:main#104

Merged
pull[bot] merged 7 commits intocode:mainfrom
cloudflare:main
Feb 9, 2026
Merged

[pull] main from cloudflare:main#104
pull[bot] merged 7 commits intocode:mainfrom
cloudflare:main

Conversation

@pull
Copy link

@pull pull bot commented Feb 9, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

threepointone and others added 7 commits February 9, 2026 02:49
Pass `cors: true` for permissive defaults or `cors: { ...headers }` for custom CORS headers. Preflight (OPTIONS) requests are handled automatically for matched routes, and CORS headers are appended to all non-WebSocket responses — including responses returned by `onBeforeRequest`.
Fix a bug where reconnect() could not start a new connection after maxRetries was exhausted because _connectLock was not released in _connect(). Set _connectLock = false on the early return when max retries are reached. Added a test (reconnecting.test.ts) that reproduces the issue and verifies reconnect() works after retries are exhausted, and included a changeset entry documenting the patch.
Add tests for a hibernating server that verify setName/onStart initialization behavior: onStart runs before processing connections, runs only once with concurrent connections/requests, and that websocket messages work after initialization. Implement HibernatingOnStartServer (hibernate: true) with a delayed onStart that increments a counter, plus onConnect/onMessage/onRequest handlers that expose the counter. Update tests/worker imports and wrangler.toml to register the new Durable Object binding and include it in migrations.
Introduce an AlarmServer Durable Object and test to verify that alarms initialize the DO and call onAlarm without redundant blockConcurrencyWhile. Changes: add AlarmServer class (hibernate:true) with counter and alarmCount, implement onStart/onAlarm/onRequest; export AlarmServer in the test Env; import runDurableObjectAlarm and add a test that schedules an alarm, triggers it via runDurableObjectAlarm, and asserts onStart and alarmCount behavior; register AlarmServer in wrangler.jsonc. This ensures alarm-triggered initialization works as expected.
@pull pull bot locked and limited conversation to collaborators Feb 9, 2026
@pull pull bot added the ⤵️ pull label Feb 9, 2026
@pull pull bot merged commit 2c8ab5f into code:main Feb 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants