Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
188063e
Add comprehensive implementation plan for JS Pro package separation
AbanoubGhadban Sep 29, 2025
255f289
Step 1 Complete: Create React-on-Rails-Pro Package Structure
AbanoubGhadban Sep 29, 2025
c3c8d1a
Step 2: Create Simple MIT Registries for Core Package
AbanoubGhadban Sep 29, 2025
2d98750
Step 3: Update Core Package to Use New Registries
AbanoubGhadban Sep 29, 2025
5a28c85
Step 4: Move Pro Files to Pro Package
AbanoubGhadban Sep 30, 2025
ef2af54
Update import paths in pro package files
AbanoubGhadban Sep 30, 2025
34136e8
Fix clientStartup.ts for core package
AbanoubGhadban Sep 30, 2025
0605be2
Fix core package behavior: render all components after page load
AbanoubGhadban Sep 30, 2025
f60a223
Step 5: Move Pro Tests to Pro Package
AbanoubGhadban Sep 30, 2025
490fe3b
Create Pro package main entry point
AbanoubGhadban Sep 30, 2025
2c0f07e
Fix pro package to use react-on-rails as proper dependency
AbanoubGhadban Sep 30, 2025
0d30e6a
Add .gitignore entries for TypeScript build artifacts
AbanoubGhadban Sep 30, 2025
4eba22c
Step 7.1: Update workspace configuration
AbanoubGhadban Sep 30, 2025
a1230a4
Step 8: Update LICENSE.md for new package structure
AbanoubGhadban Sep 30, 2025
4404989
Step 9: Update documentation for new package structure
AbanoubGhadban Sep 30, 2025
af0b5b7
Fix serverRenderReactComponent tests for new architecture
AbanoubGhadban Sep 30, 2025
ecde677
Mark all implementation steps as complete
AbanoubGhadban Sep 30, 2025
972f053
Fix: Disable incremental compilation in pro package
AbanoubGhadban Sep 30, 2025
56bf9c1
Better fix: Configure tsBuildInfoFile location instead of disabling i…
AbanoubGhadban Sep 30, 2025
ae7e120
Enhance TypeScript configuration for react-on-rails packages
AbanoubGhadban Sep 30, 2025
f654a71
Refactor TypeScript configuration for react-on-rails packages
AbanoubGhadban Sep 30, 2025
fab7300
Refactor imports to use local utils module
AbanoubGhadban Sep 30, 2025
0298002
Refactor loadJsonFile import and add new implementation
AbanoubGhadban Sep 30, 2025
7b01a8c
Add utility functions for enhanced fetch handling and caching
AbanoubGhadban Oct 2, 2025
090a199
Remove utility functions from utils.ts
AbanoubGhadban Oct 2, 2025
75ea583
Refactor Jest configuration and enhance testing utilities
AbanoubGhadban Oct 2, 2025
9487596
Update dependencies and improve Jest configuration for react-on-rails…
AbanoubGhadban Oct 2, 2025
0b1d4ee
Update react-on-rails dependency and adjust import paths
AbanoubGhadban Oct 2, 2025
bbf20bf
tmp
AbanoubGhadban Oct 2, 2025
a9b94af
Update client startup behavior and configuration settings
AbanoubGhadban Oct 2, 2025
5c6eda2
Update package.json references in convert script
AbanoubGhadban Oct 2, 2025
22e5c63
Add build step for Renderer package in CI workflow
AbanoubGhadban Oct 2, 2025
07b598d
Refactor JavaScript pack tag expectations in ReactOnRailsHelper spec
AbanoubGhadban Oct 2, 2025
f9ec9ab
Enhance ClientRenderer with cleanup and improved startup behavior
AbanoubGhadban Oct 2, 2025
272c731
Update JavaScript pack tag expectation in ReactOnRailsHelper spec to …
AbanoubGhadban Oct 2, 2025
9b34703
Refactor client startup and component loading behavior
AbanoubGhadban Oct 3, 2025
eaf45a3
Enhance ESLint configuration and TypeScript support for react-on-rail…
AbanoubGhadban Oct 3, 2025
59d8f9b
Remove obsolete ESLint configuration files for react-on-rails packages
AbanoubGhadban Oct 3, 2025
a1e23ec
Refactor knip configuration and remove unused loadJsonFile function
AbanoubGhadban Oct 3, 2025
0e49d15
Refactor React on Rails package structure and enhance functionality
AbanoubGhadban Oct 3, 2025
ba8dd11
Enhance ReactOnRails initialization and type safety
AbanoubGhadban Oct 5, 2025
b224987
Update ReactOnRails package imports and enhance npm package resolution
AbanoubGhadban Oct 5, 2025
a4752c3
Refactor ReactOnRails imports and enhance server component functionality
AbanoubGhadban Oct 5, 2025
6e039ca
Add export for react-server in package.json of react-on-rails-pro
AbanoubGhadban Oct 5, 2025
d8fba72
yalc publish node renderer package before running rorp dummy app
AbanoubGhadban Oct 6, 2025
fc1396b
Update packs_generator_spec to test dynamic npm package selection
AbanoubGhadban Oct 6, 2025
635b5da
use react-on-rails as a peer dependency
AbanoubGhadban Oct 6, 2025
7316774
Revert "use react-on-rails as a peer dependency"
AbanoubGhadban Oct 6, 2025
51fc910
add a delay for loadable component page before testing
AbanoubGhadban Oct 6, 2025
bdc57b8
linting
AbanoubGhadban Oct 6, 2025
95a6df8
skip "displays the proper text" test
AbanoubGhadban Oct 6, 2025
13af83b
update changelog.md
AbanoubGhadban Oct 6, 2025
4b49bfd
fix attw check
AbanoubGhadban Oct 6, 2025
92112f1
update the merge plan
AbanoubGhadban Oct 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/lint-js-and-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ jobs:
run: cd packages/react-on-rails && yarn pack -f react-on-rails.tgz
- name: Lint package types
# our package is ESM-only
run: yarn run attw packages/react-on-rails/react-on-rails.tgz --profile esm-only
# Exclude internal exports used for react-on-rails-pro communication
run: yarn run attw packages/react-on-rails/react-on-rails.tgz --profile esm-only --exclude-entrypoints reactApis ReactDOMServer
- name: Lint package publishing
run: yarn run publint --strict packages/react-on-rails/react-on-rails.tgz
# We only download and run Actionlint if there is any difference in GitHub Action workflows
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/package-js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@ jobs:
run: |
yarn install --no-progress --no-emoji ${{ matrix.node-version == '22' && '--frozen-lockfile' || '' }}
sudo yarn global add yalc
- name: Build Renderer package
run: yarn build
- name: Run JS unit tests for Renderer package
run: yarn test
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ node_modules

/packages/*/lib

# TypeScript build artifacts in src (shouldn't be there, but just in case)
/packages/*/src/**/*.js
/packages/*/src/**/*.d.ts
/packages/*/src/**/*.d.cts
/packages/*/src/**/*.cjs
/packages/*/src/**/*.map
!/packages/*/src/**/*.test.js
!/packages/*/src/**/*.spec.js
Comment on lines +25 to +32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

❓ Verification inconclusive

Do not blanket-ignore /packages/*/src/**/*.js.

This pattern makes it impossible to commit any legitimate JavaScript sources (e.g., stories, config files, runtime JS) that live alongside TS in packages/*/src. Today or later, dropping one of those files would silently remove real code from the package. Please scope the ignore to the actual build output directory (e.g., /packages/*/lib) or otherwise restrict it so real JS sources remain trackable. Also double-check the repo for existing .js files under packages/*/src that would be affected.

Run this to list any currently tracked .js files that would be ignored:


🏁 Script executed:

#!/bin/bash
git ls-tree -r HEAD --name-only | rg '^packages/[^/]+/src/.*\.js$'

Length of output: 0


Restrict .gitignore to build output, not /packages/*/src/**/*.js
Even though no .js files currently exist under packages/*/src, a blanket-ignore could hide future legitimate JS sources. Change the patterns to target your build directory (e.g., /packages/*/lib/**/*.js, .map, etc.) instead of the src folder.

🤖 Prompt for AI Agents
In .gitignore around lines 25-32, the patterns are overly broad and ignore
JavaScript and map files inside packages/*/src which may hide legitimate source
files; change the ignore rules to target the actual build/output directories
(for example /packages/*/lib/** or /packages/*/dist/**) and their generated
artifacts (*.js, *.d.ts, *.map, etc.) instead of src so source files remain
tracked—update the patterns to point to the build folder(s) used by the repo and
remove or restrict the /packages/*/src/**/*.js, .d.ts, .cjs, .map entries.


yarn-debug.*
yarn-error.*
npm-debug.*
Expand Down
48 changes: 47 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,52 @@ After a release, please make sure to run `bundle exec rake update_changelog`. Th

Changes since the last non-beta release.

#### Breaking Changes

- **React on Rails Core Package**: Several Pro-only methods have been removed from the core package and are now exclusively available in the `react-on-rails-pro` package. If you're using any of the following methods, you'll need to migrate to React on Rails Pro:
- `getOrWaitForComponent()`
- `getOrWaitForStore()`
- `getOrWaitForStoreGenerator()`
- `reactOnRailsStoreLoaded()`
- `streamServerRenderedReactComponent()`
- `serverRenderRSCReactComponent()`

**Migration Guide:**

To migrate to React on Rails Pro:

1. Install the Pro package:

```bash
yarn add react-on-rails-pro
# or
npm install react-on-rails-pro
```

2. Update your imports from `react-on-rails` to `react-on-rails-pro`:

```javascript
// Before
import ReactOnRails from 'react-on-rails';

// After
import ReactOnRails from 'react-on-rails-pro';
```

3. For server-side rendering, update your import paths:

```javascript
// Before
import ReactOnRails from 'react-on-rails';

// After
import ReactOnRails from 'react-on-rails-pro';
```

4. If you're using a free license for personal (non-production) use, you can obtain one at [React on Rails Pro License](https://www.shakacode.com/react-on-rails-pro). The Pro package is free for personal, educational, and non-production usage.

**Note:** If you're not using any of the Pro-only methods listed above, no changes are required.

### [16.1.1] - 2025-09-24

#### Bug Fixes
Expand Down Expand Up @@ -71,7 +117,7 @@ Changes since the last non-beta release.

#### Pro License Features

- **Core/Pro separation**: Moved Pro features into dedicated `lib/react_on_rails/pro/` and `node_package/src/pro/` directories with clear licensing boundaries (now located at `packages/react-on-rails/src/pro/`) [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
- **Core/Pro separation**: Moved Pro features into dedicated `lib/react_on_rails/pro/` and `node_package/src/pro/` directories with clear licensing boundaries (now separated into `packages/react-on-rails-pro/` package) [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
- **Runtime license validation**: Implemented Pro license gating with graceful fallback to core functionality when Pro license unavailable [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
- **Enhanced immediate hydration**: Improved immediate hydration functionality with Pro license validation and warning badges [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
- **License documentation**: Added NOTICE files in Pro directories referencing canonical `REACT-ON-RAILS-PRO-LICENSE.md` [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
Expand Down
6 changes: 2 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ This repository contains code under two different licenses:
The following directories and all their contents are licensed under the **MIT License** (see full text below):

- `lib/react_on_rails/` (excluding `lib/react_on_rails/pro/`)
- `packages/react-on-rails/` (excluding `packages/react-on-rails/src/pro/`)
- `packages/react-on-rails/lib/` (excluding `packages/react-on-rails/lib/pro/`)
- `packages/react-on-rails/` (entire package)
- All other directories in this repository not explicitly listed as Pro-licensed

### Pro Licensed Code

The following directories and all their contents are licensed under the **React on Rails Pro License**:

- `lib/react_on_rails/pro/`
- `packages/react-on-rails/src/pro/`
- `packages/react-on-rails/lib/pro/`
- `packages/react-on-rails-pro/` (entire package)
- `react_on_rails_pro/` (entire directory)

See [REACT-ON-RAILS-PRO-LICENSE.md](./REACT-ON-RAILS-PRO-LICENSE.md) for complete Pro license terms.
Expand Down
Loading
Loading