react_on_rails 13.3.2 → 13.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37f8e087fd09c6ea86239307c6c47121d294d73c84065b07ff0756e79ed6b679
4
- data.tar.gz: 93fc7de963700c87af99cdb13ba4511c6b305721d1f2c784d4cd840f6084775a
3
+ metadata.gz: 68dc51cc2eb837fd5ff976cdba5aeaefdec1ca13540e574e8f4e2ec054ec8769
4
+ data.tar.gz: 80d926e7a845cb55f27763de6050b3b4d3f829323b46362ca6f3e92a1daac3aa
5
5
  SHA512:
6
- metadata.gz: 2c7fa29cd46918b4605e8d9f5481eec8506536bd096cfbeb90bc284e0b246322a16956d0e218c9d7e905a5638674863df222b781826f47b1eafeb79e11ec03c5
7
- data.tar.gz: 481709881b0f9d24fb5047b213325c189185e9869e62f664afb8dbcea6b3a24b510f12ba17e1ffc0b7db4c7e478318c92fc93e8d7188b255b26cc245ac430011
6
+ metadata.gz: ea748cde016bbdae69f2ffa4047324fdd9d2426413e1baf4e5adf9043e6540f4fbcf0d4ec2237ec4854d79eab257b9022afc91576bb9517cf5e2ae2490f06777
7
+ data.tar.gz: a5c39c15e12231ad30bb15ef56517092cc50d368cd477d4653a4fad57b4f91c4b33143058718f09129623afd46ef81639b3f8add303b1125e4926641cc0b5c54
@@ -0,0 +1,19 @@
1
+ ### Summary
2
+
3
+ _Remove this paragraph and provide a general description of the code changes in your pull
4
+ request... were there any bugs you had fixed? If so, mention them. If
5
+ these bugs have open GitHub issues, be sure to tag them here as well,
6
+ to keep the conversation linked together._
7
+
8
+ ### Pull Request checklist
9
+ _Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by `~`._
10
+
11
+ - [ ] Add/update test to cover these changes
12
+ - [ ] Update documentation
13
+ - [ ] Update CHANGELOG file
14
+ _Add the CHANGELOG entry at the top of the file._
15
+
16
+ ### Other Information
17
+
18
+ _Remove this paragraph and mention any other important and relevant information such as benchmarks._
19
+
data/CHANGELOG.md CHANGED
@@ -65,7 +65,7 @@ Changes since last non-beta release.
65
65
 
66
66
  - Fixed the `You are importing hydrateRoot from "react-dom" [...] You should instead import it from "react-dom/client"` warning under React 18 ([#1441](https://github.com/shakacode/react_on_rails/issues/1441)). [PR 1460](https://github.com/shakacode/react_on_rails/pull/1460) by [alexeyr](https://github.com/alexeyr).
67
67
 
68
- In exchange, you may see a warning like this when building a Webpack bundle under React 16:
68
+ In exchange, you may see a warning like this when building using any version of React below 18:
69
69
  ```
70
70
  WARNING in ./node_modules/react-on-rails/node_package/lib/reactHydrateOrRender.js19:25-52
71
71
  Module not found: Error: Can't resolve 'react-dom/client' in '/home/runner/work/react_on_rails/react_on_rails/spec/dummy/node_modules/react-on-rails/node_package/lib'
@@ -29,8 +29,8 @@ group :development, :test do
29
29
  gem "pry-rails"
30
30
  gem "pry-rescue"
31
31
  gem "rubocop", "1.14.0", require: false
32
- gem "rubocop-performance", "1.16.0", require: false
33
- gem "rubocop-rspec", "2.4.0", require: false
32
+ gem "rubocop-performance", require: false
33
+ gem "rubocop-rspec", require: false
34
34
  gem "scss_lint", require: false
35
35
  gem "spring", "~> 4.0"
36
36
  end
@@ -56,6 +56,36 @@ document.addEventListener('DOMContentLoaded', () => {
56
56
 
57
57
  ----
58
58
 
59
+ ## Suppress warning related to Can't resolve 'react-dom/client' in React < 18
60
+
61
+ You may see a warning like this when building a Webpack bundle using any version of React below 18:
62
+
63
+ ```
64
+ Module not found: Error: Can't resolve 'react-dom/client' in ....
65
+ ```
66
+
67
+ It can be safely [suppressed](https://webpack.js.org/configuration/other-options/#ignorewarnings) in your Webpack configuration. The following is an example of this suppression in `config/webpack/commonWebpackConfig.js`:
68
+
69
+ ```js
70
+ const { webpackConfig: baseClientWebpackConfig, merge } = require('shakapacker');
71
+
72
+ const commonOptions = {
73
+ resolve: {
74
+ extensions: ['.css', '.ts', '.tsx'],
75
+ },
76
+ };
77
+
78
+ const ignoreWarningsConfig = {
79
+ ignoreWarnings: [/Module not found: Error: Can't resolve 'react-dom\/client'/],
80
+ };
81
+
82
+ const commonWebpackConfig = () => merge({}, baseClientWebpackConfig, commonOptions, ignoreWarningsConfig);
83
+
84
+ module.exports = commonWebpackConfig;
85
+ ```
86
+
87
+ ----
88
+
59
89
  ## HMR and React Hot Reloading
60
90
 
61
91
  Before turning HMR on, consider upgrading to the latest stable gems and packages:
@@ -12,7 +12,7 @@ def run(process)
12
12
  rescue Errno::ENOENT
13
13
  warn <<~MSG
14
14
  ERROR:
15
- Please ensure `Procfile.dev` exist in your project!
15
+ Please ensure `Procfile.dev` exists in your project!
16
16
  MSG
17
17
  exit!
18
18
  end
@@ -12,7 +12,7 @@ def run(process)
12
12
  rescue Errno::ENOENT
13
13
  warn <<~MSG
14
14
  ERROR:
15
- Please ensure `Procfile.dev-static` exist in your project!
15
+ Please ensure `Procfile.dev-static` exists in your project!
16
16
  MSG
17
17
  exit!
18
18
  end
@@ -324,8 +324,8 @@ module ReactOnRails
324
324
 
325
325
  ReactOnRails::WebpackerUtils.raise_nested_entries_disabled unless ReactOnRails::WebpackerUtils.nested_entries?
326
326
 
327
- ApplicationController.helpers.append_javascript_pack_tag("generated/#{component_name}")
328
- ApplicationController.helpers.append_stylesheet_pack_tag("generated/#{component_name}")
327
+ append_javascript_pack_tag "generated/#{component_name}"
328
+ append_stylesheet_pack_tag "generated/#{component_name}"
329
329
  end
330
330
 
331
331
  # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReactOnRails
4
- VERSION = "13.3.2"
4
+ VERSION = "13.3.3"
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "13.3.2",
3
+ "version": "13.3.3",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "node_package/lib/ReactOnRails.js",
6
6
  "directories": {
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: 13.3.2
4
+ version: 13.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -124,6 +124,7 @@ files:
124
124
  - ".github/FUNDING.yml"
125
125
  - ".github/ISSUE_TEMPLATE/bug_report.md"
126
126
  - ".github/ISSUE_TEMPLATE/feature_request.md"
127
+ - ".github/PULL_REQUEST_TEMPLATE.md"
127
128
  - ".github/workflows/lint-js-and-ruby.yml"
128
129
  - ".github/workflows/main.yml"
129
130
  - ".github/workflows/package-js-tests.yml"