react_on_rails_pro 16.2.0.beta.11 → 16.2.0.beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b6739f19bed16cd9ee87ddefa25d330e2fdc02d93d9e9f509248a7cb015dc1c
4
- data.tar.gz: 9de8c07648f2716cd207bdd0cff6f0c6e4f0e86bc0d21bd4ca7435544b179fae
3
+ metadata.gz: 854f5a9777992949bb7a47ffeda999372725350e20fb8dfb8cf22d45892a5367
4
+ data.tar.gz: b2ec876cfcb9952a736538500b5d726f4ef53a1f97f20aff6b7ba36d53d60737
5
5
  SHA512:
6
- metadata.gz: 302b9ee59324e7408f410d1e7a910bb590e50d5dd7bffa69d59c45223254091cbedbe5d8a4670bd7bc4365af352d387330a222ed6feef216cd03e80d3421a6e2
7
- data.tar.gz: 2e64288aec2b1ea624ba056c066dddf540a89c27b1b5d8cc35a4b97a2d19eb665d3f6dea6624908987f4d2baddd71f1f5e472e0ba537713cf001ad8302604bd1
6
+ metadata.gz: 1e6aa9a0a171a777584f454c41114cf9732634b926b47508338f069510c86fbc640882db27014a601582ebc365f98d44d3948af2ca668646d76055e505a4a6ef
7
+ data.tar.gz: 4024bbdb1c7537d10907eb29f0b5af5cbf120e4d04d6820fd2e25991712391fac3a14ea40b2b475a8c711f770f8ae922c60ed4bcabe163a0ffc20141a3a68168
data/CHANGELOG.md CHANGED
@@ -20,13 +20,12 @@ You can find the **package** version numbers from this repo's tags and below in
20
20
  _Add changes in master not yet tagged._
21
21
 
22
22
  ### Improved
23
- - Significantly improved streaming performance by processing React components concurrently instead of sequentially. This reduces latency and improves responsiveness when using `stream_view_containing_react_components`.
24
23
 
25
- ### Added
26
- - Added `config.concurrent_component_streaming_buffer_size` configuration option to control the memory buffer size for concurrent component streaming (defaults to 64). This allows fine-tuning of memory usage vs. performance for streaming applications.
24
+ - **Concurrent Streaming Performance**: Implemented concurrent draining of streamed React components using the async gem. Instead of processing components sequentially, the system now uses a producer-consumer pattern with bounded buffering to allow multiple components to stream simultaneously while maintaining per-component chunk ordering. This significantly reduces latency and improves responsiveness when using `stream_view_containing_react_components`. [PR 2015](https://github.com/shakacode/react_on_rails/pull/2015) by [ihabadham](https://github.com/ihabadham).
27
25
 
28
26
  ### Added
29
27
 
28
+ - Added `config.concurrent_component_streaming_buffer_size` configuration option to control the memory buffer size for concurrent component streaming (defaults to 64). This allows fine-tuning of memory usage vs. performance for streaming applications.
30
29
  - Added `cached_stream_react_component` helper method, similar to `cached_react_component` but for streamed components.
31
30
  - **License Validation System**: Implemented comprehensive JWT-based license validation with offline verification using RSA-256 signatures. License validation occurs at startup in both Ruby and Node.js environments. Supports required fields (`sub`, `iat`, `exp`) and optional fields (`plan`, `organization`, `iss`). FREE evaluation licenses are available for 3 months at [shakacode.com/react-on-rails-pro](https://shakacode.com/react-on-rails-pro). [PR #1857](https://github.com/shakacode/react_on_rails/pull/1857) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
32
31
  - **Pro-Specific Configurations Moved from Open-Source**: The following React Server Components (RSC) configurations are now exclusively in the Pro gem and should be configured in `ReactOnRailsPro.configure`:
@@ -46,9 +45,17 @@ _Add changes in master not yet tagged._
46
45
 
47
46
  - **Node Renderer Gem Version Validation**: The node renderer now validates that the Ruby gem version (`react_on_rails_pro`) matches the node renderer package version (`@shakacode-tools/react-on-rails-pro-node-renderer`) on every render request. Environment-aware: strict enforcement in development (returns 412 Precondition Failed on mismatch), permissive in production (allows with warning). Includes version normalization to handle Ruby gem vs NPM format differences (e.g., `4.0.0.rc.1` vs `4.0.0-rc.1`). [PR #1881](https://github.com/shakacode/react_on_rails/pull/1881) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
48
47
 
48
+ ### Fixed
49
+
50
+ - **Node Renderer Worker Restart**: Fixed "descriptor closed" error that occurred when the node renderer restarts while handling an in-progress request (especially streaming requests). Workers now perform graceful shutdowns: they disconnect from the cluster to stop receiving new requests, wait for active requests to complete, then shut down cleanly. A configurable `gracefulWorkerRestartTimeout` ensures workers are forcibly killed if they don't shut down in time. [PR 1970](https://github.com/shakacode/react_on_rails/pull/1970) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
51
+
52
+ - **Body Duplication Bug On Streaming**: Fixed a bug that happens while streaming if the node renderer connection closed after streaming some chunks to the client. [PR 1995](https://github.com/shakacode/react_on_rails/pull/1995) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
53
+
49
54
  ### Changed
50
55
 
51
- - Renamed Node Renderer configuration option `bundlePath` to `serverBundleCachePath` to better clarify its purpose as a cache directory for uploaded server bundles, distinct from Shakapacker's public asset directory. The old `bundlePath` property and `RENDERER_BUNDLE_PATH` environment variable continue to work with deprecation warnings. [PR 2008](https://github.com/shakacode/react_on_rails/pull/2008) by [justin808](https://github.com/justin808).
56
+ ### Deprecated
57
+
58
+ - **Node Renderer Configuration**: Renamed `bundlePath` configuration option to `serverBundleCachePath` in the node renderer to better describe its purpose and avoid confusion with Shakapacker's public bundle path. The old `bundlePath` option continues to work with deprecation warnings. Both `RENDERER_SERVER_BUNDLE_CACHE_PATH` (new) and `RENDERER_BUNDLE_PATH` (deprecated) environment variables are supported. [PR 2008](https://github.com/shakacode/react_on_rails/pull/2008) by [justin808](https://github.com/justin808).
52
59
 
53
60
  ### Changed (Breaking)
54
61
 
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: ..
11
11
  specs:
12
- react_on_rails (16.2.0.beta.11)
12
+ react_on_rails (16.2.0.beta.12)
13
13
  addressable
14
14
  connection_pool
15
15
  execjs (~> 2.5)
@@ -20,7 +20,7 @@ PATH
20
20
  PATH
21
21
  remote: .
22
22
  specs:
23
- react_on_rails_pro (16.2.0.beta.11)
23
+ react_on_rails_pro (16.2.0.beta.12)
24
24
  addressable
25
25
  async (>= 2.6)
26
26
  connection_pool
@@ -28,7 +28,7 @@ PATH
28
28
  httpx (~> 1.5)
29
29
  jwt (~> 2.7)
30
30
  rainbow
31
- react_on_rails (= 16.2.0.beta.11)
31
+ react_on_rails (= 16.2.0.beta.12)
32
32
 
33
33
  GEM
34
34
  remote: https://rubygems.org/
@@ -347,7 +347,8 @@ module ReactOnRailsProHelper
347
347
  render_options: render_options
348
348
  )
349
349
  else
350
- result_console_script = render_options.replay_console ? chunk_json_result["consoleReplayScript"] : ""
350
+ console_script = chunk_json_result["consoleReplayScript"]
351
+ result_console_script = render_options.replay_console ? wrap_console_script_with_nonce(console_script) : ""
351
352
  # No need to prepend component_specification_tag or add rails context again
352
353
  # as they're already included in the first chunk
353
354
  compose_react_component_html_with_spec_and_console(
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReactOnRailsPro
4
- VERSION = "16.2.0.beta.11"
4
+ VERSION = "16.2.0.beta.12"
5
5
  PROTOCOL_VERSION = "2.0.0"
6
6
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails-pro-node-renderer",
3
- "version": "16.2.0-beta.11",
3
+ "version": "16.2.0-beta.12",
4
4
  "protocolVersion": "2.0.0",
5
5
  "description": "react-on-rails-pro JavaScript for react_on_rails_pro Ruby gem",
6
6
  "exports": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_on_rails_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.2.0.beta.11
4
+ version: 16.2.0.beta.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-11-20 00:00:00.000000000 Z
11
+ date: 2025-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 16.2.0.beta.11
117
+ version: 16.2.0.beta.12
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 16.2.0.beta.11
124
+ version: 16.2.0.beta.12
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler
127
127
  requirement: !ruby/object:Gem::Requirement