Skip to content

Watch/dev mode doesn’t queue builds #541

@drwpow

Description

@drwpow

Versions

  • @terrazzo/cli: *

Node.js version

24

OS + version

macOS 15

Description

When running in watch/dev mode (tz build --watch), if updates come in too quickly, the previous build won’t have time to finish. This means plugins will be called out-of-order, or in some scenarios the output could be incorrect.

Reproduction

N/A

Expected result

To solve this, we should have a “lock” where it’s aware of whether or not a build is in progress. And while locked, incoming requests are held onto, to execute when finished. But if multiple requests come in while locked, all are discarded except for the most recent (i.e. debounced).

Extra

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions