tailwindcss/packages/@tailwindcss-cli
Michael Glass 5302f308fc
Drain the queue on shutdown instead of tracking watcher swaps
Tracking the swap promise was the wrong shape. It could always be read at a
moment when the in-flight rebuild had not assigned its swap yet, so shutdown
saw the old one settle, closed the queue, and dropped whatever the later
generation flushed. Each fix narrowed that window without closing it.

A full rebuild runs inside the queue, so the queue already knows when one is in
flight — including a rebuild that has not yet replaced its watchers. Add
`drain()`, wait for it before tearing the watchers down, and close only after
their flush has landed.

That removes the swap bookkeeping entirely.

Both orderings are pinned: cleanup must not run while a rebuild is in flight,
and what the watchers flush on the way out must still be processed. Against
no-drain the cleanup runs early; against closing first the flush is ignored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lcj4iQ3fBxMwAu2rf4zLbC
2026-08-31 16:26:20 +02:00
..
src Drain the queue on shutdown instead of tracking watcher swaps 2026-08-31 16:26:20 +02:00
package.json Bump dependencies (#20381) 2026-08-04 13:55:03 +02:00
README.md docs: update package README CI badge to main (#19692) 2026-02-18 11:52:07 +01:00
tsconfig.json Move the CLI to its own package @tailwindcss/cli (#13095) 2024-03-06 05:41:12 -05:00
tsup.config.ts Resolve @import in core (#14446) 2024-09-23 17:05:55 +02:00

Tailwind CSS

A utility-first CSS framework for rapidly building custom user interfaces.

Build Status Total Downloads Latest Release License


Documentation

For full documentation, visit tailwindcss.com.

Community

For help, discussion about best practices, or feature ideas:

Discuss Tailwind CSS on GitHub

Contributing

If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.