feat: Support generation of root package in monorepo#687
Conversation
…ect-builder-cli to package.json root
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 6a59b5c The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Caution Review failedThe pull request is closed. WalkthroughAdds support for generating monorepo root configuration including pnpm-workspace and Turbo task files. Refactors package/app modeling from AppEntry to PackageEntry types, introduces a compiler hierarchy (PackageCompiler, AppCompiler, RootPackageCompiler), and threads ProjectInfo (combining project metadata with CLI version) throughout service and schema-parser layers. Updates example projects and CLI project discovery accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant ProjectDiscovery
participant BuilderServiceMgr
participant BuilderService
participant CompilePackages
participant Compilers as Compilers<br/>(Root/App)
participant Generators
participant Sync
User->>CLI: Invoke project command
CLI->>ProjectDiscovery: Discover projects
ProjectDiscovery->>ProjectDiscovery: Load ProjectInfo<br/>(id, name, directory,<br/>isInternalExample)
ProjectDiscovery-->>CLI: ProjectInfo[]
User->>CLI: Trigger build/sync
CLI->>BuilderServiceMgr: Initialize with projects
BuilderServiceMgr->>BuilderService: Create service per ProjectInfo
BuilderService->>BuilderService: Store project, cliVersion
BuilderServiceMgr-->>CLI: Services ready
User->>CLI: Generate monorepo
CLI->>CompilePackages: Compile all packages
CompilePackages->>RootPackageCompiler: Compile root
RootPackageCompiler->>Generators: Generate pnpm-workspace,<br/>turbo, root-README
Generators-->>RootPackageCompiler: Generator bundles
CompilePackages->>AppCompilers: Compile app packages
AppCompilers->>Generators: Generate app configs
Generators-->>AppCompilers: App bundles
CompilePackages-->>CLI: PackageEntry[] with<br/>root + apps
CLI->>Sync: Sync generated outputs
Sync->>Sync: Apply 3-way merge<br/>(JSON + YAML support)
Sync-->>CLI: Files written
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas requiring extra attention:
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
⛔ Files ignored due to path filters (47)
📒 Files selected for processing (121)
Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes