-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add ability to diff generation and force overwrite files with generation #614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add ability to diff generation and force overwrite files with generation #614
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 2d7e723 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 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 |
WalkthroughThis change introduces support for Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant Server
participant FS as Filesystem
User->>CLI: baseplate sync --force-overwrite
CLI->>Server: syncProject({forceOverwrite: true})
Server->>FS: Load .baseplateignore (if present)
Server->>FS: For each file:
alt File matches ignore patterns
Server->>FS: Skip overwriting
else File not ignored
Server->>FS: Overwrite file without merge
end
Server-->>CLI: Sync result
CLI-->>User: Output sync status
sequenceDiagram
participant User
participant CLI
participant Server
participant FS as Filesystem
User->>CLI: baseplate diff [--no-ignore-file]
CLI->>Server: diffProject({useIgnoreFile: !--no-ignore-file})
alt useIgnoreFile == true
Server->>FS: Load .baseplateignore per app directory
Server->>FS: Filter files using ignore patterns
else
Server->>FS: Diff all files
end
Server-->>CLI: Diff summary
CLI-->>User: Output diff result
Possibly related PRs
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.changeset/add-baseplateignore-support.md (1)
13-13: Fix escape character in pattern example.The backslash before the asterisk should be removed as it's not needed in changeset documentation.
-- Includes sensible default patterns (.env, \*.log, node_modules/, dist/, build/, .DS_Store, Thumbs.db) +- Includes sensible default patterns (.env, *.log, node_modules/, dist/, build/, .DS_Store, Thumbs.db)packages/sync/src/utils/ignore-patterns.unit.test.ts (1)
8-16: Redundant vol.reset() calls in beforeEach and afterEach.Both hooks call
vol.reset(), which is redundant sinceafterEachcleanup would be sufficient.beforeEach(() => { - vol.reset(); });
Summary by CodeRabbit
New Features
.baseplateignorefile to exclude files and directories from diff and sync operations using gitignore-style patterns.--no-ignore-fileflag for the diff command to disable ignore pattern filtering.--force-overwriteflag for the sync command to enable direct overwriting of files while respecting ignore patterns.buildcommand with a newsynccommand for project synchronization.Improvements
Bug Fixes
.baseplateignoreis missing or unreadable.Tests
Chores
ignorepackage.