Open Judahmeek opened 1 week ago
The pull request updates the CHANGELOG.md
to document new features and fixes in the react_on_rails
project. Key changes include the addition of streaming server rendering support, new helper methods for rendering, improved error handling, and updates to the console log replay process. The version checker has been modified to log warnings for version mismatches instead of raising errors, and it now checks both the root and client package.json
files. Additionally, a method in the ReactOnRails
module has been renamed for clarity.
File | Change Summary |
---|---|
CHANGELOG.md | Updated to include new features such as streaming server rendering support, stream_react_component helper, and improved error handling. |
lib/react_on_rails/version_checker.rb | Modified VersionChecker to log warnings for version mismatches, updated methods for handling package.json paths, and improved error handling in version checks. |
lib/react_on_rails/engine.rb | Changed logic in config.to_prepare to check both package.json and client/package.json for version discrepancies, logging warnings instead of raising errors. |
lib/react_on_rails/*.rb | Added methods: stream_react_component and streamServerRenderedReactComponent ; renamed ReactOnRails.registerStore to ReactOnRails.registerStoreGenerators . |
spec/react_on_rails/fixtures/yalc_package.json | New file created to define project dependencies and development dependencies. |
spec/react_on_rails/version_checker_spec.rb | Updated tests to check for logging behavior instead of error raising for version discrepancies; added new context for testing relative path handling. |
renderToPipeableStream
, related to the new streaming methods in this PR.serverRenderReactComponent
function, integral to the streaming functionality discussed in the main PR.🐰 In the land of code, changes bloom,
New streams of rendering, dispel the gloom.
With logs replayed, and errors tamed,
Our project grows, forever famed.
Hops of joy, let’s celebrate,
In the world of React, we innovate! 🥕
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?
@Judahmeek can you update this:
Summary
Currently, the version checker is hard-coded to use
client/package.json
. Ifclient/package.json
doesn't exist, then the version checker silently fails.This PR changes the version checker to match Shakapacker v8's requirements, which are that the
package.json
exists at the root of the project directory.Alternately, we'll need to make the package.json path configurable.
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
New Features
Bug Fixes
ReactOnRails.registerStore
method for clarity.Chores
package.json
files.