react_on_rails 14.2.0 → 14.2.1
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 +13 -1
- data/Gemfile.lock +1 -1
- data/lib/generators/react_on_rails/dev_tests_generator.rb +4 -8
- data/lib/generators/react_on_rails/templates/base/base/app/javascript/packs/registration.js.tt +1 -1
- data/lib/react_on_rails/packs_generator.rb +1 -1
- data/lib/react_on_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7b7be38f2d494d8dc1b1a6b7e36abc59c80a07f9796d14c938fe71443b22f21
|
4
|
+
data.tar.gz: 879b0829934a770b8563fc95a6902baff0de4b6d94fb3ff0421ea29a529dea9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b59fe8de12c8341a509ab13d91e95fd2a4c8f2942a313ded31637151d0ece578168f8ecc058ee9f079ad69a478aafac5f33e1fff40a7250f9859ff22351be90
|
7
|
+
data.tar.gz: 54908a56ffded969d93898250b6fd1a4685f5addc6758e596078027b6f027333fb125fe95efdba626c1aa21a3f4baf975274a0f9611b018ca872cff04cef44a1
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,17 @@ Please follow the recommendations outlined at [keepachangelog.com](http://keepac
|
|
18
18
|
### [Unreleased]
|
19
19
|
Changes since the last non-beta release.
|
20
20
|
|
21
|
+
### [14.2.1] - 2025-04-11
|
22
|
+
|
23
|
+
#### Fixed
|
24
|
+
- Fixed a bug where the `load` event was not firing in Safari by postponing hydration to the next JavaScript task using `setTimeout(callback, 0)`. [PR 1729](https://github.com/shakacode/react_on_rails/pull/1729) by [Romex91](https://github.com/Romex91).
|
25
|
+
- Generated client packs now import from `react-on-rails/client` instead of `react-on-rails`. [PR 1706](https://github.com/shakacode/react_on_rails/pull/1706) by [alexeyr-ci](https://github.com/alexeyr-ci).
|
26
|
+
- The "optimization opportunity" message when importing the server-side `react-on-rails` instead of `react-on-rails/client` in browsers is now a warning for two reasons:
|
27
|
+
- Make it more prominent
|
28
|
+
- Include a stack trace when clicked
|
29
|
+
|
30
|
+
### [14.2.0] - 2025-03-03
|
31
|
+
|
21
32
|
#### Added
|
22
33
|
- Add export option 'react-on-rails/client' to avoid shipping server-rendering code to browsers (~5KB improvement) [PR 1697](https://github.com/shakacode/react_on_rails/pull/1697) by [Romex91](https://github.com/Romex91).
|
23
34
|
|
@@ -1192,7 +1203,8 @@ Best done with Object destructing:
|
|
1192
1203
|
##### Fixed
|
1193
1204
|
- Fix several generator-related issues.
|
1194
1205
|
|
1195
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/14.
|
1206
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/14.2.0...master
|
1207
|
+
[14.2.0]: https://github.com/shakacode/react_on_rails/compare/14.1.1...14.2.0
|
1196
1208
|
[14.1.1]: https://github.com/shakacode/react_on_rails/compare/14.1.0...14.1.1
|
1197
1209
|
[14.1.0]: https://github.com/shakacode/react_on_rails/compare/14.0.5...14.1.0
|
1198
1210
|
[14.0.5]: https://github.com/shakacode/react_on_rails/compare/14.0.4...14.0.5
|
data/Gemfile.lock
CHANGED
@@ -47,14 +47,10 @@ module ReactOnRails
|
|
47
47
|
|
48
48
|
def add_yarn_relative_install_script_in_package_json
|
49
49
|
package_json = File.join(destination_root, "package.json")
|
50
|
-
contents = File.read(package_json)
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
STRING
|
55
|
-
new_client_package_json_contents = contents.gsub(/ {2}"scripts": {/,
|
56
|
-
replacement_value)
|
57
|
-
File.open(package_json, "w+") { |f| f.puts new_client_package_json_contents }
|
50
|
+
contents = JSON.parse(File.read(package_json))
|
51
|
+
contents["scripts"] ||= {}
|
52
|
+
contents["scripts"]["postinstall"] = "yalc link react-on-rails"
|
53
|
+
File.open(package_json, "w+") { |f| f.puts JSON.pretty_generate(contents) }
|
58
54
|
end
|
59
55
|
end
|
60
56
|
end
|
@@ -47,7 +47,7 @@ module ReactOnRails
|
|
47
47
|
def pack_file_contents(file_path)
|
48
48
|
registered_component_name = component_name(file_path)
|
49
49
|
<<~FILE_CONTENT
|
50
|
-
import ReactOnRails from 'react-on-rails';
|
50
|
+
import ReactOnRails from 'react-on-rails/client';
|
51
51
|
import #{registered_component_name} from '#{relative_component_path_from_generated_pack(file_path)}';
|
52
52
|
|
53
53
|
ReactOnRails.register({#{registered_component_name}});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.2.
|
4
|
+
version: 14.2.1
|
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
|
+
date: 2025-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|