-
-
Notifications
You must be signed in to change notification settings - Fork 638
Switch Pro packages to public distribution #1901
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
base: master
Are you sure you want to change the base?
Conversation
WalkthroughChanged publishing from scoped/private GitHub Packages to public registries: the pro node renderer package was renamed to Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Release task
participant NPM as npmjs.org
participant Ruby as RubyGems.org
rect rgb(220,245,255)
Note over Dev,NPM: Node renderer publish (PUBLIC)
Dev->>NPM: npm publish react-on-rails-pro-node-renderer
NPM-->>Dev: OTP / success
end
rect rgb(245,245,220)
Note over Dev,Ruby: Ruby gems publish (PUBLIC)
Dev->>Ruby: gem push react_on_rails-*.gem / react_on_rails_pro-*.gem
Ruby-->>Dev: OTP / success
end
Note over Dev: Post-release summary references npmjs.org and RubyGems.org only
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 - PR #1901: Switch Pro packages to public distributionOverviewThis PR transitions React on Rails Pro packages from GitHub Packages (private) to public registries (npmjs.org + RubyGems.org), maintaining runtime JWT enforcement for license validation. This is a strategic change that simplifies customer onboarding while keeping the security model intact. ✅ Strengths1. Clean, Focused Changes
2. Well-Documented Approach
3. Consistent with Established Patterns
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
rakelib/release.rake(4 hunks)react_on_rails_pro/package.json(0 hunks)
💤 Files with no reviewable changes (1)
- react_on_rails_pro/package.json
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
Learnt from: justin808
Repo: shakacode/react_on_rails PR: 1770
File: lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx:2-2
Timestamp: 2025-09-16T08:01:11.146Z
Learning: React on Rails uses webpack CSS Modules configuration with namedExports: true, which requires the import syntax `import * as style from './file.module.css'` rather than the default export pattern. This configuration enables better tree shaking and bundle size optimization for CSS modules.
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.
Applied to files:
rakelib/release.rake
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
Applied to files:
rakelib/release.rake
📚 Learning: 2025-07-08T05:57:29.630Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1745
File: node_package/src/RSCRequestTracker.ts:8-14
Timestamp: 2025-07-08T05:57:29.630Z
Learning: The global `generateRSCPayload` function in React on Rails Pro (RORP) is provided by the framework during rendering requests, not implemented in application code. The `declare global` statements are used to document the expected interface that RORP will inject at runtime.
Applied to files:
rakelib/release.rake
📚 Learning: 2025-09-16T08:01:11.146Z
Learnt from: justin808
Repo: shakacode/react_on_rails PR: 1770
File: lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx:2-2
Timestamp: 2025-09-16T08:01:11.146Z
Learning: React on Rails uses webpack CSS Modules configuration with namedExports: true, which requires the import syntax `import * as style from './file.module.css'` rather than the default export pattern. This configuration enables better tree shaking and bundle size optimization for CSS modules.
Applied to files:
rakelib/release.rake
📚 Learning: 2025-02-13T16:50:47.848Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/clientStartup.ts:18-21
Timestamp: 2025-02-13T16:50:47.848Z
Learning: In the react_on_rails module, the `reactOnRailsPageUnloaded` function in clientStartup.ts is intentionally kept private as it's only used internally as a callback for `onPageUnloaded`.
Applied to files:
rakelib/release.rake
📚 Learning: 2025-02-18T13:08:01.477Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.
Applied to files:
rakelib/release.rake
📚 Learning: 2025-10-23T17:22:01.074Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.
Applied to files:
rakelib/release.rake
⏰ 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). (10)
- GitHub Check: build
- GitHub Check: lint-js-and-ruby
- GitHub Check: rspec-package-tests (3.2, minimum)
- GitHub Check: rspec-package-tests (3.4, latest)
- GitHub Check: rspec-package-tests (3.2, latest)
- GitHub Check: rspec-package-tests (3.4, minimum)
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: build-dummy-app-webpack-test-bundles (3.4, 22)
- GitHub Check: claude-review
- GitHub Check: build-dummy-app-webpack-test-bundles
| puts "\nPublishing #{node_renderer_name}@#{actual_npm_version}..." | ||
| puts "Carefully add your OTP for NPM when prompted." unless use_verdaccio | ||
| sh_in_dir(pro_gem_root, | ||
| "yarn publish --new-version #{actual_npm_version} --no-git-tag-version #{npm_publish_args}") | ||
|
|
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.
Add --access public when publishing the scoped renderer package
Scoped npm packages default to private. On the first public release, yarn publish without --access public fails with the npm error “You must provide --access public to publish scoped packages.” That blocks the new distribution flow this PR introduces. Please append the flag (while skipping it for Verdaccio runs) so the publish step succeeds.
- sh_in_dir(pro_gem_root,
- "yarn publish --new-version #{actual_npm_version} --no-git-tag-version #{npm_publish_args}")
+ publish_command = [
+ "yarn publish",
+ "--new-version #{actual_npm_version}",
+ "--no-git-tag-version"
+ ]
+ publish_command << npm_publish_args unless npm_publish_args.to_s.empty?
+ publish_command << "--access public" unless use_verdaccio
+ sh_in_dir(pro_gem_root, publish_command.join(" "))🤖 Prompt for AI Agents
In rakelib/release.rake around lines 217 to 221, the yarn publish command needs
the --access public flag for scoped packages; update the sh_in_dir call so that
when use_verdaccio is false you append "--access public" to the yarn publish
arguments (while preserving existing npm_publish_args and --no-git-tag-version),
and do not add the flag when use_verdaccio is true.
Code Review - PR #1901: Switch Pro packages to public distributionSummaryThis PR transitions the Pro packages from private GitHub Packages distribution to public npm/RubyGems distribution, simplifying customer installation while maintaining runtime JWT license validation. ✅ Code Quality & Best PracticesStrengths:
Observations:
🐛 Potential IssuesMinor:
🔒 Security ConsiderationsStrong points:
Recommendations:
⚡ Performance ConsiderationsPositive impacts:
Neutral:
🧪 Test CoverageCurrent state:
Testing plan review:
Recommendations:
📝 Documentation & MessagingUpdates needed:
Suggestions:
🎯 Breaking Changes AssessmentFor customers:
For maintainers:
🚀 Release ReadinessBefore merging:
After merging (first release):
📊 Overall AssessmentRating: ✅ Approve with minor fixes This is a well-structured PR that achieves its stated goal of simplifying distribution. The code changes are clean and focused. The main blocker is the failing test, which should be resolved before merge. The strategic decision to move to public distribution with runtime license enforcement is sound and significantly improves customer experience. Estimated risk: Low (assuming runtime validation is well-tested) 🤖 Review generated by Claude Code |
Code Review: Switch Pro packages to public distributionOverviewThis PR implements a significant architectural change, moving React on Rails Pro packages from private GitHub Packages to public distribution (npmjs.org + RubyGems.org). I've reviewed the changes against code quality, security, performance, and best practices. ✅ Strengths1. Clean Implementation
2. Security Model Intact
3. Good Code Quality
|
PR Review: Switch Pro packages to public distributionI've reviewed PR #1901 comprehensively. Here's my detailed feedback: ✅ Code Quality & Best PracticesStrengths:
Areas of Concern:
🐛 Potential Issues
🔒 Security ConsiderationsPositive:
Recommendations:
⚡ Performance ConsiderationsNo performance concerns - this is purely a distribution change. The actual package contents and runtime behavior are unchanged. 🧪 Test CoverageConcerns:
📝 RecommendationsCritical (Must fix before merge):
Important (Should fix):
Nice to have:
📊 Overall AssessmentThis is a well-executed change that accomplishes its goal cleanly. The code changes are solid, but the documentation is significantly out of date and must be updated before this can be merged. The installation docs still instruct users to set up GitHub PATs and authenticate with GitHub Packages, which will confuse users after the switch. Recommendation: Request changes - Update documentation before merging. Review generated by Claude Code - Let me know if you'd like me to help update the documentation files! |
Code Review: Switch Pro packages to public distributionI've reviewed PR #1901 and have the following feedback: ✅ Strengths
🔍 Issues & ConcernsCritical Issues
Medium Priority Issues
🔐 Security Considerations✅ Runtime enforcement preserved: The PR correctly maintains JWT validation at runtime 📋 RecommendationsBefore merging:
Testing checklist additions:
📝 Minor Suggestions
Overall AssessmentThis is a well-intentioned and strategically sound change that will significantly improve the user experience. However, it's not ready to merge due to the critical documentation gap. The installation docs must be updated before this can safely go out, as it will cause immediate confusion and support burden. Recommended path forward:
Would you like me to help with updating the installation documentation or creating a migration guide? |
Following PR #1901's switch from GitHub Packages to public distribution, update all documentation to reflect that React on Rails Pro packages are now publicly available on npmjs.org and RubyGems.org. Changes: - Remove all GitHub Personal Access Token requirements - Remove .npmrc and gem credentials configuration steps - Simplify installation to standard gem/npm commands - Update releasing docs to show all 5 packages as public - Remove "private repository" language throughout - Update troubleshooting to remove token-related issues Files updated: - react_on_rails_pro/docs/installation.md (major simplification) - docs/contributor-info/releasing.md - react_on_rails_pro/docs/contributors-info/releasing.md - react_on_rails_pro/docs/contributors-info/onboarding-customers.md - react_on_rails_pro/docs/troubleshooting.md - react_on_rails_pro/docs/ruby-api.md - react_on_rails_pro/docs/code-splitting-loadable-components.md - react_on_rails_pro/docs/node-renderer/basics.md - react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md
Remove GitHub Packages configuration to publish Pro packages publicly on npmjs.org and RubyGems.org. Changes: - Remove publishConfig from react_on_rails_pro/package.json (node-renderer) - Update release script to publish Pro gem to RubyGems.org (remove --key github --host) - Update all messaging from PRIVATE/GitHub Packages to PUBLIC/npmjs.org/RubyGems.org - Update script documentation to reflect all packages are now public - Update success message for unified public distribution This follows Bob's pattern from react-on-rails-pro NPM package (already configured for public). Runtime enforcement via JWT license validation remains unchanged.
Change package name from @shakacode-tools/react-on-rails-pro-node-renderer to react-on-rails-pro-node-renderer (unscoped). Rationale: - @shakacode-tools scope was only needed for GitHub Packages (requires scoping) - Now publishing to public npmjs.org where scoping is optional - Matches naming pattern of react-on-rails and react-on-rails-pro (both unscoped) - Unscoped packages are public by default (no --access public flag needed) - @shakacode-tools npm org doesn't exist on npmjs.org Migration impact: Small number of Pro customers will need to update their node-renderer.js imports when upgrading (Justin will handle directly). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Remove all references to GitHub Packages and private distribution. Update package name from @shakacode-tools/react-on-rails-pro-node-renderer to react-on-rails-pro-node-renderer throughout documentation. Changes: - Completely rewrite installation.md to remove GitHub PAT authentication - Simplify to standard gem install and npm install commands - Add JWT license token configuration section - Update all code examples with unscoped package name - Remove GitHub Packages authentication instructions - Update contributor documentation to reflect all packages are public - Update CONTRIBUTING.md files to remove private package sections Documentation files updated: - react_on_rails_pro/docs/installation.md (major rewrite) - react_on_rails_pro/docs/node-renderer/basics.md - react_on_rails_pro/docs/node-renderer/js-configuration.md - react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md - react_on_rails_pro/docs/code-splitting-loadable-components.md - docs/contributor-info/releasing.md - react_on_rails_pro/docs/contributors-info/releasing.md - CONTRIBUTING.md - react_on_rails_pro/CONTRIBUTING.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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)
react_on_rails_pro/docs/installation.md (1)
56-68: Clarify initializer requirement vs. environment variable setup.Line 58 states "You don't need to create an initializer if you are satisfied with the defaults," but the license configuration (lines 39-54) appears to require setting the license token. Clarify whether this statement assumes the license token is always configured via environment variable, and update the text to make this explicit.
Example revision for line 58:
"You don't need to create an initializer if you've configured the license via environment variable and are satisfied with other defaults."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
CONTRIBUTING.md(1 hunks)docs/contributor-info/releasing.md(1 hunks)react_on_rails_pro/CONTRIBUTING.md(1 hunks)react_on_rails_pro/docs/code-splitting-loadable-components.md(1 hunks)react_on_rails_pro/docs/contributors-info/releasing.md(1 hunks)react_on_rails_pro/docs/installation.md(1 hunks)react_on_rails_pro/docs/node-renderer/basics.md(1 hunks)react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md(7 hunks)react_on_rails_pro/docs/node-renderer/js-configuration.md(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- react_on_rails_pro/docs/code-splitting-loadable-components.md
- docs/contributor-info/releasing.md
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.
Applied to files:
CONTRIBUTING.mdreact_on_rails_pro/docs/node-renderer/basics.mdreact_on_rails_pro/docs/node-renderer/js-configuration.mdreact_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.mdreact_on_rails_pro/CONTRIBUTING.mdreact_on_rails_pro/docs/contributors-info/releasing.mdreact_on_rails_pro/docs/installation.md
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
Applied to files:
CONTRIBUTING.mdreact_on_rails_pro/docs/node-renderer/basics.mdreact_on_rails_pro/docs/node-renderer/js-configuration.mdreact_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.mdreact_on_rails_pro/CONTRIBUTING.mdreact_on_rails_pro/docs/contributors-info/releasing.mdreact_on_rails_pro/docs/installation.md
📚 Learning: 2025-09-16T08:01:11.146Z
Learnt from: justin808
Repo: shakacode/react_on_rails PR: 1770
File: lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx:2-2
Timestamp: 2025-09-16T08:01:11.146Z
Learning: React on Rails uses webpack CSS Modules configuration with namedExports: true, which requires the import syntax `import * as style from './file.module.css'` rather than the default export pattern. This configuration enables better tree shaking and bundle size optimization for CSS modules.
Applied to files:
CONTRIBUTING.mdreact_on_rails_pro/docs/node-renderer/basics.mdreact_on_rails_pro/docs/node-renderer/js-configuration.mdreact_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.mdreact_on_rails_pro/CONTRIBUTING.mdreact_on_rails_pro/docs/contributors-info/releasing.mdreact_on_rails_pro/docs/installation.md
📚 Learning: 2025-01-23T18:20:45.824Z
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1687
File: spec/dummy/package.json:0-0
Timestamp: 2025-01-23T18:20:45.824Z
Learning: When adding or updating dependencies in spec/dummy/package.json, maintain version consistency with other package.json files in the codebase to avoid potential version conflicts.
Applied to files:
CONTRIBUTING.md
📚 Learning: 2024-10-08T20:53:47.076Z
Learnt from: theforestvn88
Repo: shakacode/react_on_rails PR: 1620
File: spec/dummy/client/app/startup/HelloTurboStream.jsx:3-3
Timestamp: 2024-10-08T20:53:47.076Z
Learning: The `RailsContext` import in `spec/dummy/client/app/startup/HelloTurboStream.jsx` is used later in the project, as clarified by the user theforestvn88.
Applied to files:
CONTRIBUTING.mdreact_on_rails_pro/docs/node-renderer/js-configuration.md
📚 Learning: 2025-07-08T05:57:29.630Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1745
File: node_package/src/RSCRequestTracker.ts:8-14
Timestamp: 2025-07-08T05:57:29.630Z
Learning: The global `generateRSCPayload` function in React on Rails Pro (RORP) is provided by the framework during rendering requests, not implemented in application code. The `declare global` statements are used to document the expected interface that RORP will inject at runtime.
Applied to files:
react_on_rails_pro/docs/node-renderer/js-configuration.mdreact_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.mdreact_on_rails_pro/CONTRIBUTING.mdreact_on_rails_pro/docs/contributors-info/releasing.mdreact_on_rails_pro/docs/installation.md
📚 Learning: 2025-02-13T19:09:15.991Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/RSCWebpackLoader.ts:0-0
Timestamp: 2025-02-13T19:09:15.991Z
Learning: In React Server Components webpack loader, using `new Function('return import("react-server-dom-webpack/node-loader")')()` is necessary as a workaround to bypass TypeScript compilation issues with direct dynamic imports.
Applied to files:
react_on_rails_pro/docs/node-renderer/js-configuration.md
📚 Learning: 2025-02-13T16:50:47.848Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/clientStartup.ts:18-21
Timestamp: 2025-02-13T16:50:47.848Z
Learning: In the react_on_rails module, the `reactOnRailsPageUnloaded` function in clientStartup.ts is intentionally kept private as it's only used internally as a callback for `onPageUnloaded`.
Applied to files:
react_on_rails_pro/docs/node-renderer/js-configuration.md
📚 Learning: 2024-12-12T13:07:09.929Z
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/ReactOnRailsRSC.ts:87-87
Timestamp: 2024-12-12T13:07:09.929Z
Learning: When handling errors in 'node_package/src/ReactOnRailsRSC.ts', include the error stack in error messages in development and test environments to aid debugging.
Applied to files:
react_on_rails_pro/docs/node-renderer/js-configuration.mdreact_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md
📚 Learning: 2025-06-09T07:58:02.646Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1696
File: node_package/src/RSCPayloadGenerator.ts:124-168
Timestamp: 2025-06-09T07:58:02.646Z
Learning: In React Server Components (RSC) implementations, explicit error handling in RSC payload generation streams (like in RSCPayloadGenerator.ts) is not needed because errors will propagate to client components that fetch the RSC payloads (such as RSCRoute components). React's built-in error handling mechanisms and ErrorBoundary components are sufficient for handling these errors at the component level, which allows for better user experience with appropriate error UI fallbacks.
Applied to files:
react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md
📚 Learning: 2025-10-23T17:22:01.074Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.
Applied to files:
react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.mdreact_on_rails_pro/CONTRIBUTING.mdreact_on_rails_pro/docs/installation.md
📚 Learning: 2025-02-18T13:08:01.477Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.
Applied to files:
react_on_rails_pro/CONTRIBUTING.mdreact_on_rails_pro/docs/contributors-info/releasing.mdreact_on_rails_pro/docs/installation.md
📚 Learning: 2025-09-15T21:24:48.207Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1781
File: node_package/src/ClientSideRenderer.ts:82-95
Timestamp: 2025-09-15T21:24:48.207Z
Learning: In React on Rails, the force_load feature includes both explicit `data-force-load="true"` usage and the ability to hydrate components during the page loading state (`document.readyState === 'loading'`). Both capabilities require a Pro license, so the condition `!railsContext.rorPro && (isComponentForceLoaded || document.readyState === 'loading')` correctly gates both scenarios.
Applied to files:
react_on_rails_pro/docs/installation.md
⏰ 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). (9)
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: build
- GitHub Check: build-dummy-app-webpack-test-bundles
- GitHub Check: lint-js-and-ruby
- GitHub Check: build-dummy-app-webpack-test-bundles (3.4, 22, latest)
- GitHub Check: rspec-package-tests (3.4, latest)
- GitHub Check: rspec-package-tests (3.2, minimum)
- GitHub Check: claude-review
- GitHub Check: markdown-link-check
🔇 Additional comments (15)
CONTRIBUTING.md (1)
131-131: LGTM.The yalc workflow documentation now correctly references the public package names (
react-on-rails-pro-node-renderer), consistent with the broader PR changes.react_on_rails_pro/CONTRIBUTING.md (2)
295-301: LGTM.Prerequisites section correctly updated to reflect public registry authentication (npmjs.org and RubyGems.org), removing private GitHub Packages references. Clear and actionable guidance for contributors.
303-317: LGTM.Release command section provides clear, concrete examples (dry-run, Verdaccio test, full release) with proper reference to root-level documentation. Aligns with the testing plan outlined in PR objectives.
react_on_rails_pro/docs/node-renderer/js-configuration.md (1)
57-57: LGTM.Import path updated to reflect the unscoped public package name for consistency with public npm publishing.
react_on_rails_pro/docs/contributors-info/releasing.md (1)
35-40: LGTM.Package list updated to reflect new public distribution:
react-on-rails-pro-node-renderer(NPM) is now listed separately, and Pro gem is correctly listed as RubyGem (removing GitHub Packages reference). Accurate and complete.react_on_rails_pro/docs/node-renderer/basics.md (2)
36-45: LGTM.Installation instructions correctly updated to use public package name. Documentation flow is clear and follows standard npm conventions.
45-45: Module import syntax inconsistency across documentation.Line 45 uses default import:
import reactOnRailsProNodeRenderer from 'react-on-rails-pro-node-renderer', but other documentation (e.g.,js-configuration.md:57) shows destructured import:import { reactOnRailsProNodeRenderer } from '...'Verify which is correct and standardize across all docs to avoid user confusion.
react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md (1)
17-17: LGTM.All import paths comprehensively updated to the unscoped public package name across multiple integration examples (Sentry, Honeybadger, BugSnag, Fastify API). Changes are consistent and thorough.
Also applies to: 20-20, 43-43, 52-52, 62-62, 79-79, 120-120, 145-145
react_on_rails_pro/docs/installation.md (7)
3-11: LGTM.Introduction clearly establishes the public distribution model and license token requirement. Contact information for purchasing is helpful for users.
13-37: LGTM.Ruby gem installation section is clear and comprehensive, providing both standard gem declaration and direct install options with version guidance. Follows established Ruby patterns.
39-54: LGTM.License configuration section provides both environment variable (recommended) and initializer approaches, with helpful production guidance. Clear and actionable for users.
70-96: LGTM.Node package installation section is clear and comprehensive, showing both npm and yarn options with package.json example. Consistent use of public package name.
98-141: Module syntax inconsistency with other documentation.This section uses CommonJS require/destructuring syntax (line 104:
const { reactOnRailsProNodeRenderer } = require(...)), butdocs/node-renderer/basics.md:45uses ES6 default import syntax (import reactOnRailsProNodeRenderer from ...). Both sections describe setting up a custom configuration file for the same package.Verify the actual package export style and standardize the examples across all documentation to avoid user confusion.
143-175: LGTM.Node renderer startup and Rails configuration sections are well-structured. package.json script, startup command, and Rails initializer example are clear and correctly reference the configuration options. The password field correctly maps to the example configuration above.
177-195: LGTM.Configuration options summary is helpful and provides clear bullet-point reference to key settings. Proper links to detailed documentation files.
581605d to
32ef93d
Compare
Code Review - Switch Pro Packages to Public DistributionI've completed a thorough review of PR #1901. This is a significant architectural change that transitions React on Rails Pro packages from private GitHub Packages distribution to public npmjs.org and RubyGems.org distribution. Overall, the implementation is well-executed and clean, but I have some recommendations and observations. ✅ Strengths1. Clean Code Changes
2. Comprehensive Documentation Updates
3. Good Separation of Concerns
🔍 Code Quality & Best Practicesrakelib/release.rake (Lines 210-220)Good:
Observation: # Note: Using 'yarn publish' here instead of 'yarn workspace' because
# the node-renderer package.json is in react_on_rails_pro/ root directory
sh_in_dir(pro_gem_root,
"yarn publish --new-version #{actual_npm_version} --no-git-tag-version #{npm_publish_args}")Documentation Consistency (installation.md)Good:
Minor suggestions:
|
Fix ESLint errors from CI by updating all remaining references from @shakacode-tools/react-on-rails-pro-node-renderer to react-on-rails-pro-node-renderer. Files updated: - react_on_rails_pro/spec/dummy/client/node-renderer.js (3 requires) - react_on_rails_pro/packages/node-renderer/src/integrations/api.ts (JSDoc example) - react_on_rails_pro/spec/dummy/package.json (dependency + yalc link) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Update error message from @shakacode-tools/react-on-rails-pro-node-renderer to react-on-rails-pro-node-renderer in package-scripts.yml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Summary
This PR implements the switch from GitHub Packages to public distribution for React on Rails Pro packages and gem.
Changes
1. Node Renderer NPM Package (
react_on_rails_pro/package.json)publishConfigsection to publish to npmjs.org instead of GitHub Packages2. Release Script (
rakelib/release.rake)--key github --hostarguments to publish to RubyGems.org3. Documentation Updates
Distribution Strategy
Before:
After:
gem installandnpm installBreaking Change
.npmrcconfiguration after this release. Justin will communicate migration steps directly to customers.Security
Runtime enforcement remains completely unchanged:
Testing Plan
rake release[16.2.0,true]rake release[16.2.0-test.1,false,verdaccio]🤖 Generated with Claude Code
This change is
Summary by CodeRabbit
Chores
Documentation