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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bcd1f3d6e521231a8435057a0979cf4d354b6ee075ca172dfa554e7837b516f
4
- data.tar.gz: f3569c8499bfc239486670d24248523b311cf4a97ee616df7bd97c6c15d4ee33
3
+ metadata.gz: f7b7be38f2d494d8dc1b1a6b7e36abc59c80a07f9796d14c938fe71443b22f21
4
+ data.tar.gz: 879b0829934a770b8563fc95a6902baff0de4b6d94fb3ff0421ea29a529dea9d
5
5
  SHA512:
6
- metadata.gz: 929bc16300843b336cab3022fc3a681feea4cf1fba3dbdf35c88df9508058ba32f1f7eeb29ac0a044a1fa1254aca16ec216159e4c08a5c660e18df428348d01f
7
- data.tar.gz: 8b3ba8b7608c2ced7cb314d2efcd944cd362ee7f1807472de601574b5237c66d9093dcd98741f235fddce0d9f84bb9bf9b60a846a4a4ce85c1fa2498d191552b
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.1.1...master
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- react_on_rails (14.1.1)
4
+ react_on_rails (14.2.0)
5
5
  addressable
6
6
  connection_pool
7
7
  execjs (~> 2.5)
@@ -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
- replacement_value = <<-STRING
52
- "scripts": {
53
- "postinstall": "yalc link react-on-rails",
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
@@ -1,4 +1,4 @@
1
- import ReactOnRails from 'react-on-rails';
1
+ import ReactOnRails from 'react-on-rails/client';
2
2
 
3
3
  import <%= config[:component_name] %> from '<%= config[:app_relative_path] %>';
4
4
 
@@ -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}});
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReactOnRails
4
- VERSION = "14.2.0"
4
+ VERSION = "14.2.1"
5
5
  end
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.0
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-03-03 00:00:00.000000000 Z
11
+ date: 2025-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable