-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Add 14.1.0 to CHANGELOG.md #1670
Conversation
WalkthroughThe pull request introduces version 14.1.0 of ReactOnRails, focusing on improvements to server-side rendering, version checking, and configuration. The changes enhance streaming server rendering support, modify version checking behavior, and add more flexible configuration options. The updates aim to provide better error handling, debugging capabilities, and compatibility with different dependency management approaches. Changes
Sequence DiagramsequenceDiagram
participant Client
participant ReactOnRails
participant ServerRenderer
participant ConsoleLogger
Client->>ReactOnRails: Request streamed component
ReactOnRails->>ServerRenderer: renderToPipeableStream()
ServerRenderer-->>ConsoleLogger: Capture console logs
ServerRenderer->>Client: Stream initial render
alt Async render or suspense
ServerRenderer->>ConsoleLogger: Replay captured logs
ServerRenderer->>Client: Complete render
end
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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
CodeRabbit Configuration File (
|
@justin808 Can we make the equivalent of this change automatic in the release script? Or is it already supposed to be? |
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: 0
🧹 Nitpick comments (1)
CHANGELOG.md (1)
Line range hint
29-39
: Major feature addition: Streaming server rendering supportSignificant new functionality added:
- New helper
stream_react_component
- Support for React 18's
renderToPipeableStream
- Console log replay for debugging
- Error handling for streaming components
- YAML safe load options for locale files
Consider the following for streaming implementation:
- Ensure proper error boundaries are in place for suspense boundaries
- Consider memory usage with streaming responses
- Document performance implications and best practices
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
CHANGELOG.md
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: rspec-package-tests (newest)
- GitHub Check: build-dummy-app-webpack-test-bundles (oldest)
- GitHub Check: rspec-package-tests (oldest)
- GitHub Check: build
🔇 Additional comments (4)
CHANGELOG.md (4)
21-22
: Verify version number and date formatThe version number and date format follow the standard CHANGELOG conventions.
1177-1178
: Update comparison linksThe comparison links at the bottom of the file are correctly updated to include version 14.1.0.
Line range hint
24-27
: Fixed section looks good but verify version checker changesThe fixes address important issues:
- Type correction for
registerStore
toregisterStoreGenerators
- Version checker improvements using
node_modules_location
- Converting errors to warnings for version checking
- Git dependency support
Let's verify the version checker changes:
✅ Verification successful
Version checker changes successfully implemented ✅
The implementation correctly:
- Uses
node_modules_location
to locate package.json- Converts version mismatch errors to warnings via
Rails.logger.warn
- Retains only one necessary error for unparseable versions
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if version checker uses node_modules_location correctly rg -A 5 "node_modules_location.*package\.json" # Check if version checker logs warnings instead of raising errors rg -A 5 "Rails\.Logger\.warn.*version"Length of output: 1251
Script:
#!/bin/bash # Get the complete version checker implementation ast-grep --pattern 'class VersionChecker $$$ end' # Search for warning patterns with variations rg -A 5 'warn.*version|version.*warn' # Search for raise patterns in version checker rg -A 5 'raise.*version|version.*raise' lib/react_on_rails/version_checker.rbLength of output: 15026
Line range hint
41-42
: Changed: Console replay enhancementThe change to await render request promise is important for capturing async console logs.
Let's verify the console replay implementation:
✅ Verification successful
Console replay implementation correctly handles async logs
The implementation in
serverRenderReactComponent.ts
correctly captures console history before awaiting the render request promise, ensuring that asynchronous console logs are preserved and included in the replay script. The code includes safeguards to maintain the console history even when the Node renderer resets it after synchronous operations.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check console replay implementation ast-grep --pattern 'async function $FUNC_NAME($_) { $$$ await $PROMISE $$$ }'Length of output: 85
Script:
#!/bin/bash # Search for console replay related files and implementations rg -l -i "console.*replay" --type js --type ts # Search for specific render request promise implementation rg -i "render.*request.*promise" --type js --type ts -C 2Length of output: 422
Script:
#!/bin/bash # Check the implementation in buildConsoleReplay.ts cat node_package/src/buildConsoleReplay.ts # Look for async/await patterns in serverRenderReactComponent.ts cat node_package/src/serverRenderReactComponent.tsLength of output: 14488
Summary
Remove this paragraph and provide a general description of the code changes in your pull
request... were there any bugs you had fixed? If so, mention them. If
these bugs have open GitHub issues, be sure to tag them here as well,
to keep the conversation linked together.
Pull Request checklist
Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by
~
.Add the CHANGELOG entry at the top of the file.
Other Information
Remove this paragraph and mention any other important and relevant information such as benchmarks.
This change is
Summary by CodeRabbit
Fixed
registerStore
node_modules_location
git:
dependencyAdded
YAML.safe_load
options for locale filesChanged