Conversation
|
Warning Rate limit exceeded@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 24 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughAdds SWC migration tooling and transpiler validation. Introduces SwcMigrator class with rake tasks to migrate from Babel to SWC and clean Babel artifacts. Updates installer messaging and version fallback in template. Adds configuration-time validation to warn on mismatches between configured transpiler and installed packages. Includes comprehensive tests for migrator behavior. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant Rake as Rake Task (shakapacker:migrate_to_swc)
participant Mig as SwcMigrator
participant PJ as package.json
participant CFG as config/shakapacker.yml
participant SWCRC as .swcrc
participant PM as Package Manager
Dev->>Rake: Invoke task
Rake->>Mig: migrate_to_swc(run_installer: true)
Mig->>CFG: Update transpiler to swc
Mig->>PJ: Add SWC devDependencies (if missing)
Mig->>SWCRC: Create default .swcrc (if absent)
Mig->>PJ: Detect Babel packages
alt Babel packages found
Mig->>Dev: Log cleanup guidance
end
alt run_installer
Mig->>PM: yarn/pnpm/npm install
PM-->>Mig: Install results
end
Mig-->>Rake: Return results hash
Rake-->>Dev: Task completes
sequenceDiagram
autonumber
participant App as App Boot
participant Cfg as Shakapacker::Configuration
participant FS as FS (package.json)
App->>Cfg: javascript_transpiler
Cfg->>Cfg: load configured transpiler
opt Non-test env and not during install
Cfg->>FS: Read package.json (if exists)
alt Parse ok
Cfg->>Cfg: Detect installed Babel/SWC/esbuild
alt Mismatch detected
Cfg->>App: STDERR warning (mismatch)
else Match or unknown
Cfg-->>App: No warning
end
else Parse error or missing
Cfg-->>App: Skip validation
end
end
Cfg-->>App: Return transpiler
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review for PR #613: Improve migration tooling and error handling🎯 SummaryThis PR enhances the Shakapacker migration tooling by adding comprehensive SWC migration support and improving error handling for transpiler configuration mismatches. The changes are well-structured and thoroughly tested. ✅ Strengths
🔍 Code Quality Observations
💡 Suggestions for Improvement
🚀 Performance Considerations
🔒 Security
✔️ Compliance with Project Standards
📊 Overall AssessmentThis is a high-quality PR that significantly improves the developer experience for migrating from Babel to SWC. The code is well-tested, follows best practices, and provides excellent user feedback. The migration tooling is production-ready and will help users achieve significant build performance improvements. Recommendation: ✅ Approve with minor suggestions Great work on addressing the review feedback from PR #603! The implementation is solid and the testing is thorough. |
Code Review for PR #613: Address PR #603 review feedbackThank you for this comprehensive improvement to the Babel to SWC migration tooling! This PR effectively addresses the review feedback from #603. Here's my detailed review: ✅ Strengths
🔍 Minor Suggestions for Improvement
✅ Security Review
✅ Performance Considerations
✅ Best Practices Compliance
📋 Testing VerificationThe test coverage appears comprehensive:
🎯 Overall AssessmentThis is a high-quality PR that successfully addresses all the review feedback from #603. The implementation is robust, well-tested, and provides an excellent developer experience for migrating from Babel to SWC. The error handling and user guidance are particularly noteworthy. Recommendation: ✅ Approve - This PR is ready to merge. The minor suggestions above are non-blocking improvements that could be addressed in a future iteration if desired. Great work on implementing these improvements! The migration tooling will significantly help users adopt SWC's performance benefits while maintaining safety and clarity throughout the process. 🤖 Generated with Claude Code |
Code Review for PR #613: Migration Tooling and Error Handling🎯 Overall AssessmentThis PR successfully addresses the review feedback from #603 with robust migration tooling and improved error handling. The implementation is well-structured, properly tested, and follows the project's conventions. ✅ Strengths
🔍 Code Quality ObservationsPositive:
Minor Suggestions:
🚀 Performance ImpactThe documented 20x performance improvement with SWC is significant. The migration tooling makes it easy for users to realize these gains. 🔒 Security Review
📝 DocumentationThe PR description is comprehensive and the inline logging provides good user guidance. Consider adding a brief migration guide to the main README in a follow-up PR. ✨ Best Practices Compliance
🎉 ConclusionThis is a high-quality PR that significantly improves the migration experience from Babel to SWC. The code is production-ready with only minor suggestions for improvement. The thoughtful error handling and comprehensive testing demonstrate attention to detail. Recommendation: Approve with minor suggestions ✅ Great work addressing all the feedback from #603! The migration tooling will be very helpful for users transitioning to SWC. |
Code Review for PR #613: Address PR #603 review feedbackThank you for this comprehensive PR addressing the feedback from #603! I have thoroughly reviewed the changes and here is my detailed feedback: ✅ Strengths
🔧 Suggestions for Improvement
🐛 Potential Issues
🔒 Security Considerations
📊 Performance ImpactThe migration to SWC provides ~20x performance improvement as documented. The migration tooling itself is efficient with minimal overhead. 💭 Overall AssessmentThis is a high-quality PR that successfully addresses all the review feedback from #603. The code is well-structured, thoroughly tested, and provides excellent user experience for the migration process. The error handling and logging make debugging easy, and the test coverage gives confidence in the implementation. Recommendation: APPROVE with minor suggestions above for consideration. Great work on implementing these improvements! The migration tooling will significantly help users transition from Babel to SWC smoothly. 🎉 🤖 Generated with Claude Code |
Code Review for PR #613: Address PR #603 Review FeedbackOverall AssessmentThis PR provides a comprehensive solution for migrating from Babel to SWC with excellent error handling and test coverage. The implementation addresses the feedback from PR #603 effectively, with particular attention to edge cases and user experience. ✅ Strengths
🔍 Suggestions for Improvement
🔒 Security Considerations✅ No security issues identified
🚀 Performance Impact✅ Excellent performance benefits as documented
✅ Testing Verification
📝 DocumentationConsider adding a MIGRATION.md guide with:
✅ Compliance with CLAUDE.md
Final Verdict: APPROVED ✅This is a high-quality PR that thoroughly addresses the feedback from #603. The migration tooling is robust, well-tested, and user-friendly. The suggestions above are minor enhancements that could be addressed in follow-up PRs if desired. Great work on building a safe and efficient migration path from Babel to SWC! 🤖 Generated with Claude Code |
Code Review for PR #613Thank you for addressing the feedback from PR #603! This is a well-structured implementation of the Babel to SWC migration tooling. Strengths
Code Quality Highlights
Potential Issues
SecurityNo security issues identified - proper path handling and no unsafe operations. Suggestions
Overall AssessmentHigh-quality implementation with thoughtful error handling and user experience. Successfully addresses all PR #603 feedback. Recommendation: Approved ✅ Great work on this implementation! |
Code Review for PR #613: SWC Migration ToolingExcellent work on addressing the review feedback from PR #603! The migration tooling and error handling improvements are well-implemented. Here's my detailed review: ✅ Strengths
🔍 Minor Observations
🎯 Performance & Security
📋 Test Coverage AssessmentThe test coverage is exemplary:
✨ Overall AssessmentThis PR successfully addresses all the review feedback from #603. The migration tooling is production-ready with excellent error handling, comprehensive tests, and a great user experience. The code follows project conventions and maintains high quality throughout. Recommendation: Approved ✅ The implementation is solid and ready for merge. The migration path from Babel to SWC is now smooth and well-supported. 🤖 Generated with Claude Code Co-Authored-By: Claude [email protected] |
Code Review for PR #613: Address PR #603 review feedbackThank you for this comprehensive PR! This is a significant improvement to the migration tooling. Here's my detailed review: ✅ Strengths
🔍 Areas for Improvement
🐛 Potential Issues
💡 Suggestions
🔒 Security✅ No security concerns identified 🎯 Overall AssessmentHigh-quality, production-ready code that significantly improves the Babel to SWC migration experience. Recommended: Approve with suggestions ✅ |
Code Review for PR #613Thank you for addressing the feedback from PR #603! This PR significantly improves the migration tooling and error handling for the Babel to SWC transition. ✅ Strengths
🎯 Code Quality & Best Practices
|
Code Review - PR #613: Address PR #603 review feedbackGreat work addressing the review feedback from PR #603! This PR significantly improves the Babel-to-SWC migration tooling with robust error handling and comprehensive test coverage. Here's my detailed review: ✅ Strengths1. Excellent Error Handling
2. Well-Structured Migration Tooling
3. Outstanding Test Coverage
4. User-Friendly Features
🎯 Suggestions for Improvement1. Configuration Validation Logic
return if ENV["SHAKAPACKER_SKIP_VALIDATION"] # More explicit than NODE_ENV check2. Package Manager Detection Enhancement
def package_manager
return "bun" if root_path.join("bun.lockb").exist?
return "yarn" if root_path.join("yarn.lock").exist?
# ... rest of the logic
end3. Migration Safety Check
task :migrate_to_swc, [:dry_run] do |t, args|
dry_run = args[:dry_run] == "true"
Shakapacker::SwcMigrator.new(Rails.root).migrate_to_swc(dry_run: dry_run)
end
|
…handling - Fix edge case in version handling with fallback to 'latest' - Add clear messaging when dual-installing Babel and SWC packages - Extract migration logic into tested SwcMigrator class - Add comprehensive unit tests (28 examples, all passing) - Add runtime validation for transpiler configuration mismatches - Create rake tasks for SWC migration and Babel cleanup - Improve error handling and recovery in all scenarios 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Move post-migration logic (cleanup recommendations, package install) into SwcMigrator - Add run_installer parameter to control automatic package installation - Add package_manager detection for yarn/pnpm/npm - Simplify rake tasks to one-liners - Add tests for new functionality (33 tests all passing) - Clean separation of concerns 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add suggestion to run 'rails shakapacker:doctor' after migration - This helps users verify their configuration is correct - Doctor command was added in #609 and provides comprehensive checks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
0b0fdf6 to
579579f
Compare
Code Review for PR #613: Address PR #603 review feedbackThank you for this comprehensive PR that improves the migration tooling and error handling for the Babel to SWC transition. The implementation is thorough and addresses the review feedback effectively. ✅ Strengths
🔍 Observations & Suggestions1. Version Handling Edge Case (lib/install/template.rb:195-197)The fallback to "latest" is a good safety measure. However, consider logging a warning when this fallback occurs to help diagnose potential issues. 2. Runtime Validation Skip in Tests (lib/shakapacker/configuration.rb:146)The validation skip for test environment is sensible, but consider using Rails.env.test? instead of checking NODE_ENV for consistency with Rails conventions. 3. Trailing Newlines ConsistencyGood adherence to the projects requirement for trailing newlines in all files ✅ 4. Package Manager DetectionThe package manager detection in SwcMigrator is solid, properly checking for yarn.lock and pnpm-lock.yaml files. 🚨 Minor Issues to Consider
📊 Performance & Security
📝 DocumentationThe inline documentation and user-facing messages are clear and helpful. The migration path is well-explained in the PR description. ✅ Overall AssessmentThis is a high-quality PR that significantly improves the developer experience for migrating from Babel to SWC. The code is well-structured, thoroughly tested, and handles edge cases appropriately. The minor suggestions above are optional improvements that could enhance robustness further. Approved with minor suggestions 👍 The migration tooling will make it much easier for users to adopt SWC and benefit from the substantial performance improvements. Great work on addressing all the review feedback from PR #603! 🤖 Generated with Claude Code |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
lib/install/template.rb(2 hunks)lib/shakapacker/configuration.rb(2 hunks)lib/shakapacker/swc_migrator.rb(1 hunks)lib/tasks/shakapacker/migrate_to_swc.rake(1 hunks)spec/shakapacker/swc_migrator_spec.rb(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
lib/shakapacker/**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
When changing
lib/shakapacker/**/*.rb, run the corresponding spec atspec/shakapacker/**/*_spec.rb
Files:
lib/shakapacker/swc_migrator.rblib/shakapacker/configuration.rb
🧠 Learnings (6)
📚 Learning: 2024-10-09T10:46:03.499Z
Learnt from: marvinthepa
PR: shakacode/shakapacker#520
File: lib/shakapacker/utils/manager.rb:19-19
Timestamp: 2024-10-09T10:46:03.499Z
Learning: In `lib/install/template.rb` of the Shakapacker project, calls to `PackageJson.read` are wrapped inside `Dir.chdir(Rails.root)`, ensuring that `package.json` is read from the Rails root directory.
Applied to files:
lib/shakapacker/swc_migrator.rb
📚 Learning: 2024-10-09T10:46:03.499Z
Learnt from: marvinthepa
PR: shakacode/shakapacker#520
File: lib/shakapacker/utils/manager.rb:19-19
Timestamp: 2024-10-09T10:46:03.499Z
Learning: In the Shakapacker project, within `lib/shakapacker/runner.rb`, `PackageJson.read(app_path)` is used to read `package.json` using the application path, ensuring the correct path is used regardless of the current working directory.
Applied to files:
lib/shakapacker/swc_migrator.rb
📚 Learning: 2025-09-28T02:23:21.827Z
Learnt from: CR
PR: shakacode/shakapacker#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-28T02:23:21.827Z
Learning: Applies to lib/shakapacker/**/*.rb : When changing `lib/shakapacker/**/*.rb`, run the corresponding spec at `spec/shakapacker/**/*_spec.rb`
Applied to files:
lib/tasks/shakapacker/migrate_to_swc.rakespec/shakapacker/swc_migrator_spec.rb
📚 Learning: 2024-10-09T10:50:16.512Z
Learnt from: marvinthepa
PR: shakacode/shakapacker#520
File: spec/shakapacker/utils_manager_spec.rb:104-116
Timestamp: 2024-10-09T10:50:16.512Z
Learning: In `spec/shakapacker/utils_manager_spec.rb`, `error_unless_package_manager_is_obvious` is not a test method, so extracting into a shared context may not be helpful.
Applied to files:
spec/shakapacker/swc_migrator_spec.rb
📚 Learning: 2024-10-09T10:47:17.620Z
Learnt from: marvinthepa
PR: shakacode/shakapacker#520
File: spec/shakapacker/utils_manager_spec.rb:68-89
Timestamp: 2024-10-09T10:47:17.620Z
Learning: In `spec/shakapacker/utils_manager_spec.rb`, the code within the context `"when lockfile is in Rails.root, but pwd is different"` is not duplicated for each package manager.
Applied to files:
spec/shakapacker/swc_migrator_spec.rb
📚 Learning: 2025-09-28T02:23:21.827Z
Learnt from: CR
PR: shakacode/shakapacker#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-28T02:23:21.827Z
Learning: Test changes with both bundlers (webpack and rspack) when modifying core functionality
Applied to files:
spec/shakapacker/swc_migrator_spec.rb
🧬 Code graph analysis (2)
lib/shakapacker/swc_migrator.rb (1)
lib/shakapacker/runner.rb (1)
package_json(75-77)
spec/shakapacker/swc_migrator_spec.rb (1)
lib/shakapacker/swc_migrator.rb (3)
migrate_to_swc(56-90)clean_babel_packages(92-112)find_babel_packages(114-130)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
- GitHub Check: Testing (ubuntu-latest, 2.7, gemfiles/Gemfile-rails.7.0.x)
- GitHub Check: Testing (ubuntu-latest, 2.7, gemfiles/Gemfile-rails.6.1.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.3, gemfiles/Gemfile-rails.7.0.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.4, gemfiles/Gemfile-rails.7.1.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.4, gemfiles/Gemfile-rails.7.2.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.2, gemfiles/Gemfile-rails.7.1.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.2, gemfiles/Gemfile-rails.8.0.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.3, gemfiles/Gemfile-rails.8.0.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.3, gemfiles/Gemfile-rails.7.1.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.2, gemfiles/Gemfile-rails.7.0.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.2, gemfiles/Gemfile-rails.7.2.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.3, gemfiles/Gemfile-rails.7.2.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.0, gemfiles/Gemfile-rails.7.1.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.1, gemfiles/Gemfile-rails.7.2.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.1, gemfiles/Gemfile-rails.7.0.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.1, gemfiles/Gemfile-rails.7.1.x)
- GitHub Check: Generator specs (ubuntu-latest, 2.7, gemfiles/Gemfile-rails.7.0.x)
- GitHub Check: Generator specs (ubuntu-latest, 2.7, gemfiles/Gemfile-rails.7.1.x)
- GitHub Check: Generator specs (ubuntu-latest, 3.0, gemfiles/Gemfile-rails.7.0.x)
- GitHub Check: claude-review
- SwcMigrator uses Pathname.new() but was missing the require - This could cause NameError when instantiating SwcMigrator - Added require 'pathname' with other requires at top of file 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Configuration.rb uses JSON.parse in validate_transpiler_configuration - Missing require could cause NameError in some Rails boot paths - Added require 'json' at the top with other requires - Ensures JSON constant is initialized before JSON.parse calls 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Code Review for PR #613Thank you for addressing the review feedback from PR #603! This is a well-structured and comprehensive improvement to the migration tooling. Here's my detailed review: ✅ Strengths
🔍 Areas for Improvement1. Configuration Validation PerformanceIn def validate_transpiler_configuration(transpiler)
@transpiler_validated ||= begin
# validation logic here
true
end
end2. Potential Race ConditionThe package manager detection in def package_manager
@package_manager ||= detect_package_manager
end3. Security ConsiderationIn success = case package_manager
when "yarn"
system("yarn", "install")
when "pnpm"
system("pnpm", "install")
else
system("npm", "install")
end4. Version Parsing Edge CaseGood fix in if version_match
major_version = version_match[1]
else
say " ⚠️ Could not parse version '#{version}', using 'latest'", :yellow
major_version = "latest"
end💡 Suggestions
🐛 Minor Issues
✅ Overall AssessmentThis is a high-quality PR that significantly improves the migration experience from Babel to SWC. The code is clean, well-tested, and handles edge cases gracefully. The improvements address all the feedback from PR #603 effectively. The migration tooling will be invaluable for users looking to benefit from SWC's 20x performance improvement. With the minor improvements suggested above, this will be production-ready. Recommendation: Approve with minor suggestions 🎉 Great work on implementing comprehensive migration tooling! |
Code Review: PR #613 - Address PR #603 review feedbackOverall AssessmentThis PR successfully addresses the review feedback from PR #603 with well-implemented migration tooling and robust error handling. The code quality is excellent, with comprehensive test coverage and thoughtful user experience considerations. ✅ Strengths1. Code Quality & Best Practices
2. Migration Tooling Excellence
3. Test Coverage
🔍 Observations & Minor Suggestions1. Configuration Validation (lib/shakapacker/configuration.rb)The runtime validation is helpful but consider:
2. Performance Considerations
3. Security
4. Minor Code ImprovementsConsider these small enhancements:
📝 DocumentationThe PR description is comprehensive and the code is self-documenting with clear method names and helpful comments where needed. ✨ Particularly Nice Touches
Verdict: APPROVED ✅This is high-quality code that thoughtfully addresses the review feedback. The migration tooling is robust, user-friendly, and well-tested. The defensive programming practices and comprehensive error handling make this production-ready. Great work on improving the Babel to SWC migration experience! The 20x performance improvement will be a significant benefit to users. |
Add comprehensive changelog entries for v9.0.0-beta.7 based on origin/main: Added (non-doc/test only): - Phase 2 TypeScript Migration - Core Modules (PR #608) - Phase 3 TypeScript Migration - Environment Files (PR #614) - Optional Peer Dependencies (PR #615) - Migration Tooling Improvements (PR #613) Security: - Path validation utilities to prevent directory traversal - Environment variable sanitization - SHAKAPACKER_NPM_PACKAGE validation Changed: - Build process improvements (publish-time JS generation) Performance: - TTL-based validation caching Fixed: - clearValidationCache() bug - private_output_path edge cases (PR #604) Kept beta.4 section intact with all original breaking changes.
* docs: Update CHANGELOG for Phase 3 TypeScript migration (#614) Add comprehensive changelog entry for Phase 3 of the TypeScript migration, covering: - TypeScript migration of environment files - Security improvements (path validation, env sanitization) - Build process improvements (publish-time compilation) - Performance optimizations (validation caching) - Bug fixes (SWC .jsx parsing, generator specs, cache clearing) All changes maintain backward compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * docs: Update CHANGELOG for v9.0.0-beta.7 release Add comprehensive changelog entries for v9.0.0-beta.7 based on origin/main: Added (non-doc/test only): - Phase 2 TypeScript Migration - Core Modules (PR #608) - Phase 3 TypeScript Migration - Environment Files (PR #614) - Optional Peer Dependencies (PR #615) - Migration Tooling Improvements (PR #613) Security: - Path validation utilities to prevent directory traversal - Environment variable sanitization - SHAKAPACKER_NPM_PACKAGE validation Changed: - Build process improvements (publish-time JS generation) Performance: - TTL-based validation caching Fixed: - clearValidationCache() bug - private_output_path edge cases (PR #604) Kept beta.4 section intact with all original breaking changes.
Summary
This PR addresses all the review comments from PR #603, improving the migration tooling and error handling for the Babel to SWC transition.
Changes Made
1. Fixed Edge Case in Version Handling
lib/install/template.rb2. Added Clear Dual Installation Message
USE_BABEL_PACKAGES=true, now displays informative message explaining why both Babel and SWC are installed3. Created Robust Migration Tooling
Shakapacker::SwcMigratorclass with proper error handling and loggingrails shakapacker:migrate_to_swc- Automated migration from Babel to SWCrails shakapacker:clean_babel_packages- Remove unused Babel dependencies4. Added Runtime Validation
package.jsonandshakapacker.yml5. Package.json Cleanup Utility
Testing
Performance Impact
The migration to SWC provides approximately 20x performance improvement in transpilation speed, as documented in the transpiler performance benchmarks.
Migration Path
For existing projects using Babel:
rails shakapacker:migrate_to_swcrails shakapacker:clean_babel_packagesto remove unused Babel dependenciesThe migration is designed to be safe with proper error handling and the ability to partially succeed if some steps fail.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests