Skip to content

Commit 714936f

Browse files
authored
Merge pull request #1278 from reactjs/fix-bug-with-requiring-react-dom-with-sporockets
Fix ReactDomClient bug
2 parents 38ee7ad + 11c498e commit 714936f

17 files changed

+411
-359
lines changed

.github/workflows/ruby.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,34 @@
66
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
77

88
name: Ruby
9-
on: [push, pull_request]
9+
10+
on: [push]
1011
jobs:
12+
check_react_and_ujs:
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
ruby: [2.7]
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: ruby/setup-ruby@v1
21+
with:
22+
bundler: 2.4.9
23+
ruby-version: ${{ matrix.ruby }}
24+
- uses: actions/setup-node@v3
25+
- run: bundle install
26+
- run: yarn
27+
- run: bundle exec rake react:update
28+
- run: bundle exec rake ujs:update
29+
- run: ./check_for_uncommitted_files.sh
30+
1131
test:
32+
needs: check_react_and_ujs
1233
strategy:
1334
fail-fast: false
1435
matrix:
15-
ruby:
16-
- 2.7.0
17-
- 2.6.5
18-
# TODO restore testing against JRuby w/ therubyrhino
19-
# - jruby-9.3.7.0
36+
ruby: [2.7]
2037
gemfile:
2138
# These have webpacker:
2239
- rails_5.2_no_sprockets
@@ -37,6 +54,7 @@ jobs:
3754
- uses: actions/setup-node@v3
3855
- uses: ruby/setup-ruby@v1
3956
with:
57+
bundler: 2.4.9
4058
ruby-version: ${{ matrix.ruby }}
4159
# TODO: Impalement caching
4260
# bundler-cache: true

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ Changes since last non-beta release.
99

1010
_Please add entries here for your pull requests that are not yet released._
1111

12+
## [2.7.1] - 2023-05-19
13+
14+
#### Bug Fixes
15+
- Fix ReactDomClient initialization error during SSR. #1278
16+
1217
## [2.7.0] - 2023-05-06
1318

1419
#### New Features
@@ -541,5 +546,6 @@ _Please add entries here for your pull requests that are not yet released._
541546
- Server rendering with `prerender: true`
542547
- Transform `.jsx` in the asset pipeline
543548

544-
[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
545551
[2.7.0]: https://github.com/shakacode/shakapacker/compare/v2.6.2...v2.7.0

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ PLATFORMS
244244

245245
DEPENDENCIES
246246
appraisal
247-
bundler (~> 2.0)
247+
bundler (= 2.4.9)
248248
capybara
249249
codeclimate-test-reporter
250250
coffee-rails
@@ -263,4 +263,4 @@ DEPENDENCIES
263263
webdrivers
264264

265265
BUNDLED WITH
266-
2.4.10
266+
2.4.9

Rakefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace :react do
2525

2626
desc 'Install the JavaScript dependencies'
2727
task :install do
28-
yarn_run_in('react-builds', 'upgrade')
28+
yarn_run_in('react-builds', 'install')
2929
end
3030

3131
desc 'Build the JS bundles with Webpack'
@@ -49,7 +49,7 @@ namespace :ujs do
4949

5050
desc 'Install the JavaScript dependencies'
5151
task :install do
52-
`yarn upgrade`
52+
`yarn install`
5353
end
5454

5555
desc 'Build the JS bundles with Webpack'
@@ -71,12 +71,12 @@ namespace :ujs do
7171
end
7272

7373
require 'appraisal'
74-
require 'rake/testtask'
74+
require 'minitest/test_task'
7575

76-
Rake::TestTask.new(:test) do |t|
76+
Minitest::TestTask.create(:test) do |t|
7777
t.libs << 'lib'
7878
t.libs << 'test'
79-
t.pattern = ENV['TEST_PATTERN'] || 'test/**/*_test.rb'
79+
t.test_globs = ENV['TEST_PATTERN'] || 'test/**/*_test.rb'
8080
t.verbose = ENV['TEST_VERBOSE'] == '1'
8181
t.warning = false
8282
end

check_for_uncommitted_files.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -e
3+
4+
status=$(git status --porcelain)
5+
if [ -n "$status" ]; then
6+
status="${status//'%'/'%25'}"
7+
status="${status//$'\n'/'%0A'}"
8+
status="${status//$'\r'/'%0D'}"
9+
echo "$status"
10+
exit 1
11+
else
12+
echo "The repository is clean"
13+
exit 0
14+
fi

gemfiles/rails_5.2_no_sprockets.gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
react-rails (2.6.2)
4+
react-rails (2.7.0)
55
babel-transpiler (>= 0.7.0)
66
connection_pool
77
execjs
@@ -95,6 +95,7 @@ GEM
9595
execjs (2.7.0)
9696
ffi (1.11.3)
9797
formatador (0.2.5)
98+
gem-release (2.2.2)
9899
globalid (0.6.0)
99100
activesupport (>= 5.0)
100101
guard (2.16.1)
@@ -127,12 +128,10 @@ GEM
127128
marcel (1.0.2)
128129
method_source (0.9.2)
129130
mini_mime (1.1.2)
130-
mini_portile2 (2.8.0)
131131
minitest (5.16.3)
132132
nenv (0.3.0)
133133
nio4r (2.5.8)
134-
nokogiri (1.13.8)
135-
mini_portile2 (~> 2.8.0)
134+
nokogiri (1.13.8-x86_64-darwin)
136135
racc (~> 1.4)
137136
notiffany (0.1.3)
138137
nenv (~> 0.1)
@@ -214,15 +213,16 @@ GEM
214213
nokogiri (~> 1.8)
215214

216215
PLATFORMS
217-
ruby
216+
x86_64-darwin-20
218217

219218
DEPENDENCIES
220219
appraisal
221-
bundler (~> 2.0)
220+
bundler (= 2.4.9)
222221
capybara
223222
codeclimate-test-reporter
224223
coffee-rails
225224
es5-shim-rails (>= 2.0.5)
225+
gem-release
226226
guard
227227
guard-minitest
228228
jbuilder
@@ -236,4 +236,4 @@ DEPENDENCIES
236236
webdrivers
237237

238238
BUNDLED WITH
239-
2.1.4
239+
2.4.9

gemfiles/rails_5.2_no_sprockets_webpacker_3.gemfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
react-rails (2.6.2)
4+
react-rails (2.7.0)
55
babel-transpiler (>= 0.7.0)
66
connection_pool
77
execjs
@@ -95,6 +95,7 @@ GEM
9595
execjs (2.7.0)
9696
ffi (1.11.3)
9797
formatador (0.2.5)
98+
gem-release (2.2.2)
9899
globalid (0.6.0)
99100
activesupport (>= 5.0)
100101
guard (2.16.1)
@@ -115,7 +116,7 @@ GEM
115116
jbuilder (2.9.1)
116117
activesupport (>= 4.2.0)
117118
json (2.3.0)
118-
libv8 (7.3.492.27.1)
119+
libv8 (7.3.492.27.1-x86_64-darwin-20)
119120
listen (3.0.8)
120121
rb-fsevent (~> 0.9, >= 0.9.4)
121122
rb-inotify (~> 0.9, >= 0.9.7)
@@ -128,14 +129,12 @@ GEM
128129
marcel (1.0.2)
129130
method_source (0.9.2)
130131
mini_mime (1.1.2)
131-
mini_portile2 (2.8.0)
132132
mini_racer (0.2.8)
133133
libv8 (>= 6.9.411)
134134
minitest (5.16.3)
135135
nenv (0.3.0)
136136
nio4r (2.5.8)
137-
nokogiri (1.13.8)
138-
mini_portile2 (~> 2.8.0)
137+
nokogiri (1.13.8-x86_64-darwin)
139138
racc (~> 1.4)
140139
notiffany (0.1.3)
141140
nenv (~> 0.1)
@@ -223,15 +222,16 @@ GEM
223222
nokogiri (~> 1.8)
224223

225224
PLATFORMS
226-
ruby
225+
x86_64-darwin-20
227226

228227
DEPENDENCIES
229228
appraisal
230-
bundler (~> 2.0)
229+
bundler (= 2.4.9)
231230
capybara
232231
codeclimate-test-reporter
233232
coffee-rails
234233
es5-shim-rails (>= 2.0.5)
234+
gem-release
235235
guard
236236
guard-minitest
237237
jbuilder
@@ -248,4 +248,4 @@ DEPENDENCIES
248248
webpacker (~> 3.0)
249249

250250
BUNDLED WITH
251-
2.1.4
251+
2.4.9

gemfiles/rails_5.2_no_sprockets_webpacker_4.gemfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
react-rails (2.6.2)
4+
react-rails (2.7.0)
55
babel-transpiler (>= 0.7.0)
66
connection_pool
77
execjs
@@ -95,6 +95,7 @@ GEM
9595
execjs (2.7.0)
9696
ffi (1.11.3)
9797
formatador (0.2.5)
98+
gem-release (2.2.2)
9899
globalid (0.6.0)
99100
activesupport (>= 5.0)
100101
guard (2.16.1)
@@ -115,7 +116,7 @@ GEM
115116
jbuilder (2.9.1)
116117
activesupport (>= 4.2.0)
117118
json (2.3.0)
118-
libv8 (7.3.492.27.1)
119+
libv8 (7.3.492.27.1-x86_64-darwin-20)
119120
listen (3.0.8)
120121
rb-fsevent (~> 0.9, >= 0.9.4)
121122
rb-inotify (~> 0.9, >= 0.9.7)
@@ -128,14 +129,12 @@ GEM
128129
marcel (1.0.2)
129130
method_source (0.9.2)
130131
mini_mime (1.1.2)
131-
mini_portile2 (2.8.0)
132132
mini_racer (0.2.8)
133133
libv8 (>= 6.9.411)
134134
minitest (5.16.3)
135135
nenv (0.3.0)
136136
nio4r (2.5.8)
137-
nokogiri (1.13.8)
138-
mini_portile2 (~> 2.8.0)
137+
nokogiri (1.13.8-x86_64-darwin)
139138
racc (~> 1.4)
140139
notiffany (0.1.3)
141140
nenv (~> 0.1)
@@ -223,15 +222,16 @@ GEM
223222
nokogiri (~> 1.8)
224223

225224
PLATFORMS
226-
ruby
225+
x86_64-darwin-20
227226

228227
DEPENDENCIES
229228
appraisal
230-
bundler (~> 2.0)
229+
bundler (= 2.4.9)
231230
capybara
232231
codeclimate-test-reporter
233232
coffee-rails
234233
es5-shim-rails (>= 2.0.5)
234+
gem-release
235235
guard
236236
guard-minitest
237237
jbuilder
@@ -248,4 +248,4 @@ DEPENDENCIES
248248
webpacker (~> 4.0)
249249

250250
BUNDLED WITH
251-
2.1.4
251+
2.4.9

gemfiles/rails_5.2_sprockets_3.gemfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
react-rails (2.6.2)
4+
react-rails (2.7.0)
55
babel-transpiler (>= 0.7.0)
66
connection_pool
77
execjs
@@ -95,6 +95,7 @@ GEM
9595
execjs (2.7.0)
9696
ffi (1.11.3)
9797
formatador (0.2.5)
98+
gem-release (2.2.2)
9899
globalid (0.6.0)
99100
activesupport (>= 5.0)
100101
guard (2.16.1)
@@ -115,7 +116,7 @@ GEM
115116
jbuilder (2.9.1)
116117
activesupport (>= 4.2.0)
117118
json (2.3.0)
118-
libv8 (7.3.492.27.1)
119+
libv8 (7.3.492.27.1-x86_64-darwin-20)
119120
listen (3.0.8)
120121
rb-fsevent (~> 0.9, >= 0.9.4)
121122
rb-inotify (~> 0.9, >= 0.9.7)
@@ -128,14 +129,12 @@ GEM
128129
marcel (1.0.2)
129130
method_source (0.9.2)
130131
mini_mime (1.1.2)
131-
mini_portile2 (2.8.0)
132132
mini_racer (0.2.8)
133133
libv8 (>= 6.9.411)
134134
minitest (5.16.3)
135135
nenv (0.3.0)
136136
nio4r (2.5.8)
137-
nokogiri (1.13.8)
138-
mini_portile2 (~> 2.8.0)
137+
nokogiri (1.13.8-x86_64-darwin)
139138
racc (~> 1.4)
140139
notiffany (0.1.3)
141140
nenv (~> 0.1)
@@ -217,15 +216,16 @@ GEM
217216
nokogiri (~> 1.8)
218217

219218
PLATFORMS
220-
ruby
219+
x86_64-darwin-20
221220

222221
DEPENDENCIES
223222
appraisal
224-
bundler (~> 2.0)
223+
bundler (= 2.4.9)
225224
capybara
226225
codeclimate-test-reporter
227226
coffee-rails
228227
es5-shim-rails (>= 2.0.5)
228+
gem-release
229229
guard
230230
guard-minitest
231231
jbuilder
@@ -242,4 +242,4 @@ DEPENDENCIES
242242
webdrivers
243243

244244
BUNDLED WITH
245-
2.1.4
245+
2.4.9

0 commit comments

Comments
 (0)