react-rails 3.2.1 → 3.3.0
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 +4 -4
- data/CHANGELOG.md +27 -6
- data/README.md +15 -2
- data/lib/react/rails/version.rb +1 -1
- data/lib/react/server_rendering/bundle_renderer.rb +2 -0
- data/lib/react/server_rendering/propshaft_container.rb +22 -0
- data/lib/react/server_rendering.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13efe13ea9f8c571c9ea6e2b25381cb340bb5bae81e94c12b780e071ccd4bf7f
|
|
4
|
+
data.tar.gz: 1700688b3ac613a9d5f0809e3630c17cae42bc8317add6824354e6561d2e7201
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a256ed82761889a4c15c492489a296580d713ba5e1655bfcb562f1804a3e05cead1d9695663fa5baa678f181ac451913324fcf2eca9f75c6a1426302fa36b74
|
|
7
|
+
data.tar.gz: 9fe8da002d2b02d091dd06d1db5cccfe84e1f1d1f0464beebc333ac28f86835d3ccfdcf0aa1269d677ef530874b9c7d0835cfc04e66b50b10bed11a05e37f61f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog for React-Rails
|
|
2
2
|
|
|
3
|
-
If you need help upgrading `react-rails`, `webpacker` to `shakapacker`, or JS packages, contact justin@shakacode.com.
|
|
3
|
+
If you need help upgrading `react-rails`, `webpacker` to `shakapacker`, or JS packages, contact justin@shakacode.com. We can upgrade your project and improve your development and customer experiences, allowing you to focus on building new features or fixing bugs instead.
|
|
4
4
|
|
|
5
|
-
[
|
|
5
|
+
For an overview of working with us, see our [Client Engagement Model](https://www.shakacode.com/blog/client-engagement-model/) article and [how we bill for time](https://www.shakacode.com/blog/shortcut-jira-trello-github-toggl-time-and-task-tracking/).
|
|
6
|
+
|
|
7
|
+
We also specialize in helping development teams lower infrastructure and CI costs. Check out our project [Control Plane Flow](https://github.com/shakacode/control-plane-flow/), which can allow you to get the ease of Heroku with the power of Kubernetes and big cost savings.
|
|
8
|
+
|
|
9
|
+
If you think ShakaCode can help your project, [click here](https://meetings.hubspot.com/justingordon/30-minute-consultation) to book a call with [Justin Gordon](mailto:justin@shakacode.com), the creator of React on Rails and Shakapacker.
|
|
10
|
+
|
|
11
|
+
You also might want to consider the [react_on_rails](https://github.com/shakacode/react_on_rails) gem.
|
|
6
12
|
|
|
7
13
|
## Unreleased
|
|
8
14
|
Changes since the last non-beta release.
|
|
9
15
|
|
|
10
|
-
_Please add entries here for your pull requests that
|
|
16
|
+
_Please add entries here for your pull requests that have not yet been released. Include LINKS for PRs and committers._
|
|
17
|
+
|
|
18
|
+
## [3.3.0] - 2024-11-22
|
|
19
|
+
|
|
20
|
+
#### Added
|
|
21
|
+
- Support for Propshaft server rendering. [PR 1345](https://github.com/reactjs/react-rails/pull/1345) by [elektronaut](https://github.com/elektronaut)
|
|
11
22
|
|
|
12
23
|
#### Fixed
|
|
13
|
-
|
|
24
|
+
|
|
25
|
+
- Support `connection_pool` v3 [PR 1367](https://github.com/reactjs/react-rails/pull/1367) by [G-Rath](https://github.com/G-Rath).
|
|
26
|
+
|
|
27
|
+
## [3.2.1] - 2024-05-16
|
|
28
|
+
|
|
29
|
+
#### Fixed
|
|
30
|
+
- Replaced call to ReactRailsUJS.unmountComponents that was erroneously removed by [PR 1290](https://github.com/reactjs/react-rails/pull/1305) in 3.0.0 [PR 1339](https://github.com/reactjs/react-rails/pull/1339).
|
|
14
31
|
|
|
15
32
|
- Prevent roots from being re-created when using React 18 [PR 1305](https://github.com/reactjs/react-rails/pull/1305) by [diogobeda](https://github.com/diogobeda)
|
|
16
33
|
|
|
@@ -48,6 +65,8 @@ _Please add entries here for your pull requests that are not yet released. Inclu
|
|
|
48
65
|
|
|
49
66
|
## [2.7.0] - 2023-05-06
|
|
50
67
|
|
|
68
|
+
[#1209 2.7 Release Discussion](https://github.com/reactjs/react-rails/issues/1209)
|
|
69
|
+
|
|
51
70
|
#### New Features
|
|
52
71
|
- Camelizes keys with primitive values, in addition to hashes #946
|
|
53
72
|
- Expose alternative implementations for `ReactUJS.getConstructor` #1050
|
|
@@ -578,7 +597,9 @@ _Please add entries here for your pull requests that are not yet released. Inclu
|
|
|
578
597
|
- Server rendering with `prerender: true`
|
|
579
598
|
- Transform `.jsx` in the asset pipeline
|
|
580
599
|
|
|
581
|
-
[Unreleased]: https://github.com/reactjs/react-rails/compare/v3.
|
|
600
|
+
[Unreleased]: https://github.com/reactjs/react-rails/compare/v3.3.0...main
|
|
601
|
+
[3.3.0]: https://github.com/reactjs/react-rails/compare/v3.2.1...v3.3.0
|
|
602
|
+
[3.2.1]: https://github.com/reactjs/react-rails/compare/v3.2.0...v3.2.1
|
|
582
603
|
[3.2.0]: https://github.com/reactjs/react-rails/compare/v3.1.1...v3.2.0
|
|
583
604
|
[3.1.1]: https://github.com/reactjs/react-rails/compare/v3.1.0...v3.1.1
|
|
584
605
|
[3.1.0]: https://github.com/reactjs/react-rails/compare/v3.0.0...v3.1.0
|
data/README.md
CHANGED
|
@@ -10,6 +10,7 @@ For version 2.7 documentation, visit the [2.7-stable](https://github.com/reactjs
|
|
|
10
10
|
React-Rails is a flexible tool to use [React](http://facebook.github.io/react/) with Rails. The benefits:
|
|
11
11
|
* Automatically renders React server-side and client-side
|
|
12
12
|
* Supports [Shakapacker](https://github.com/shakacode/shakapacker) v7
|
|
13
|
+
* Supports Propshaft
|
|
13
14
|
* Supports Sprockets 4.x, 3.x
|
|
14
15
|
* Lets you use [JSX](http://facebook.github.io/react/docs/jsx-in-depth.html), [ES6](http://es6-features.org/), [TypeScript](https://www.typescriptlang.org/), [CoffeeScript](http://coffeescript.org/)
|
|
15
16
|
|
|
@@ -17,9 +18,9 @@ React-Rails is a flexible tool to use [React](http://facebook.github.io/react/)
|
|
|
17
18
|
|
|
18
19
|
While ShakaCode will continue to support this gem, you might consider migrating to [React on Rails](https://github.com/shakacode/react_on_rails) or [React on Rails Pro with proper Node rendering](https://www.shakacode.com/react-on-rails-pro/).
|
|
19
20
|
|
|
20
|
-
Why? React on Rails code receives much more active development and testing. For example, consider the [ReactRailsUJS](https://github.com/reactjs/react-rails/blob/
|
|
21
|
+
Why? React on Rails code receives much more active development and testing. For example, consider the [ReactRailsUJS](https://github.com/reactjs/react-rails/blob/main/react_ujs/index.js) implementation compared to the [ReactOnRails Node package](https://github.com/shakacode/react_on_rails/tree/master/node_package) which is written in TypeScript. For another example, React on Rails has work underway to support the latest React features, such as [React Server Components](https://react.dev/reference/rsc/server-components).
|
|
21
22
|
|
|
22
|
-
You can find [migration to React on Rails steps here](https://github.com/reactjs/react-rails/blob/
|
|
23
|
+
You can find [migration to React on Rails steps here](https://github.com/reactjs/react-rails/blob/main/docs/migrating-from-react-rails-to-react_on_rails.md).
|
|
23
24
|
|
|
24
25
|
---
|
|
25
26
|
## ShakaCode Support
|
|
@@ -133,6 +134,18 @@ The following companies provide licenses to the ShakaCode team, supporting the d
|
|
|
133
134
|
<img alt="BrowserStack" src="https://user-images.githubusercontent.com/4244251/184881129-e1edf4b7-3ae1-4ea8-9e6d-3595cf01609e.png" height="55px">
|
|
134
135
|
</picture>
|
|
135
136
|
</a>
|
|
137
|
+
<a href="https://www.honeybadger.io/">
|
|
138
|
+
<picture>
|
|
139
|
+
<img alt="HoneyBadger" src="https://user-images.githubusercontent.com/4244251/184881133-79ee9c3c-8165-4852-958e-31687b9536f4.png" height="70px">
|
|
140
|
+
</picture>
|
|
141
|
+
</a>
|
|
142
|
+
<a href="https://coderabbit.ai">
|
|
143
|
+
<picture>
|
|
144
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://victorious-bubble-f69a016683.media.strapiapp.com/White_Typemark_7229870ac5.svg">
|
|
145
|
+
<source media="(prefers-color-scheme: light)" srcset="https://victorious-bubble-f69a016683.media.strapiapp.com/Orange_Typemark_7958cfa790.svg">
|
|
146
|
+
<img alt="CodeRabbit" src="https://victorious-bubble-f69a016683.media.strapiapp.com/Orange_Typemark_7958cfa790.svg" height="55px">
|
|
147
|
+
</picture>
|
|
148
|
+
</a>
|
|
136
149
|
|
|
137
150
|
---
|
|
138
151
|
|
data/lib/react/rails/version.rb
CHANGED
|
@@ -4,6 +4,7 @@ require "react/server_rendering/environment_container"
|
|
|
4
4
|
require "react/server_rendering/manifest_container"
|
|
5
5
|
require "react/server_rendering/yaml_manifest_container"
|
|
6
6
|
require "react/server_rendering/separate_server_bundle_container"
|
|
7
|
+
require "react/server_rendering/propshaft_container"
|
|
7
8
|
|
|
8
9
|
module React
|
|
9
10
|
module ServerRendering
|
|
@@ -103,6 +104,7 @@ module React
|
|
|
103
104
|
def asset_container_class
|
|
104
105
|
return self.class.asset_container_class if self.class.asset_container_class.present?
|
|
105
106
|
return SeparateServerBundleContainer if SeparateServerBundleContainer.compatible?
|
|
107
|
+
return PropshaftContainer if PropshaftContainer.compatible?
|
|
106
108
|
|
|
107
109
|
return EnvironmentContainer unless assets_precompiled?
|
|
108
110
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module React
|
|
4
|
+
module ServerRendering
|
|
5
|
+
# Return asset contents by getting them from a Propshaft::Assembly instance.
|
|
6
|
+
class PropshaftContainer
|
|
7
|
+
class << self
|
|
8
|
+
def assembly
|
|
9
|
+
::Rails.application.assets
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def compatible?
|
|
13
|
+
!!defined?(Propshaft) && assembly.is_a?(Propshaft::Assembly)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def find_asset(path)
|
|
18
|
+
self.class.assembly.load_path.find(path).content.force_encoding("utf-8")
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -16,7 +16,7 @@ module React
|
|
|
16
16
|
# @return [void]
|
|
17
17
|
def self.reset_pool
|
|
18
18
|
options = { size: pool_size, timeout: pool_timeout }
|
|
19
|
-
@pool = ConnectionPool.new(options) { renderer.new(renderer_options) }
|
|
19
|
+
@pool = ConnectionPool.new(**options) { renderer.new(renderer_options) }
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Check a renderer out of the pool and use it to render the component.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: react-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul O’Shannessy
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2026-03-31 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: appraisal
|
|
@@ -199,16 +199,16 @@ dependencies:
|
|
|
199
199
|
name: pry-byebug
|
|
200
200
|
requirement: !ruby/object:Gem::Requirement
|
|
201
201
|
requirements:
|
|
202
|
-
- - "
|
|
202
|
+
- - "~>"
|
|
203
203
|
- !ruby/object:Gem::Version
|
|
204
|
-
version:
|
|
204
|
+
version: 3.8.0
|
|
205
205
|
type: :development
|
|
206
206
|
prerelease: false
|
|
207
207
|
version_requirements: !ruby/object:Gem::Requirement
|
|
208
208
|
requirements:
|
|
209
|
-
- - "
|
|
209
|
+
- - "~>"
|
|
210
210
|
- !ruby/object:Gem::Version
|
|
211
|
-
version:
|
|
211
|
+
version: 3.8.0
|
|
212
212
|
- !ruby/object:Gem::Dependency
|
|
213
213
|
name: package_json
|
|
214
214
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -397,6 +397,7 @@ files:
|
|
|
397
397
|
- lib/react/server_rendering/environment_container.rb
|
|
398
398
|
- lib/react/server_rendering/exec_js_renderer.rb
|
|
399
399
|
- lib/react/server_rendering/manifest_container.rb
|
|
400
|
+
- lib/react/server_rendering/propshaft_container.rb
|
|
400
401
|
- lib/react/server_rendering/separate_server_bundle_container.rb
|
|
401
402
|
- lib/react/server_rendering/yaml_manifest_container.rb
|
|
402
403
|
homepage: https://github.com/reactjs/react-rails
|
|
@@ -418,7 +419,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
418
419
|
- !ruby/object:Gem::Version
|
|
419
420
|
version: '0'
|
|
420
421
|
requirements: []
|
|
421
|
-
rubygems_version: 3.
|
|
422
|
+
rubygems_version: 3.4.19
|
|
422
423
|
signing_key:
|
|
423
424
|
specification_version: 4
|
|
424
425
|
summary: React integration for Ruby on Rails
|