Skip to content

fix(pkg): pass workspace patterns from config to MonorepoDetector - #123

Merged
miguelramos merged 1 commit into
mainfrom
fix/MONOREPO-DETECTOR
Jan 9, 2026
Merged

fix(pkg): pass workspace patterns from config to MonorepoDetector#123
miguelramos merged 1 commit into
mainfrom
fix/MONOREPO-DETECTOR

Conversation

@miguelramos

Copy link
Copy Markdown
Member

The CLI was failing to find packages in directories like 'playground/' despite being configured in repo.config.toml with patterns = ["packages/", "playground/*"].

Root cause: MonorepoDetector was being created with default configuration instead of using the workspace patterns from repo.config.toml.

Changes:

  • Add build_monorepo_config() to VersionResolver to merge workspace patterns from PackageToolsConfig into MonorepoConfig
  • Update detect_monorepo() and discover_monorepo_packages() to use MonorepoDetector::with_filesystem_and_config()
  • Add new_with_config() and with_filesystem_and_config() constructors to PackageMapper for passing config with workspace patterns
  • Add new_with_config() to PackageDetector for config-aware detection
  • Add full_config field to ChangesetManager to store complete config
  • Update ChangesAnalyzer to use PackageMapper::with_filesystem_and_config()
  • Update detect_affected_packages() in CLI to pass config parameter

Also fixes:

  • Pre-existing large_futures clippy warning in dispatch.rs
  • Add #[allow(clippy::large_futures)] to audit test modules
  • Fix field_reassign_with_default warnings in changeset tests

BREAKING CHANGE: ChangesetManager::with_storage() now requires PackageToolsConfig instead of ChangesetConfig

The CLI was failing to find packages in directories like 'playground/*'
despite being configured in repo.config.toml with patterns =
["packages/*", "playground/*"].

Root cause: MonorepoDetector was being created with default configuration
instead of using the workspace patterns from repo.config.toml.

Changes:
- Add build_monorepo_config() to VersionResolver to merge workspace
  patterns from PackageToolsConfig into MonorepoConfig
- Update detect_monorepo() and discover_monorepo_packages() to use
  MonorepoDetector::with_filesystem_and_config()
- Add new_with_config() and with_filesystem_and_config() constructors
  to PackageMapper for passing config with workspace patterns
- Add new_with_config() to PackageDetector for config-aware detection
- Add full_config field to ChangesetManager to store complete config
- Update ChangesAnalyzer to use PackageMapper::with_filesystem_and_config()
- Update detect_affected_packages() in CLI to pass config parameter

Also fixes:
- Pre-existing large_futures clippy warning in dispatch.rs
- Add #[allow(clippy::large_futures)] to audit test modules
- Fix field_reassign_with_default warnings in changeset tests

BREAKING CHANGE: ChangesetManager::with_storage() now requires
PackageToolsConfig instead of ChangesetConfig
@miguelramos miguelramos self-assigned this Jan 9, 2026
@miguelramos
miguelramos merged commit ad8a4bd into main Jan 9, 2026
10 checks passed
@miguelramos
miguelramos deleted the fix/MONOREPO-DETECTOR branch January 9, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 TYPE: Bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant