Merge contrib: app.close() timeout from an outside contributor #38

Merged
chrnx merged 3 commits from contrib into develop 2026-08-12 19:03:24 +00:00
Owner

Carries the external contribution from the GitHub mirror.

fix: add timeout to app.close() by @YxnnXriel closes #11 (GitHub Expressive-Tea/green-tea#14). app.close() now takes { timeoutMs }, defaults to 10 seconds, warns and force-closes whatever is still open when the deadline passes, and warns instead when there is no listen()ed server to wait on, which is the Deno and Bun case.

The second commit is mine: his test landed one line below the closing brace of describe('graceful shutdown'), so it ran at the top level. Placement only, assertions untouched.

Verified on the merged tree rather than on the CI badge: complexity, typecheck, lint, prettier all clean, 362 tests passing. Reverting the src/ changes and re-running his test alone makes it die on a 5s timeout, so it genuinely holds #11 closed.

Three follow-ups filed on GitHub rather than held against the PR: docs still describe the old close() signature, the 10s default should be settable at createApp level, and finish() reads timer above its declaration.

Carries the external contribution from the GitHub mirror. `fix: add timeout to app.close()` by @YxnnXriel closes #11 (GitHub Expressive-Tea/green-tea#14). `app.close()` now takes `{ timeoutMs }`, defaults to 10 seconds, warns and force-closes whatever is still open when the deadline passes, and warns instead when there is no listen()ed server to wait on, which is the Deno and Bun case. The second commit is mine: his test landed one line below the closing brace of `describe('graceful shutdown')`, so it ran at the top level. Placement only, assertions untouched. Verified on the merged tree rather than on the CI badge: complexity, typecheck, lint, prettier all clean, 362 tests passing. Reverting the `src/` changes and re-running his test alone makes it die on a 5s timeout, so it genuinely holds #11 closed. Three follow-ups filed on GitHub rather than held against the PR: docs still describe the old `close()` signature, the 10s default should be settable at `createApp` level, and `finish()` reads `timer` above its declaration.
chrnx added 3 commits 2026-08-12 19:02:22 +00:00
Merge pull request 'release: promote the contributor-facing docs and CI gates to main' (#37) from develop into main
Promote → GitHub / push-github (push) Successful in 7s
CI / dco (push) Has been skipped
CI / build (push) Successful in 34s
7518a5a785
Signed-off-by: YxnnXriel <yannariel13@gmail.com>
chore(test): nest the close({ timeoutMs }) case inside its describe block
CI / dco (push) Has been skipped
CI / dco (pull_request) Successful in 4s
CI / build (push) Successful in 35s
CI / build (pull_request) Successful in 34s
9d95260706
The test landed one line below the closing brace of describe('graceful
shutdown'), so it ran at the top level instead of under the block it
belongs to. Placement only; the assertions are untouched.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx merged commit 2e4712788b into develop 2026-08-12 19:03:24 +00:00
Sign in to join this conversation.