react_on_rails 12.2.0 → 12.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +12 -10
- data/.rubocop.yml +2 -1
- data/CHANGELOG.md +44 -17
- data/Gemfile.development_dependencies +3 -2
- data/NEWS.md +9 -3
- data/REACT-ON-RAILS-PRO-LICENSE +1 -1
- data/README.md +31 -317
- data/Rakefile +1 -1
- data/SUMMARY.md +21 -12
- data/docs/additional-details/generator-details.md +1 -1
- data/docs/additional-details/manual-installation-overview.md +2 -2
- data/docs/api/view-helpers-api.md +4 -4
- data/docs/contributor-info/linters.md +1 -1
- data/docs/contributor-info/pull-requests.md +1 -1
- data/docs/deployment/heroku-deployment.md +16 -5
- data/docs/{basics → guides}/client-vs-server-rendering.md +1 -1
- data/docs/{basics → guides}/configuration.md +11 -9
- data/docs/{basics → guides}/deployment.md +1 -1
- data/docs/guides/getting-started.md +183 -0
- data/docs/{basics → guides}/hmr-and-hot-reloading-with-the-webpack-dev-server.md +0 -0
- data/docs/{basics → guides}/how-react-on-rails-works.md +3 -2
- data/docs/guides/how-to-conditionally-server-render-based-on-device-type.md +39 -0
- data/docs/guides/how-to-use-different-files-for-client-and-server-rendering.md +98 -0
- data/docs/{basics → guides}/i18n.md +0 -0
- data/docs/{basics → guides}/installation-into-an-existing-rails-app.md +3 -3
- data/docs/{basics → guides}/minitest-configuration.md +0 -0
- data/docs/{rails-webpacker-react-integration-options.md → guides/rails-webpacker-react-integration-options.md} +1 -1
- data/docs/guides/react-on-rails-overview.md +30 -0
- data/docs/{basics → guides}/react-server-rendering.md +2 -2
- data/docs/{basics → guides}/render-functions-and-railscontext.md +0 -0
- data/docs/{basics → guides}/rspec-configuration.md +2 -2
- data/docs/{basics → guides}/tutorial.md +20 -18
- data/docs/{basics → guides}/upgrading-react-on-rails.md +1 -1
- data/docs/{basics → guides}/webpack-configuration.md +1 -1
- data/docs/home.md +19 -378
- data/docs/javascript/code-splitting.md +2 -2
- data/docs/misc/articles.md +1 -1
- data/docs/misc/doctrine.md +3 -3
- data/docs/outdated/rails-assets-relative-paths.md +2 -2
- data/docs/outdated/rails-assets.md +1 -1
- data/docs/rails/convert-rails-5-api-only-app.md +1 -1
- data/docs/rails/rails-engine-integration.md +3 -12
- data/docs/rails/turbolinks.md +13 -1
- data/docs/react-on-rails-pro/react-on-rails-pro.md +43 -0
- data/docs/testimonials/testimonials.md +4 -4
- data/lib/generators/react_on_rails/base_generator.rb +47 -4
- data/lib/generators/react_on_rails/generator_helper.rb +4 -0
- data/lib/generators/react_on_rails/templates/.eslintrc +3 -1
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev +4 -8
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-static +9 -0
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx +2 -1
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css +4 -0
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorldServer.js +5 -0
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/packs/server-bundle.js +8 -0
- data/lib/generators/react_on_rails/templates/base/base/app/views/layouts/hello_world.html.erb +1 -0
- data/lib/generators/react_on_rails/templates/base/base/babel.config.js.tt +15 -0
- data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb +1 -1
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/clientWebpackConfig.js.tt +17 -0
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/commonWebpackConfig.js.tt +15 -0
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/development.js.tt +27 -0
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/production.js.tt +11 -0
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/serverWebpackConfig.js.tt +117 -0
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/webpackConfig.js.tt +36 -0
- data/lib/generators/react_on_rails/templates/base/base/config/webpacker.yml +62 -0
- data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx +2 -1
- data/lib/react_on_rails/helper.rb +6 -0
- data/lib/react_on_rails/locales/base.rb +7 -9
- data/lib/react_on_rails/server_rendering_js_code.rb +13 -0
- data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +9 -0
- data/lib/react_on_rails/version.rb +1 -1
- data/lib/tasks/assets.rake +8 -7
- data/package.json +1 -1
- data/rakelib/example_type.rb +5 -1
- data/rakelib/examples.rake +7 -2
- data/rakelib/release.rake +1 -1
- data/rakelib/task_helpers.rb +7 -0
- data/react_on_rails.gemspec +1 -1
- metadata +35 -19
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-hmr +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28e3d2a5f4910c2d0e1aec7d57f2b3d5073cc3317d65dc92d209608d6b305dcd
|
4
|
+
data.tar.gz: f3280cfe4e5e57aeb60da72928a45ff01df41890ee7ab8a018cb6b4fefef61c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ee357656b8bf3fd8367d6036269f8d844c2e6dc72a6133698930dcfae138bfc7312d44d383dcd8d8db20d67da2b110e177374d18322738619ff4de7d43080e4
|
7
|
+
data.tar.gz: 6a291c92e4d2c86d9b1b6c3bac60a2a4980c7b0c876227d53ad741c802f23a1a63c2bcb451b19a89f0c7e8eb583617d42cafc0810d5f3289866e23def0f8fb8c
|
data/.circleci/config.yml
CHANGED
@@ -69,25 +69,25 @@ aliases:
|
|
69
69
|
- &restore-package-node-modules-cache
|
70
70
|
name: Restore cached node_modules directory
|
71
71
|
keys:
|
72
|
-
-
|
72
|
+
- v5-package-node-modules-cache-{{ checksum "yarn.lock" }}
|
73
73
|
|
74
74
|
# Restore spec/dummy/node_modules dir from cache using yarn.lock checksum as a key.
|
75
75
|
- &restore-dummy-app-node-modules-cache
|
76
76
|
name: Restore cached spec/dummy/node_modules directory
|
77
77
|
keys:
|
78
|
-
-
|
78
|
+
- v5-dummy-app-node-modules-cache-{{ checksum "spec/dummy/yarn.lock" }}
|
79
79
|
|
80
80
|
# Restore vendor/bundle dir from cache using Gemfile.lock checksum as a key.
|
81
81
|
- &restore-dummy-app-gem-cache
|
82
82
|
name: Restore cached Ruby Gems for dummy app
|
83
83
|
keys:
|
84
|
-
-
|
84
|
+
- v5-dummy-app-gem-cache-{{ checksum "spec/dummy/Gemfile.lock" }}
|
85
85
|
|
86
86
|
# Restore vendor/bundle dir from cache using react_on_rails.gemspec checksum as a key.
|
87
87
|
- &restore-package-gem-cache
|
88
88
|
name: Restore cached Ruby Gems for package
|
89
89
|
keys:
|
90
|
-
-
|
90
|
+
- v5-package-app-gem-cache-{{ checksum "react_on_rails.gemspec" }}
|
91
91
|
|
92
92
|
# NOTE: Sometimes CI generated docker images are not updated in time to keep up with the minimum required
|
93
93
|
# by chromedriver versions of Chrome. Just bump here Chrome version if chromedriver raises errors
|
@@ -139,7 +139,7 @@ jobs:
|
|
139
139
|
- run: *install-package-node-modules
|
140
140
|
- save_cache:
|
141
141
|
name: Save root node_modules to cache
|
142
|
-
key:
|
142
|
+
key: v5-package-node-modules-cache-{{ checksum "yarn.lock" }}
|
143
143
|
paths:
|
144
144
|
- node_modules
|
145
145
|
|
@@ -157,7 +157,7 @@ jobs:
|
|
157
157
|
- run: *install-dummy-app-node-modules
|
158
158
|
- save_cache:
|
159
159
|
name: Save spec/dummy/node_modules to cache
|
160
|
-
key:
|
160
|
+
key: v5-dummy-app-node-modules-cache-{{ checksum "spec/dummy/yarn.lock" }}
|
161
161
|
paths:
|
162
162
|
- spec/dummy/node_modules
|
163
163
|
- spec/dummy/node_modules
|
@@ -172,7 +172,7 @@ jobs:
|
|
172
172
|
- run: *install-package-ruby-gems
|
173
173
|
- save_cache:
|
174
174
|
name: Save dummy app ruby gems to cache
|
175
|
-
key:
|
175
|
+
key: v5-package-app-gem-cache-{{ checksum "react_on_rails.gemspec" }}
|
176
176
|
paths:
|
177
177
|
- vendor/bundle
|
178
178
|
|
@@ -186,7 +186,7 @@ jobs:
|
|
186
186
|
- run: *install-dummy-app-ruby-gems
|
187
187
|
- save_cache:
|
188
188
|
name: Save dummy app ruby gems to cache
|
189
|
-
key:
|
189
|
+
key: v5-dummy-app-gem-cache-{{ checksum "spec/dummy/Gemfile.lock" }}
|
190
190
|
paths:
|
191
191
|
- spec/dummy/vendor/bundle
|
192
192
|
|
@@ -209,7 +209,7 @@ jobs:
|
|
209
209
|
command: cd spec/dummy && yarn run build:test
|
210
210
|
- save_cache:
|
211
211
|
name: Save test webpack bundles to cache (for build number checksum used by rspec job)
|
212
|
-
key:
|
212
|
+
key: v5-dummy-app-webpack-bundle-{{ .Revision }}
|
213
213
|
paths:
|
214
214
|
- spec/dummy/public/webpack
|
215
215
|
# Run JS unit tests for Renderer package.
|
@@ -249,7 +249,7 @@ jobs:
|
|
249
249
|
- restore_cache: *restore-dummy-app-gem-cache
|
250
250
|
- restore_cache:
|
251
251
|
name: Restore cached webpack bundles for dummy app
|
252
|
-
key:
|
252
|
+
key: v5-dummy-app-webpack-bundle-{{ .Revision }}
|
253
253
|
- restore_cache: *restore-dummy-app-node-modules-cache
|
254
254
|
- restore_cache: *restore-package-node-modules-cache
|
255
255
|
- run: *install-package-node-modules
|
@@ -288,6 +288,8 @@ jobs:
|
|
288
288
|
path: ~/rspec
|
289
289
|
- store_artifacts:
|
290
290
|
path: spec/dummy/tmp/capybara
|
291
|
+
- store_artifacts:
|
292
|
+
path: spec/dummy/tmp/screenshots
|
291
293
|
- store_artifacts:
|
292
294
|
path: spec/dummy/log/test.log
|
293
295
|
- store_artifacts:
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project's source code will be documented in this file. Items under `Unreleased` is upcoming features that will be out in next version. NOTE: major versions of the npm module and the gem must be kept in sync.
|
3
3
|
|
4
|
-
Migration instructions for the major updates can be found [here](docs/
|
4
|
+
Migration instructions for the major updates can be found [here](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails#upgrading-to-version-9.md). Some smaller migration information can be found here.
|
5
5
|
|
6
6
|
## Need Help Migrating?
|
7
7
|
If you would like help in migrating between React on Rails versions or help with implementing server rendering, please contact [justin@shakacode.com](mailto:justin@shakacode.com) for information about our [React on Rails Pro Support Options](https://www.shakacode.com/react-on-rails-pro).
|
@@ -17,14 +17,39 @@ Changes since last non-beta release.
|
|
17
17
|
|
18
18
|
*Please add entries here for your pull requests that are not yet released.*
|
19
19
|
|
20
|
+
### [12.5.0] - 2021-12-26
|
21
|
+
|
22
|
+
#### Added
|
23
|
+
- Added webpack configuration files as part of the generator and updated webpacker to version 6 [PR 1404](https://github.com/shakacode/react_on_rails/pull/1404) by [gscarv13](https://github.com/gscarv13).
|
24
|
+
- Supports Rails 7.
|
25
|
+
|
26
|
+
#### Changed
|
27
|
+
- Changed logic of determining the usage of the default rails/webpacker webpack config or a custom command to only check if the config.build_production_command is defined. [PR 1402](https://github.com/shakacode/react_on_rails/pull/1402)by [justin808](https://github.com/justin808) and [gscarv13](https://github.com/gscarv13).
|
28
|
+
- Minimimum required Ruby is 2.7 to match lastest rails/webpacker.
|
29
|
+
|
30
|
+
### [12.4.0] - 2021-09-22
|
31
|
+
#### Added
|
32
|
+
- ScoutAPM tracing support for server rendering [PR 1379](https://github.com/shakacode/react_on_rails/pull/1379) by [justin808](https://github.com/justin808).
|
33
|
+
|
34
|
+
- Ability to stop React on Rails from modifying or creating the `assets:precompile` task. [PR 1371](https://github.com/shakacode/react_on_rails/pull/1371) by [justin808](https://github.com/justin808). Thanks to [elstgav](https://github.com/elstgav) for [the suggestion](https://github.com/shakacode/react_on_rails/issues/1368)!
|
35
|
+
|
36
|
+
- Ability to stop stubbing of setTimeout, setInterval, & clearTimeout conditional by setting `ReactOnRailsPro.config.include_execjs_polyfills = false` in the React on Rails Pro configuration file. Also, added the ability to have render functions return a promise to be awaited by React on Rails Pro Node Renderer. [PR 1380](https://github.com/shakacode/react_on_rails/pull/1380) by [judahmeek](https://github.com/judahmeek)
|
37
|
+
|
38
|
+
### [12.3.0] - 2021-07-26
|
39
|
+
#### Added
|
40
|
+
- Ability to use with Turbo (@hotwired/turbo), as Turbolinks gets obsolete. [PR 1374](https://github.com/shakacode/react_on_rails/pull/1374) by [pgruener](https://github.com/pgruener) and [PR 1377](https://github.com/shakacode/react_on_rails/pull/1377) by [mdesantis](https://github.com/mdesantis).
|
41
|
+
|
42
|
+
To configure turbo the following option can be set:
|
43
|
+
`ReactOnRails.setOptions({ turbo: true })`
|
44
|
+
|
20
45
|
### [12.2.0] - 2021-03-25
|
21
46
|
#### Added
|
22
47
|
- Ability to configure server react rendering to throw rather than just logging the error. Useful for
|
23
48
|
React on Rails Pro Node rendering [PR 1365](https://github.com/shakacode/react_on_rails/pull/1365) by [justin808](https://github.com/justin808).
|
24
|
-
|
49
|
+
|
25
50
|
### [12.1.0] - 2021-03-23
|
26
51
|
#### Added
|
27
|
-
- Added the ability to assign a module with a `call` method to `config.build_production_command`. See [the configuration docs](
|
52
|
+
- Added the ability to assign a module with a `call` method to `config.build_production_command`. See [the configuration docs](https://www.shakacode.com/react-on-rails/docs/guides/configuration). [PR 1362: Accept custom module for config.build_production_command](https://github.com/shakacode/react_on_rails/pull/1362).
|
28
53
|
|
29
54
|
#### Fixed
|
30
55
|
- Stop setting NODE_ENV value during precompile, as it interferred with rails/webpacker's setting of NODE_ENV to production by default. Fixes [#1334](https://github.com/shakacode/react_on_rails/issues/1334). [PR 1356: Don't set NODE_ENV in assets.rake](https://github.com/shakacode/react_on_rails/pull/1356) by [alexrozanski](https://github.com/alexrozanski).
|
@@ -43,14 +68,14 @@ Changes since last non-beta release.
|
|
43
68
|
|
44
69
|
### [12.0.2] - 2020-07-09
|
45
70
|
#### Fixed
|
46
|
-
- Remove dependency upon Redux for Typescript types. [PR 1323](https://github.com/shakacode/react_on_rails/pull/
|
71
|
+
- Remove dependency upon Redux for Typescript types. [PR 1323](https://github.com/shakacode/react_on_rails/pull/1323) by [justin808](https://github.com/justin808).
|
47
72
|
|
48
73
|
### [12.0.1] - 2020-07-09
|
49
74
|
#### Fixed
|
50
75
|
- Changed invocation of webpacker:clean to use a very large number of versions so it does not acidentally delete the server-bundle.js. [PR 1306](https://github.com/shakacode/react_on_rails/pull/1306) by By [justin808](https://github.com/justin808).
|
51
76
|
|
52
77
|
### [12.0.0] - 2020-07-08
|
53
|
-
For upgrade instructions, see [docs/
|
78
|
+
For upgrade instructions, see [docs/guides/upgrading-react-on-rails.md](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails).
|
54
79
|
|
55
80
|
#### Major Improvements
|
56
81
|
1. **React Hooks Support** for top level components
|
@@ -66,7 +91,7 @@ set JavaScript property `renderFunction` on the function for which you want to r
|
|
66
91
|
invoked to return the React component. In that case, you won't need to pass any unused params.
|
67
92
|
[PR 1268](https://github.com/shakacode/react_on_rails/pull/1268) by [justin808](https://github.com/justin808)
|
68
93
|
|
69
|
-
See [docs/
|
94
|
+
See [docs/guides/upgrading-react-on-rails](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails#upgrading-to-v12)
|
70
95
|
for details.
|
71
96
|
|
72
97
|
#### Other Updates
|
@@ -335,7 +360,7 @@ Updated React on Rails to depend on [rails/webpacker](https://github.com/rails/w
|
|
335
360
|
|
336
361
|
|
337
362
|
#### 9.0 from 8.x. Upgrade Instructions
|
338
|
-
Moved to [our documentation](docs/
|
363
|
+
Moved to [our documentation](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails#upgrading-to-version-9).
|
339
364
|
|
340
365
|
### [8.0.7] - 2017-08-16
|
341
366
|
#### Fixed
|
@@ -685,7 +710,7 @@ Here is the addition to the generated config file:
|
|
685
710
|
## [5.2.0] - 2016-04-08
|
686
711
|
##### Added
|
687
712
|
- Support for React 15.0 to react_on_rails. See [#379](https://github.com/shakacode/react_on_rails/pull/379) by [brucek](https://github.com/brucek).
|
688
|
-
- Support for Node.js server side rendering. See [#380](https://github.com/shakacode/react_on_rails/pull/380) by [alleycat](https://github.com/alleycat-at-git) and [doc](https://
|
713
|
+
- Support for Node.js server side rendering. See [#380](https://github.com/shakacode/react_on_rails/pull/380) by [alleycat](https://github.com/alleycat-at-git) and [doc](https://www.shakacode.com/react-on-rails/docs/react-on-rails-pro/react-on-rails-pro#pro-integration-with-nodejs-for-server-rendering)
|
689
714
|
|
690
715
|
##### Removed
|
691
716
|
- Generator removals to simplify installer. See [#364](https://github.com/shakacode/react_on_rails/pull/364) by [jbhatab](https://github.com/jbhatab).
|
@@ -818,11 +843,11 @@ All 5.1.0 changes can be found in [#362](https://github.com/shakacode/react_on_r
|
|
818
843
|
<%= react_component("ReduxSharedStoreApp", props: {}, prerender: false, trace: true) %>
|
819
844
|
```
|
820
845
|
You'll get a deprecation message to change this.
|
821
|
-
- Renamed `ReactOnRails.configure_rspec_to_compile_assets` to `ReactOnRails::TestHelper.configure_rspec_to_compile_assets`. The code has also been optimized to check for whether or not the compiled webpack bundles are up to date or not and will not run if not necessary. If you are using non-standard directories for your generated webpack assets (`app/assets/javascripts/generated` and `app/assets/stylesheets/generated`) or have additional directories you wish the helper to check, you need to update your ReactOnRails configuration accordingly. See [documentation](https://
|
846
|
+
- Renamed `ReactOnRails.configure_rspec_to_compile_assets` to `ReactOnRails::TestHelper.configure_rspec_to_compile_assets`. The code has also been optimized to check for whether or not the compiled webpack bundles are up to date or not and will not run if not necessary. If you are using non-standard directories for your generated webpack assets (`app/assets/javascripts/generated` and `app/assets/stylesheets/generated`) or have additional directories you wish the helper to check, you need to update your ReactOnRails configuration accordingly. See [documentation](https://www.shakacode.com/react-on-rails/docs/guides/rspec_configuration) for how to do this. [#253](https://github.com/shakacode/react_on_rails/pull/253).
|
822
847
|
- You have to call `ReactOnRails.register` to register react components. This was deprecated in v2. [#273](https://github.com/shakacode/react_on_rails/pull/273).
|
823
848
|
|
824
849
|
##### Migration Steps v2 to v3
|
825
|
-
- [spec/dummy/spec/rails_helper.rb](https://github.com/shakacode/react_on_rails/blob/master/spec
|
850
|
+
- See [these changes of spec/dummy/spec/rails_helper.rb](https://github.com/shakacode/react_on_rails/blob/master/spec/dummy/spec/rails_helper.rb#L36..38) for an example. Add this line to your `rails_helper.rb`:
|
826
851
|
```ruby
|
827
852
|
RSpec.configure do |config|
|
828
853
|
# Ensure that if we are running js tests, we are using latest webpack assets
|
@@ -838,7 +863,7 @@ RSpec.configure do |config|
|
|
838
863
|
|
839
864
|
## [2.2.0] - 2016-01-29
|
840
865
|
##### Added
|
841
|
-
- New JavaScript API for debugging TurboLinks issues. Be sure to see [turbolinks docs](
|
866
|
+
- New JavaScript API for debugging TurboLinks issues. Be sure to see [turbolinks docs](https://www.shakacode.com/react-on-rails/docs/rails/turbolinks). `ReactOnRails.setOptions({ traceTurbolinks: true });`. Removed the file `debug_turbolinks` added in 2.1.1. See [#243](https://github.com/shakacode/react_on_rails/pull/243).
|
842
867
|
|
843
868
|
## [2.1.1] - 2016-01-28
|
844
869
|
|
@@ -847,21 +872,21 @@ RSpec.configure do |config|
|
|
847
872
|
|
848
873
|
##### Added
|
849
874
|
- `ReactOnRails.render` returns a virtualDomElement Reference to your React component's backing instance. See [#234](https://github.com/shakacode/react_on_rails/pull/234).
|
850
|
-
- `debug_turbolinks` helper for debugging turbolinks issues. See [turbolinks](
|
875
|
+
- `debug_turbolinks` helper for debugging turbolinks issues. See [turbolinks](https://www.shakacode.com/react-on-rails/docs/rails/turbolinks).
|
851
876
|
- Enhanced regression testing for non-turbolinks apps. Runs all tests for dummy app with turbolinks both disabled and enabled.
|
852
877
|
|
853
878
|
## [2.1.0] - 2016-01-26
|
854
879
|
##### Added
|
855
|
-
- Added EnsureAssetsCompiled feature so that you do not accidentally run tests without properly compiling the JavaScript bundles. Add a line to your `rails_helper.rb` file to check that the latest Webpack bundles have been generated prior to running tests that may depend on your client-side code. See [docs](
|
856
|
-
- Added [migration guide](https://
|
857
|
-
- Added [React on Rails Doctrine](docs/doctrine
|
880
|
+
- Added EnsureAssetsCompiled feature so that you do not accidentally run tests without properly compiling the JavaScript bundles. Add a line to your `rails_helper.rb` file to check that the latest Webpack bundles have been generated prior to running tests that may depend on your client-side code. See [docs](https://www.shakacode.com/react-on-rails/docs/guides/rspec_configuration) for more detailed instructions. [#222](https://github.com/shakacode/react_on_rails/pull/222)
|
881
|
+
- Added [migration guide](https://www.shakacode.com/react-on-rails/docs/additional-details/migrating-from-react-rails) for migrating from React-Rails. [#219](https://github.com/shakacode/react_on_rails/pull/219)
|
882
|
+
- Added [React on Rails Doctrine](https://www.shakacode.com/react-on-rails/docs/misc/doctrine) to docs. Discusses the project's motivations, conventions, and principles. [#220](https://github.com/shakacode/react_on_rails/pull/220)
|
858
883
|
- Added ability to skip `display:none` style in the generated content tag for a component. Some developers may want to disable inline styles for security reasons. See generated config [initializer file](lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb#L27) for example on setting `skip_display_none`. [#218](https://github.com/shakacode/react_on_rails/pull/218)
|
859
884
|
|
860
885
|
##### Changed
|
861
886
|
- Changed message when running the dev (a.k.a. "express" server). [#227](https://github.com/shakacode/react_on_rails/commit/543ae70254d0c7b477e2c92af86f40746e58a431)
|
862
887
|
|
863
888
|
##### Fixed
|
864
|
-
- Fixed handling of Turbolinks. Code was checking that Turbolinks was installed when it was not yet because some setups load Turbolinks after the bundles. The changes to the code will check if Turbolinks is installed after the page loaded event fires. Code was also added to allow easy debugging of Turbolinks, which should be useful when v5 of Turbolinks is released shortly. Details of how to configure Turbolinks with troubleshooting were added to docs
|
889
|
+
- Fixed handling of Turbolinks. Code was checking that Turbolinks was installed when it was not yet because some setups load Turbolinks after the bundles. The changes to the code will check if Turbolinks is installed after the page loaded event fires. Code was also added to allow easy debugging of Turbolinks, which should be useful when v5 of Turbolinks is released shortly. Details of how to configure Turbolinks with troubleshooting were added to `docs` directory. [#221](https://github.com/shakacode/react_on_rails/pull/221)
|
865
890
|
- Fixed issue with already initialized constant warning appearing when starting a Rails server [#226](https://github.com/shakacode/react_on_rails/pull/226)
|
866
891
|
- Fixed to make backwards compatible with Ruby v2.0 and updated all Ruby and Node dependencies.
|
867
892
|
|
@@ -959,7 +984,9 @@ Best done with Object destructing:
|
|
959
984
|
##### Fixed
|
960
985
|
- Fix several generator related issues.
|
961
986
|
|
962
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/12.
|
987
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/12.4.0...master
|
988
|
+
[12.4.0]: https://github.com/shakacode/react_on_rails/compare/12.3.0...12.4.0
|
989
|
+
[12.3.0]: https://github.com/shakacode/react_on_rails/compare/12.2.0...12.3.0
|
963
990
|
[12.2.0]: https://github.com/shakacode/react_on_rails/compare/12.1.0...12.2.0
|
964
991
|
[12.1.0]: https://github.com/shakacode/react_on_rails/compare/12.0.4...12.1.0
|
965
992
|
[12.0.4]: https://github.com/shakacode/react_on_rails/compare/12.0.3...12.0.4
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
gem "webpacker"
|
3
|
+
gem "webpacker", "6.0.0.rc.6"
|
4
4
|
gem "bootsnap", require: false
|
5
5
|
gem "rails"
|
6
6
|
gem "sqlite3"
|
@@ -20,6 +20,7 @@ gem "sdoc", group: :doc
|
|
20
20
|
gem "sprockets"
|
21
21
|
|
22
22
|
gem "amazing_print"
|
23
|
+
|
23
24
|
gem "mini_racer"
|
24
25
|
|
25
26
|
group :development, :test do
|
@@ -29,7 +30,7 @@ group :development, :test do
|
|
29
30
|
gem "pry-doc"
|
30
31
|
gem "pry-rails"
|
31
32
|
gem "pry-rescue"
|
32
|
-
gem "rubocop", require: false
|
33
|
+
gem "rubocop", "1.14.0", require: false
|
33
34
|
gem "rubocop-performance", require: false
|
34
35
|
gem "rubocop-rspec", require: false
|
35
36
|
gem "scss_lint", require: false
|
data/NEWS.md
CHANGED
@@ -1,21 +1,27 @@
|
|
1
1
|
# NEWS
|
2
2
|
|
3
|
-
*
|
3
|
+
*A history of the news. A few bullets at the top will also show on the [README.md](./README.md).*
|
4
4
|
|
5
|
+
* **October 14, 2020**: [RUBY ROGUES
|
6
|
+
RR 474: React on Rails V12 – Don’t Shave That Yak! with Justin Gordon](https://devchat.tv/ruby-rogues/rr-474-react-on-rails-v12-dont-shave-that-yak-with-justin-gordon/).
|
7
|
+
|
8
|
+
* **October 1, 2020**: See the [spec/dummy](https://github.com/shakacode/react_on_rails/tree/master/spec/dummy) example repo for a simple configuration of webpack via the rails/webpacker gem
|
9
|
+
that supports SSR.
|
10
|
+
* **August 2, 2020**: See the example repo of [React on Rails Tutorial With SSR, HMR fast refresh, and TypeScript](https://github.com/shakacode/react_on_rails_tutorial_with_ssr_and_hmr_fast_refresh) for a new way to setup the creation of your SSR bundle with `rails/webpacker`.
|
5
11
|
* July 8, 2020: Release **v12**.
|
6
12
|
1. **React Hooks Support** for top level components
|
7
13
|
2. **Typescript bindings**
|
8
14
|
3. **rails/webpacker** "just works" with React on Rails by default.
|
9
15
|
4. i18n support for generating a JSON file rather than a JS file.
|
10
16
|
* 2018-02-27: **Version 10.1.2** Supports the React API for ReactDOM.hydrate.
|
11
|
-
* 2017-09-06: **VERSION 9.0.0 shipped!** This version depends on Webpacker directly. See [Upgrading React on Rails](./docs/
|
17
|
+
* 2017-09-06: **VERSION 9.0.0 shipped!** This version depends on Webpacker directly. See [Upgrading React on Rails](./docs/guides/upgrading-react-on-rails.md) for more concise instructions on upgrading.
|
12
18
|
* Always see the [CHANGELOG.md](./CHANGELOG.md) for the latest project changes.
|
13
19
|
* [VERSION 8.1.0](https://rubygems.org/gems/react_on_rails/) shipped with [webpacker_lite](https://github.com/shakacode/webpacker_lite) (soon [**webpacker**](https://github.com/rails/webpacker/issues/464#issuecomment-310986140) support! [react-webpack-rails-tutorial PR #395](https://github.com/shakacode/react-webpack-rails-tutorial/pull/395) shows the changes needed to migrate from the Asset Pipeline to Webpacker Lite. For more information, see my article: [Webpacker Lite: Why Fork Webpacker?](https://blog.shakacode.com/webpacker-lite-why-fork-webpacker-f0a7707fac92). Per recent discussions, we [will merge Webpacker Lite changes back into Webpacker](https://github.com/rails/webpacker/issues/464#issuecomment-310986140). There's no reason to wait for this. The upgrade will eventually be trivial.
|
14
20
|
* 2017-04-25: 7.0.0 Shipped! Performance improvements! Please upgrade! Only "breaking" change is that you have to update both the node module and the Ruby gem.
|
15
21
|
* 2017-04-09: 8.0.0 beta work to include webpacker_lite gem has begun. See [#786](https://github.com/shakacode/react_on_rails/issues/786).
|
16
22
|
* 2017-04-03: 6.9.3 Released! Props rendered in JSON script tag. Page size is smaller now due to less escaping!
|
17
23
|
* 2017-03-06: Updated to Webpack v2!
|
18
|
-
* 2017-03-02: Demo of internationalization (i18n) is live at [reactrails.com](https://www.reactrails.com/). Docs [here](docs/
|
24
|
+
* 2017-03-02: Demo of internationalization (i18n) is live at [reactrails.com](https://www.reactrails.com/). Docs [here](docs/guides/i18n.md).
|
19
25
|
* 2017-02-28: See [discussions here on Webpacker](https://github.com/rails/webpacker/issues/139) regarding how Webpacker will allow React on Rails to avoid using the asset pipeline in the near future.
|
20
26
|
* 2017-02-28: Upgrade to Webpack v2 or use the `--bail` option in your webpack script for test and production builds. See the discussion on [PR #730](https://github.com/shakacode/react_on_rails/pull/730).
|
21
27
|
* 2016-11-03: Spoke at [LA Ruby: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp).
|
data/REACT-ON-RAILS-PRO-LICENSE
CHANGED
@@ -82,7 +82,7 @@ In no event will ShakaCode's liability exceed the Software license price as indi
|
|
82
82
|
|
83
83
|
13.5 Indemnification. You agree to defend, indemnify, and hold harmless ShakaCode from and against any lawsuits, claims, losses, damages, fines and expenses (including attorneys' fees and costs) arising out of your use of the Software or breach of this Agreement.
|
84
84
|
|
85
|
-
13.6 Governing Law. This Agreement is governed by the laws of the State of
|
85
|
+
13.6 Governing Law. This Agreement is governed by the laws of the State of Hawaii and the United States without regard to conflicts of laws provisions thereof, and without regard to the United Nations Convention on the International Sale of Goods or the Uniform Computer Information Transactions Act, as currently enacted by any jurisdiction or as may be codified or amended from time to time by any jurisdiction. The jurisdiction and venue for actions related to the subject matter hereof shall be the state of Hawaii and United States federal courts located in Kahului, Hawaii, and both parties hereby submit to the personal jurisdiction of such courts.
|
86
86
|
|
87
87
|
13.7 Attorneys’ Fees and Costs. The prevailing party in any action to enforce this Agreement will be entitled to recover its attorneys’ fees and costs in connection with such action.
|
88
88
|
|