Skip to content

Commit f4bc390

Browse files
committed
Update CHANGELOG for Pro-only feature validation
1 parent c753c5e commit f4bc390

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ Changes since the last non-beta release.
3737

3838
#### Changed
3939

40-
- **Shakapacker 9.0.0 Upgrade**: Upgraded Shakapacker from 8.2.0 to 9.0.0 with Babel transpiler configuration for compatibility. Key changes include:
40+
- **Pro-Only Feature Validation**: The `immediate_hydration` and `generated_component_packs_loading_strategy` configuration options are now validated as React on Rails Pro-only features. Non-Pro users attempting to use these features will receive a clear error message in development/test environments directing them to either remove the settings or purchase a Pro license. In production, errors are logged without crashing the application for graceful degradation. [PR 1983](https://github.com/shakacode/react_on_rails/pull/1983) by [justin808](https://github.com/justin808).
4141

42+
- **Shakapacker 9.0.0 Upgrade**: Upgraded Shakapacker from 8.2.0 to 9.0.0 with Babel transpiler configuration for compatibility. Key changes include:
4243
- Configured `javascript_transpiler: babel` in shakapacker.yml (Shakapacker 9.0 defaults to SWC which has PropTypes handling issues)
4344
- Added precompile hook support via `bin/shakapacker-precompile-hook` for ReScript builds and pack generation
4445
- Configured CSS Modules to use default exports (`namedExport: false`) for backward compatibility with existing `import styles from` syntax
@@ -100,7 +101,6 @@ To migrate to React on Rails Pro:
100101
**Note:** If you're not using any of the Pro-only methods listed above, no changes are required.
101102

102103
- **Pro-Specific Configurations Moved to Pro Gem**: The following React Server Components (RSC) configurations have been moved from `ReactOnRails.configure` to `ReactOnRailsPro.configure`:
103-
104104
- `rsc_bundle_js_file` - Path to the RSC bundle file
105105
- `react_server_client_manifest_file` - Path to the React server client manifest
106106
- `react_client_manifest_file` - Path to the React client manifest
@@ -126,7 +126,6 @@ To migrate to React on Rails Pro:
126126
See the [React on Rails Pro Configuration docs](https://github.com/shakacode/react_on_rails/blob/master/react_on_rails_pro/docs/configuration.md) for more details.
127127

128128
- **Streaming View Helpers Moved to Pro Gem**: The following view helpers have been removed from the open-source gem and are now only available in React on Rails Pro:
129-
130129
- `stream_react_component` - Progressive SSR using React 18+ streaming
131130
- `rsc_payload_react_component` - RSC payload rendering
132131

@@ -151,12 +150,10 @@ To migrate to React on Rails Pro:
151150
#### New Features
152151

153152
- **Server Bundle Security**: Added new configuration options for enhanced server bundle security and organization:
154-
155153
- `server_bundle_output_path`: Configurable directory (relative to the Rails root) for server bundle output (default: "ssr-generated"). If set to `nil`, the server bundle will be loaded from the same public directory as client bundles. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
156154
- `enforce_private_server_bundles`: When enabled, ensures server bundles are only loaded from private directories outside the public folder (default: false for backward compatibility) [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
157155

158156
- **Improved Bundle Path Resolution**: Bundle path resolution for server bundles now works as follows:
159-
160157
- If `server_bundle_output_path` is set, the server bundle is loaded from that directory.
161158
- If `server_bundle_output_path` is not set, the server bundle falls back to the client bundle directory (typically the public output path).
162159
- If `enforce_private_server_bundles` is enabled:
@@ -268,7 +265,6 @@ See [Release Notes](docs/release-notes/16.0.0.md) for complete migration guide.
268265

269266
- **`defer_generated_component_packs` deprecated** → use `generated_component_packs_loading_strategy`
270267
- Migration:
271-
272268
- `defer_generated_component_packs: true``generated_component_packs_loading_strategy: :defer`
273269
- `defer_generated_component_packs: false``generated_component_packs_loading_strategy: :sync`
274270
- Recommended: `generated_component_packs_loading_strategy: :async` for best performance
@@ -677,7 +673,6 @@ for details.
677673
- Removal of config.symlink_non_digested_assets_regex as it's no longer needed with rails/webpacker.
678674
If any business needs this, we can move the code to a separate gem.
679675
- Added configuration option `same_bundle_for_client_and_server` with default `false` because
680-
681676
1. Production applications would typically have a server bundle that differs from the client bundle
682677
2. This change only affects trying to use HMR with react_on_rails with rails/webpacker.
683678

@@ -1395,13 +1390,11 @@ No changes.
13951390
- Added automatic compilation of assets at precompile is now done by ReactOnRails. Thus, you don't need to provide your own `assets.rake` file that does the precompilation.
13961391
[#398](https://github.com/shakacode/react_on_rails/pull/398) by [robwise](https://github.com/robwise), [jbhatab](https://github.com/jbhatab), and [justin808](https://github.com/justin808).
13971392
- **Migration to v6**
1398-
13991393
- Do not run the generator again if you've already run it.
14001394

14011395
- See [shakacode/react-webpack-rails-tutorial/pull/287](https://github.com/shakacode/react-webpack-rails-tutorial/pull/287) for an example of upgrading from v5.
14021396

14031397
- To configure the asset compilation you can either
1404-
14051398
1. Specify a `config/react_on_rails` setting for `build_production_command` to be nil to turn this feature off.
14061399
2. Specify the script command you want to run to build your production assets, and remove your `assets.rake` file.
14071400

packages/react-on-rails/src/context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { ReactOnRailsInternal, RailsContext } from './types/index.ts';
22

33
declare global {
4-
/* eslint-disable no-var,vars-on-top,no-underscore-dangle */
4+
/* eslint-disable vars-on-top,no-underscore-dangle */
55
var ReactOnRails: ReactOnRailsInternal | undefined;
66
var __REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__: boolean;
7-
/* eslint-enable no-var,vars-on-top,no-underscore-dangle */
7+
/* eslint-enable vars-on-top,no-underscore-dangle */
88
}
99

1010
let currentRailsContext: RailsContext | null = null;

0 commit comments

Comments
 (0)