turborepo
03f4f548 - chore: Extract `turborepo-daemon` crate from `turborepo-lib` (#11322)

Commit
59 days ago
chore: Extract `turborepo-daemon` crate from `turborepo-lib` (#11322) ## Summary Extract the daemon module (~2,740 lines) into a standalone `turborepo-daemon` crate. This continues the `turborepo-lib` modularization effort. ## Design The daemon now uses a trait-based abstraction for `PackageChangesWatcher`: - Defined `PackageChangesWatcher` trait in turborepo-daemon - `TurboGrpcService` accepts a factory function to create watchers - turborepo-lib implements the trait and provides the factory This allows the daemon crate to be independent of `turbo_json` while turborepo-lib provides the concrete implementation that depends on turbo_json. ```rust // In turborepo-daemon pub trait PackageChangesWatcher: Send + Sync { fn package_changes(&self) -> impl Future<Output = broadcast::Receiver<PackageChangeEvent>> + Send; } // In turborepo-lib impl PackageChangesWatcher for PackageChangesWatcher { ... } ```
Author
Parents
Loading