react-rails 2.7.0 → 2.7.1

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: be001dfc20bf217fca379010cb047b7ce0440f755a0d907b430cde00a76c611f
4
- data.tar.gz: 74d052203a2cdba6956a543659bea72abc75cc6ad307da9664c8fe430e49f43e
3
+ metadata.gz: 2fb970443961197a3c1c24fda2fa12f4072dd4f596d7254adac40d11ac13a9cb
4
+ data.tar.gz: d85049088bb5d4166894641cca4bd4599f967fe43f504e501a3ce7232f38faff
5
5
  SHA512:
6
- metadata.gz: 9ff08fc83e93b5454f7c34bc4fac81af4234db2c288302bbfbf7b9621f6e4e04d13ee0419500ddbe601c18ab4f3fbfd427b92ec1a478cf753caff83b128e6968
7
- data.tar.gz: 15a0a71c4d144d9400857b8ae9b4e3f9232dc4e2916ffa0cb7388fed7533fc56c4454045abd842d96ce86e7f55d41bb9a63a391e99c3ddf58d2b9bfb52981a49
6
+ metadata.gz: 608ab0b73247bc4310f6a78f525e73ecaeb89d1bdb1b2be5170b6d5054e356e9bc6abaa5f54bf2b403fa727b1828542ce347e922fba49bbe7e0a91d938728e23
7
+ data.tar.gz: 35c53e0d3e63a16ad7c505a83e7d77255f87715e4ebca890e3103eb4e14101993f3d25c0b1bea56eaff3071e0e83d397292036bc4162169cecfee7e5843ac84e
data/CHANGELOG.md CHANGED
@@ -9,29 +9,19 @@ Changes since last non-beta release.
9
9
 
10
10
  _Please add entries here for your pull requests that are not yet released._
11
11
 
12
- ## [2.7.0.rc.0] - TBD
12
+ ## [2.7.1] - 2023-05-19
13
+
14
+ #### Bug Fixes
15
+ - Fix ReactDomClient initialization error during SSR. #1278
16
+
17
+ ## [2.7.0] - 2023-05-06
13
18
 
14
19
  #### New Features
15
20
  - Camelizes keys with primitive values, in addition to hashes #946
16
21
  - Expose alternative implementations for `ReactUJS.getConstructor` #1050
17
22
  - Include turbolinks in dev and update webdrivers #1174
18
23
  - Add support for multiple `require.context` with addition of `useContexts` #1144
19
- - Update dependencies
20
-
21
- #### Update dependencies
22
- - react to 17.0.2 #1218
23
- - webpack to 5.74.0
24
- - webpack-dev-server to 2.11.5 #1150
25
- - Node-sass to 7.0.0 #1158
26
- - url-parse to 1.5.10 #1167
27
- - minimist to 1.2.6 #1169
28
- - async to 2.6.4 #1178
29
- - rack to 2.2.3.1 #1182
30
- - eventsource to 1.1.1 #1183
31
- - rails-html-sanitizer to 1.4.3 #1188
32
- - tzinfo to 1.2.10 #1190
33
-
34
- #### Deprecation
24
+ - Update many dependencies
35
25
 
36
26
  #### Bug Fixes
37
27
  - Fix installation crash caused by absolute path for `source_entry_path` in default `config/webpacker.yml` coming from `shakapacker` version 6.x - #1216
@@ -556,5 +546,6 @@ _Please add entries here for your pull requests that are not yet released._
556
546
  - Server rendering with `prerender: true`
557
547
  - Transform `.jsx` in the asset pipeline
558
548
 
559
- [Unreleased]: https://github.com/reactjs/react-rails/compare/v2.7.0...master
549
+ [Unreleased]: https://github.com/reactjs/react-rails/compare/v2.7.1...master
550
+ [2.7.1]: https://github.com/shakacode/shakapacker/compare/v2.7.0...v2.7.1
560
551
  [2.7.0]: https://github.com/shakacode/shakapacker/compare/v2.6.2...v2.7.0
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Ruby](https://github.com/reactjs/react-rails/actions/workflows/ruby.yml/badge.svg)](https://github.com/reactjs/react-rails/actions/workflows/ruby.yml)
6
6
 
7
7
  ## News
8
- v2.7.0.rc.2 is out on [Ruby Gems](https://rubygems.org/gems/react-rails/versions/2.7.0.rc.2) and [NPM v2.7.0-rc.2](https://www.npmjs.com/package/react_ujs/v/2.7.0-rc.2). Please try it out!
8
+ v2.7.0 is released. Please try it out and report any issues. We'll try to address any critical issues ASAP. We're going shortly release 3.0 which improves support for SSR, but it's a breaking change because it requires updating dependencies, such as going from `webpacker` to `shakapacker`.
9
9
 
10
10
  ## Summary
11
11
  React-Rails is a flexible tool to use [React](http://facebook.github.io/react/) with Rails. The benefits:
@@ -14,9 +14,24 @@ React-Rails is a flexible tool to use [React](http://facebook.github.io/react/)
14
14
  * Supports Sprockets 4.x, 3.x, 2.x
15
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/)
16
16
 
17
+ ---
18
+ ## ShakaCode Support
19
+
20
+ [ShakaCode](https://www.shakacode.com) offers support for upgrading this gem, and related gems such as Webpacker and using Shakapacker. If interested, contact Justin Gordon, [justin@shakacode.com](mailto:justin@shakacode.com). We're also [hiring](https://jobs.lever.co/shakacode/3bdbfdb3-4495-4611-a279-01dddb351abe)!
21
+
22
+ Here's a testimonial of how ShakaCode can help, from [Florian Gößler](https://github.com/FGoessler) of [Blinkist](https://www.blinkist.com/), January 2, 2023:
23
+ > Hey Justin 👋
24
+ >
25
+ > I just wanted to let you know that we today shipped the webpacker to shakapacker upgrades and it all seems to be running smoothly! Thanks again for all your support and your teams work! 😍
26
+ >
27
+ > On top of your work, it was now also very easy for me to upgrade Tailwind and include our external node_module based web component library which we were using for our other (more modern) apps already. That work is going to be shipped later this week though as we are polishing the last bits of it. 😉
28
+ >
29
+ > Have a great 2023 and maybe we get to work together again later in the year! 🙌
30
+
31
+ Read the [full review here](https://clutch.co/profile/shakacode#reviews?sort_by=date_DESC#review-2118154). Here's [another review of a Shakapacker migration that led to more work](https://clutch.co/profile/shakacode#reviews?sort_by=date_DESC#review-2096078).
32
+
17
33
  ## Resouces
18
34
  * [Click to join **React + Rails Slack**](https://reactrails.slack.com/join/shared_invite/enQtNjY3NTczMjczNzYxLTlmYjdiZmY3MTVlMzU2YWE0OWM0MzNiZDI0MzdkZGFiZTFkYTFkOGVjODBmOWEyYWQ3MzA2NGE1YWJjNmVlMGE). Then join the channel `#react-rails`.
19
- * If you need help upgrading `react-rails`, `webpacker`, or JS packages, contact [justin@shakacode.com](mailto:justin@shakacode.com). The [ShakaCode.com](https://www.shakacode.com) team is helping to maintain this Ruby gem. Check out [this discussion](https://github.com/reactjs/react-rails/discussions/1200).
20
35
  * If you are upgrading, you might consider migrating to the [react_on_rails](https://github.com/shakacode/react_on_rails) gem.
21
36
  * Source code example utilizing React-Rails: https://github.com/BookOfGreg/react-rails-example-app
22
37
 
@@ -25,10 +40,13 @@ React-Rails is a flexible tool to use [React](http://facebook.github.io/react/)
25
40
  ## Contents
26
41
 
27
42
  - [Get started with Shakapacker](#get-started-with-shakapacker)
43
+ - [Component name](#component-name)
28
44
  - [File naming](#file-naming)
29
45
  - [Typescript support](#typescript-support)
46
+ - [Test component](#test-component)
30
47
  - [Use with Asset Pipeline](#use-with-asset-pipeline)
31
48
  - [Custom JSX Transformer](#custom-jsx-transformer)
49
+ - [Transform Plugin Options](#transform-plugin-options)
32
50
  - [React.js versions](#reactjs-versions)
33
51
  - [View Helper](#view-helper)
34
52
  - [Custom View Helper](#custom-view-helper)
@@ -44,9 +62,11 @@ React-Rails is a flexible tool to use [React](http://facebook.github.io/react/)
44
62
  - [Component Generator](#component-generator)
45
63
  - [Use with JBuilder](#use-with-jbuilder)
46
64
  - [Camelize Props](#camelize-props)
65
+ - [Changing Component Templates](#changing-component-templates)
47
66
  - [Upgrading](#upgrading)
48
67
  - [2.3 to 2.4](#23-to-24)
49
68
  - [Common Errors](#common-errors)
69
+ - [Getting warning for `Can't resolve 'react-dom/client'` in React < 18](#getting-warning-for-cant-resolve-react-domclient-in-react--18)
50
70
  - [During installation](#during-installation)
51
71
  - [Undefined Set](#undefined-set)
52
72
  - [Using TheRubyRacer](#using-therubyracer)
@@ -66,7 +86,7 @@ The Wiki page features a significant amount of additional information about Reac
66
86
 
67
87
  _Alternatively, get started with [Sprockets](#use-with-asset-pipeline)_
68
88
 
69
- #### 1) Create a new Rails app:
89
+ 1. Create a new Rails app:
70
90
  Prevent installing default javascript dependencies by using `--skip-javascript` option:
71
91
 
72
92
  ```bash
@@ -74,13 +94,13 @@ $ rails new my-app --skip-javascript
74
94
  $ cd my-app
75
95
  ```
76
96
 
77
- #### 2) Install `shakapacker`:
97
+ 2. Install `shakapacker`:
78
98
  ```bash
79
99
  $ bundle add shakapacker --strict
80
100
  $ rails webpacker:install
81
101
  ```
82
102
 
83
- #### 3) Install `react` and some other required npm packages:
103
+ 3. Install `react` and some other required npm packages:
84
104
  ```bash
85
105
  $ yarn add react react-dom @babel/preset-react prop-types \
86
106
  css-loader style-loader mini-css-extract-plugin css-minimizer-webpack-plugin
@@ -98,7 +118,7 @@ Also update the Babel configuration in the `package.json` file:
98
118
  },
99
119
  ```
100
120
 
101
- #### 4) Install `react-rails`:
121
+ 4. Install `react-rails`:
102
122
  ```bash
103
123
  $ bundle add 'react-rails' --strict
104
124
  $ rails generate react:install
@@ -110,7 +130,7 @@ This gives you:
110
130
  - [`ReactRailsUJS`](#ujs) setup in `app/javascript/packs/application.js`
111
131
  - `app/javascript/packs/server_rendering.js` for [server-side rendering](#server-side-rendering)
112
132
 
113
- #### 5) Generate your first component:
133
+ 5. Generate your first component:
114
134
  ```bash
115
135
  $ rails g react:component HelloWorld greeting:string
116
136
  ```
@@ -130,20 +150,20 @@ Example:
130
150
  <%= react_component("my_subdirectory/HelloWorld", { greeting: "Hello from react-rails." }) %>
131
151
  ```
132
152
 
133
- #### 6) [Render it in a Rails view](#view-helper):
153
+ 6. [Render it in a Rails view](#view-helper):
134
154
 
135
155
  ```erb
136
156
  <!-- erb: paste this in view -->
137
157
  <%= react_component("HelloWorld", { greeting: "Hello from react-rails." }) %>
138
158
  ```
139
159
 
140
- ##### 7) Lets Start the app:
160
+ 7. Lets Start the app:
141
161
  ```bash
142
162
  $ rails s
143
163
  ```
144
164
  Output: greeting: Hello from react-rails", inspect webpage in your browser to see the change in tag props.
145
165
 
146
- ##### 7) Run dev server (optional)
166
+ 8. Run dev server (optional)
147
167
  In order to run dev server with HMR feature you need to parallely run:
148
168
 
149
169
  ```bash
@@ -745,6 +765,22 @@ For the vast majority of cases this will get you most of the migration:
745
765
  - re-run `bundle exec rails webpacker:install:react` to update npm packages (Webpacker only)
746
766
 
747
767
  ## Common Errors
768
+ ### Getting warning for `Can't resolve 'react-dom/client'` in React < 18
769
+
770
+ You may see a warning like this when building a Webpack bundle using any version of React below 18. This warning 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/webpack.config.js`:
771
+
772
+ ```diff
773
+ - const { webpackConfig } = require('shakapacker')
774
+ + const { webpackConfig, merge } = require('shakapacker')
775
+
776
+ +const ignoreWarningsConfig = {
777
+ + ignoreWarnings: [/Module not found: Error: Can't resolve 'react-dom\/client'/],
778
+ +};
779
+
780
+ - module.exports = webpackConfig
781
+ + module.exports = merge({}, webpackConfig, ignoreWarningsConfig)
782
+ ```
783
+
748
784
  ### During installation
749
785
  1) While using installers.(rails webpacker:install:react && rails webpacker:install)
750
786
  Error:
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["react","react-dom","react-dom/server"],t):"object"==typeof exports?exports.ReactRailsUJS=t(require("react"),require("react-dom"),require("react-dom/server")):e.ReactRailsUJS=t(e.React,e.ReactDOM,e.ReactDOMServer)}(self,((__WEBPACK_EXTERNAL_MODULE__787__,__WEBPACK_EXTERNAL_MODULE__156__,__WEBPACK_EXTERNAL_MODULE__997__)=>(()=>{var __webpack_modules__={10:(e,t,n)=>{var o=n(787),r=n(156),a=n(997),u=n(230),c=n(121),d=n(831),i=n(37),_=n(39);const{supportsHydration:s,reactHydrate:l,createReactRootLike:p}=n(198);var f={CLASS_NAME_ATTR:"data-react-class",PROPS_ATTR:"data-react-props",RENDER_ATTR:"data-hydrate",CACHE_ID_ATTR:"data-react-cache-id",TURBOLINKS_PERMANENT_ATTR:"data-turbolinks-permanent",jQuery:"undefined"!=typeof window&&void 0!==window.jQuery&&window.jQuery,components:{},findDOMNodes:function(e){var t,n,o=f.CLASS_NAME_ATTR;switch(typeof e){case"undefined":t="["+o+"]",n=document;break;case"object":t="["+o+"]",n=e;break;case"string":t=e+"["+o+"], "+e+" ["+o+"]",n=document}return f.jQuery?f.jQuery(t,n):n.querySelectorAll(t)},getConstructor:c,constructorFromGlobal:c,constructorFromRequireContext:d,constructorFromRequireContextWithGlobalFallback:i,useContext:function(e){this.getConstructor=i(e)},useContexts:function(e){this.getConstructor=_(e)},serverRender:function(e,t,n){var r=this.getConstructor(t),u=o.createElement(r,n);return a[e](u)},mountComponents:function(e){for(var t=f,n=t.findDOMNodes(e),r=0;r<n.length;++r){var a=n[r],u=a.getAttribute(t.CLASS_NAME_ATTR),c=t.getConstructor(u),d=a.getAttribute(t.PROPS_ATTR),i=d&&JSON.parse(d),_=a.getAttribute(t.RENDER_ATTR),v=a.getAttribute(t.CACHE_ID_ATTR),E=a.hasAttribute(t.TURBOLINKS_PERMANENT_ATTR);if(!c){var h="Cannot find component: '"+u+"'";throw console&&console.log&&console.log("%c[react-rails] %c"+h+" for element","font-weight: bold","",a),new Error(h+". Make sure your component is available to render.")}var m=this.components[v];void 0===m&&(m=o.createElement(c,i),E&&(this.components[v]=m)),m=_&&s()?l(a,m):p(a).render(m)}},unmountComponents:function(e){for(var t=f.findDOMNodes(e),n=0;n<t.length;++n){var o=t[n];r.unmountComponentAtNode(o)}},detectEvents:function(){u(this)},handleMount:function(e){var t=void 0;e&&e.target&&(t=e.target),f.mountComponents(t)},handleUnmount:function(e){var t=void 0;e&&e.target&&(t=e.target),f.unmountComponents(t)}};"undefined"!=typeof window&&f.detectEvents(),self.ReactRailsUJS=f,e.exports=f},230:(e,t,n)=>{var o=n(528),r=n(921),a=n(228),u=n(724),c=n(968);e.exports=function(e){e.handleEvent&&("undefined"!=typeof Turbolinks&&void 0!==Turbolinks.EVENTS&&c.teardown(e),a.teardown(e),u.teardown(e),r.teardown(e),o.teardown(e)),"addEventListener"in window?(e.handleEvent=function(e,t){document.addEventListener(e,t)},e.removeEvent=function(e,t){document.removeEventListener(e,t)}):(e.handleEvent=function(e,t){window.attachEvent(e,t)},e.removeEvent=function(e,t){window.detachEvent(e,t)}),"undefined"!=typeof Turbolinks&&Turbolinks.supported?void 0!==Turbolinks.EVENTS?c.setup(e):void 0!==Turbolinks.controller?a.setup(e):u.setup(e):"undefined"!=typeof $&&"function"==typeof $.pjax?r.setup(e):o.setup(e)}},528:e=>{e.exports={setup:function(e){"addEventListener"in window?e.handleEvent("DOMContentLoaded",e.handleMount):e.handleEvent("onload",e.handleMount)},teardown:function(e){e.removeEvent("DOMContentLoaded",e.handleMount),e.removeEvent("onload",e.handleMount)}}},921:e=>{e.exports={setup:function(e){e.handleEvent("ready",e.handleMount),e.handleEvent("pjax:end",e.handleMount),e.handleEvent("pjax:beforeReplace",e.handleUnmount)},teardown:function(e){e.removeEvent("ready",e.handleMount),e.removeEvent("pjax:end",e.handleMount),e.removeEvent("pjax:beforeReplace",e.handleUnmount)}}},228:e=>{e.exports={setup:function(e){e.handleEvent("turbolinks:load",e.handleMount)},teardown:function(e){e.removeEvent("turbolinks:load",e.handleMount)}}},968:e=>{e.exports={setup:function(e){e.handleEvent(Turbolinks.EVENTS.CHANGE,e.handleMount),e.handleEvent(Turbolinks.EVENTS.BEFORE_UNLOAD,e.handleUnmount)},teardown:function(e){e.removeEvent(Turbolinks.EVENTS.CHANGE,e.handleMount),e.removeEvent(Turbolinks.EVENTS.BEFORE_UNLOAD,e.handleUnmount)}}},724:e=>{e.exports={setup:function(e){Turbolinks.pagesCached(0),e.handleEvent("page:change",e.handleMount),e.handleEvent("page:receive",e.handleUnmount)},teardown:function(e){e.removeEvent("page:change",e.handleMount),e.removeEvent("page:receive",e.handleUnmount)}}},121:function(module){var topLevel="undefined"==typeof window?this:window;module.exports=function(className){var constructor;return constructor=topLevel[className],constructor||(constructor=eval(className)),constructor&&constructor.default&&(constructor=constructor.default),constructor}},831:e=>{e.exports=function(e){return function(t){var n=t.split("."),o=n.shift(),r=n,a=e("./"+o);return r.forEach((function(e){a=a[e]})),a.__esModule&&(a=a.default),a}}},37:(e,t,n)=>{var o=n(121),r=n(831);e.exports=function(e){var t=r(e);return function(e){var n;try{n=t(e)}catch(t){try{n=o(e)}catch(e){console.error(t),console.error(e)}}return n}}},39:(e,t,n)=>{var o=n(121),r=n(831);e.exports=function(e){var t=e.map((e=>r(e)));return function(e){var n;try{var r,a,u=0;do{r=t[u];try{n=r(e)}catch(e){a||(a=e)}u+=1}while(u<t.length);if(!n)throw a}catch(a){try{n=o(e)}catch(e){console.error(a),console.error(e)}}return n}}},198:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createReactRootLike:()=>_,reactHydrate:()=>i,supportsHydration:()=>d});var o=n(156),r=n.n(o);const a=(r().version?.split(".")[0]||16)>=18;let u=r();if(a)try{u=n(Object(function(){var e=new Error("Cannot find module 'react-dom/client'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){u=r()}const c=u;function d(){return"function"==typeof c.hydrate||"function"==typeof c.hydrateRoot}function i(e,t){return"function"==typeof c.hydrateRoot?c.hydrateRoot(e,t):c.hydrate(t,e)}function _(e){return c.createRoot?c.createRoot(e):function(e){return{render:t=>c.render(t,e)}}(e)}},787:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__787__},156:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__156__},997:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__997__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(10);return __webpack_exports__})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["react","react-dom","react-dom/server"],t):"object"==typeof exports?exports.ReactRailsUJS=t(require("react"),require("react-dom"),require("react-dom/server")):e.ReactRailsUJS=t(e.React,e.ReactDOM,e.ReactDOMServer)}(self,((__WEBPACK_EXTERNAL_MODULE__787__,__WEBPACK_EXTERNAL_MODULE__156__,__WEBPACK_EXTERNAL_MODULE__997__)=>(()=>{var __webpack_modules__={10:(e,t,n)=>{var o=n(787),r=n(156),a=n(997),u=n(230),c=n(121),d=n(831),i=n(37),_=n(39);const{supportsHydration:s,reactHydrate:l,createReactRootLike:p}=n(198);var v={CLASS_NAME_ATTR:"data-react-class",PROPS_ATTR:"data-react-props",RENDER_ATTR:"data-hydrate",CACHE_ID_ATTR:"data-react-cache-id",TURBOLINKS_PERMANENT_ATTR:"data-turbolinks-permanent",jQuery:"undefined"!=typeof window&&void 0!==window.jQuery&&window.jQuery,components:{},findDOMNodes:function(e){var t,n,o=v.CLASS_NAME_ATTR;switch(typeof e){case"undefined":t="["+o+"]",n=document;break;case"object":t="["+o+"]",n=e;break;case"string":t=e+"["+o+"], "+e+" ["+o+"]",n=document}return v.jQuery?v.jQuery(t,n):n.querySelectorAll(t)},getConstructor:c,constructorFromGlobal:c,constructorFromRequireContext:d,constructorFromRequireContextWithGlobalFallback:i,useContext:function(e){this.getConstructor=i(e)},useContexts:function(e){this.getConstructor=_(e)},serverRender:function(e,t,n){var r=this.getConstructor(t),u=o.createElement(r,n);return a[e](u)},mountComponents:function(e){for(var t=v,n=t.findDOMNodes(e),r=0;r<n.length;++r){var a=n[r],u=a.getAttribute(t.CLASS_NAME_ATTR),c=t.getConstructor(u),d=a.getAttribute(t.PROPS_ATTR),i=d&&JSON.parse(d),_=a.getAttribute(t.RENDER_ATTR),f=a.getAttribute(t.CACHE_ID_ATTR),E=a.hasAttribute(t.TURBOLINKS_PERMANENT_ATTR);if(!c){var h="Cannot find component: '"+u+"'";throw console&&console.log&&console.log("%c[react-rails] %c"+h+" for element","font-weight: bold","",a),new Error(h+". Make sure your component is available to render.")}var m=this.components[f];void 0===m&&(m=o.createElement(c,i),E&&(this.components[f]=m)),m=_&&s()?l(a,m):p(a).render(m)}},unmountComponents:function(e){for(var t=v.findDOMNodes(e),n=0;n<t.length;++n){var o=t[n];r.unmountComponentAtNode(o)}},detectEvents:function(){u(this)},handleMount:function(e){var t=void 0;e&&e.target&&(t=e.target),v.mountComponents(t)},handleUnmount:function(e){var t=void 0;e&&e.target&&(t=e.target),v.unmountComponents(t)}};"undefined"!=typeof window&&v.detectEvents(),self.ReactRailsUJS=v,e.exports=v},230:(e,t,n)=>{var o=n(528),r=n(921),a=n(228),u=n(724),c=n(968);e.exports=function(e){e.handleEvent&&("undefined"!=typeof Turbolinks&&void 0!==Turbolinks.EVENTS&&c.teardown(e),a.teardown(e),u.teardown(e),r.teardown(e),o.teardown(e)),"addEventListener"in window?(e.handleEvent=function(e,t){document.addEventListener(e,t)},e.removeEvent=function(e,t){document.removeEventListener(e,t)}):(e.handleEvent=function(e,t){window.attachEvent(e,t)},e.removeEvent=function(e,t){window.detachEvent(e,t)}),"undefined"!=typeof Turbolinks&&Turbolinks.supported?void 0!==Turbolinks.EVENTS?c.setup(e):void 0!==Turbolinks.controller?a.setup(e):u.setup(e):"undefined"!=typeof $&&"function"==typeof $.pjax?r.setup(e):o.setup(e)}},528:e=>{e.exports={setup:function(e){"addEventListener"in window?e.handleEvent("DOMContentLoaded",e.handleMount):e.handleEvent("onload",e.handleMount)},teardown:function(e){e.removeEvent("DOMContentLoaded",e.handleMount),e.removeEvent("onload",e.handleMount)}}},921:e=>{e.exports={setup:function(e){e.handleEvent("ready",e.handleMount),e.handleEvent("pjax:end",e.handleMount),e.handleEvent("pjax:beforeReplace",e.handleUnmount)},teardown:function(e){e.removeEvent("ready",e.handleMount),e.removeEvent("pjax:end",e.handleMount),e.removeEvent("pjax:beforeReplace",e.handleUnmount)}}},228:e=>{e.exports={setup:function(e){e.handleEvent("turbolinks:load",e.handleMount)},teardown:function(e){e.removeEvent("turbolinks:load",e.handleMount)}}},968:e=>{e.exports={setup:function(e){e.handleEvent(Turbolinks.EVENTS.CHANGE,e.handleMount),e.handleEvent(Turbolinks.EVENTS.BEFORE_UNLOAD,e.handleUnmount)},teardown:function(e){e.removeEvent(Turbolinks.EVENTS.CHANGE,e.handleMount),e.removeEvent(Turbolinks.EVENTS.BEFORE_UNLOAD,e.handleUnmount)}}},724:e=>{e.exports={setup:function(e){Turbolinks.pagesCached(0),e.handleEvent("page:change",e.handleMount),e.handleEvent("page:receive",e.handleUnmount)},teardown:function(e){e.removeEvent("page:change",e.handleMount),e.removeEvent("page:receive",e.handleUnmount)}}},121:function(module){var topLevel="undefined"==typeof window?this:window;module.exports=function(className){var constructor;return constructor=topLevel[className],constructor||(constructor=eval(className)),constructor&&constructor.default&&(constructor=constructor.default),constructor}},831:e=>{e.exports=function(e){return function(t){var n=t.split("."),o=n.shift(),r=n,a=e("./"+o);return r.forEach((function(e){a=a[e]})),a.__esModule&&(a=a.default),a}}},37:(e,t,n)=>{var o=n(121),r=n(831);e.exports=function(e){var t=r(e);return function(e){var n;try{n=t(e)}catch(t){try{n=o(e)}catch(e){console.error(t),console.error(e)}}return n}}},39:(e,t,n)=>{var o=n(121),r=n(831);e.exports=function(e){var t=e.map((e=>r(e)));return function(e){var n;try{var r,a,u=0;do{r=t[u];try{n=r(e)}catch(e){a||(a=e)}u+=1}while(u<t.length);if(!n)throw a}catch(a){try{n=o(e)}catch(e){console.error(a),console.error(e)}}return n}}},198:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createReactRootLike:()=>i,reactHydrate:()=>d,supportsHydration:()=>c});var o=n(156),r=n.n(o);let a=r();if(void 0!==r()&&(r().version.split(".")[0]||16)>=18)try{a=n(Object(function(){var e=new Error("Cannot find module 'react-dom/client'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){a=r()}const u=a;function c(){return"function"==typeof u.hydrate||"function"==typeof u.hydrateRoot}function d(e,t){return"function"==typeof u.hydrateRoot?u.hydrateRoot(e,t):u.hydrate(t,e)}function i(e){return u.createRoot?u.createRoot(e):function(e){return{render:t=>u.render(t,e)}}(e)}},787:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__787__},156:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__156__},997:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__997__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(10);return __webpack_exports__})()));
@@ -2,6 +2,6 @@ module React
2
2
  module Rails
3
3
  # If you change this, make sure to update VERSIONS.md
4
4
  # and republish the UJS by updating package.json and `bundle exec rake ujs:publish`
5
- VERSION = '2.7.0'
5
+ VERSION = '2.7.1'
6
6
  end
7
7
  end
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: 2.7.0
4
+ version: 2.7.1
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: 2023-05-06 00:00:00.000000000 Z
14
+ date: 2023-05-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: appraisal
@@ -31,16 +31,16 @@ dependencies:
31
31
  name: bundler
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - '='
35
35
  - !ruby/object:Gem::Version
36
- version: '2.0'
36
+ version: 2.4.9
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
41
+ - - '='
42
42
  - !ruby/object:Gem::Version
43
- version: '2.0'
43
+ version: 2.4.9
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: codeclimate-test-reporter
46
46
  requirement: !ruby/object:Gem::Requirement