Skip to content

Commit d05de9b

Browse files
committed
Maintenance: advance tutorial to React on Rails 17.0.0
1 parent 803b592 commit d05de9b

6 files changed

Lines changed: 115 additions & 25 deletions

File tree

.github/dependabot.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: bundler
8+
directory: "/"
9+
schedule:
10+
interval: weekly
11+
groups:
12+
react-on-rails-family:
13+
patterns:
14+
- react_on_rails
15+
- react_on_rails_pro
16+
all-dependencies:
17+
patterns:
18+
- "*"
19+
- package-ecosystem: npm
20+
directory: "/"
21+
schedule:
22+
interval: weekly
23+
groups:
24+
react-on-rails-family:
25+
patterns:
26+
- react-on-rails-pro
27+
- react-on-rails-pro-node-renderer
28+
- react-on-rails-rsc
29+
- rescript-react-on-rails
30+
all-dependencies:
31+
patterns:
32+
- "*"
33+
ignore:
34+
- dependency-name: "@babel/cli"
35+
versions:
36+
- ">= 8.0.0"
37+
- dependency-name: "@babel/core"
38+
versions:
39+
- ">= 8.0.0"
40+
- dependency-name: "@babel/plugin-transform-runtime"
41+
versions:
42+
- ">= 8.0.0"
43+
- dependency-name: "@babel/preset-env"
44+
versions:
45+
- ">= 8.0.0"
46+
- dependency-name: "@babel/runtime"
47+
versions:
48+
- ">= 8.0.0"
49+
- dependency-name: "@babel/eslint-parser"
50+
versions:
51+
- ">= 8.0.0"
52+
- dependency-name: "@babel/preset-react"
53+
versions:
54+
- ">= 8.0.0"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Demo fleet smoke
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
schedule:
9+
- cron: "17 4 * * 1"
10+
workflow_dispatch:
11+
12+
jobs:
13+
smoke:
14+
uses: shakacode/react_on_rails/.github/workflows/demo-fleet-smoke.yml@613c6c2a251a782328b26d68e7f23daa9b677497
15+
with:
16+
ruby-version: "3.4.6"
17+
node-version: "22"
18+
install-command: >-
19+
bundle config set path vendor/bundle && bundle install --jobs 4 --retry 3 && yarn install --frozen-lockfile &&
20+
docker run --name tutorial-fleet-postgres -e POSTGRES_DB=rails_test -e POSTGRES_USER=rails -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres:11-alpine@sha256:ea50b9fd617b66c9135816a4536cf6e0697d4eea7014a7194479c95f6edd5ef9 &&
21+
for attempt in {1..30}; do docker inspect --format '{{.State.Running}}' tutorial-fleet-postgres | grep -qx true || exit 1; docker exec tutorial-fleet-postgres pg_isready -U rails -d rails_test && break; sleep 1; done;
22+
docker exec tutorial-fleet-postgres pg_isready -U rails -d rails_test
23+
test-command: >-
24+
RAILS_ENV=test NODE_ENV=test bundle exec rake react_on_rails:locale &&
25+
RAILS_ENV=test NODE_ENV=test bundle exec rails react_on_rails:generate_packs &&
26+
RAILS_ENV=test NODE_ENV=test bundle exec rake ci:js
27+
build-command: yarn build:dev
28+
smoke-command: >-
29+
node renderer/node-renderer.js & renderer_pid=$!;
30+
trap 'test -n "${rails_pid:-}" && kill "$rails_pid" 2>/dev/null || true; kill "$renderer_pid" 2>/dev/null || true; docker rm -f tutorial-fleet-postgres >/dev/null 2>&1 || true' EXIT;
31+
for attempt in {1..30}; do nc -z localhost 3800 && break; sleep 1; done; nc -z localhost 3800 || exit 1;
32+
DATABASE_URL=postgres://rails:password@127.0.0.1:5432/rails_test RAILS_ENV=development bundle exec rails db:prepare;
33+
DATABASE_URL=postgres://rails:password@127.0.0.1:5432/rails_test RAILS_ENV=development NODE_ENV=development bundle exec rails server -b 127.0.0.1 -p 3000 & rails_pid=$!;
34+
for attempt in {1..30}; do kill -0 "$rails_pid" 2>/dev/null || exit 1; curl --fail --silent --show-error http://127.0.0.1:3000/simple && exit 0; sleep 1; done; exit 1

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
66
ruby "3.4.6"
77

88
gem "cpflow", "5.2.0", require: false
9-
gem "react_on_rails_pro", "17.0.0.rc.12"
9+
gem "react_on_rails_pro", "17.0.0"
1010
gem "shakapacker", "10.2.0"
1111

1212
# Bundle edge Rails instead: gem "rails", github: "rails/rails"

Gemfile.lock

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ GEM
134134
coffee-script-source (1.12.2)
135135
concurrent-ruby (1.3.7)
136136
connection_pool (3.0.2)
137-
console (1.36.0)
137+
console (1.37.0)
138138
fiber-annotation
139139
fiber-local (~> 1.1)
140140
json
@@ -191,8 +191,9 @@ GEM
191191
interception (0.5)
192192
io-console (0.8.2)
193193
io-endpoint (0.17.2)
194-
io-event (1.19.1)
195-
io-stream (0.13.1)
194+
io-event (1.19.2)
195+
io-stream (0.13.2)
196+
openssl (>= 3.3)
196197
irb (1.18.0)
197198
pp (>= 0.6.0)
198199
prism (>= 1.3.0)
@@ -245,6 +246,7 @@ GEM
245246
racc (~> 1.4)
246247
nokogiri (1.19.3-x86_64-linux-gnu)
247248
racc (~> 1.4)
249+
openssl (4.0.2)
248250
package_json (0.2.0)
249251
parallel (1.27.0)
250252
parser (3.3.9.0)
@@ -258,10 +260,10 @@ GEM
258260
protocol (2.0.0)
259261
ruby_parser (~> 3.0)
260262
protocol-hpack (1.5.1)
261-
protocol-http (0.62.2)
263+
protocol-http (0.63.0)
262264
protocol-http1 (0.39.0)
263265
protocol-http (~> 0.62)
264-
protocol-http2 (0.26.0)
266+
protocol-http2 (0.26.1)
265267
protocol-hpack (~> 1.4)
266268
protocol-http (~> 0.62)
267269
protocol-url (0.4.0)
@@ -346,21 +348,21 @@ GEM
346348
erb
347349
psych (>= 4.0.0)
348350
tsort
349-
react_on_rails (17.0.0.rc.12)
351+
react_on_rails (17.0.0)
350352
addressable
351353
connection_pool
352354
execjs (~> 2.5)
353355
rails (>= 5.2)
354356
rainbow (~> 3.0)
355357
shakapacker (>= 6.0)
356-
react_on_rails_pro (17.0.0.rc.12)
358+
react_on_rails_pro (17.0.0)
357359
async (>= 2.29)
358360
async-http (~> 0.95)
359361
execjs (~> 2.9)
360362
io-endpoint (~> 0.17.0)
361363
jwt (>= 2.5, < 4)
362364
nokogiri (>= 1.12, < 2)
363-
react_on_rails (= 17.0.0.rc.12)
365+
react_on_rails (= 17.0.0)
364366
redcarpet (3.6.0)
365367
redis (5.3.0)
366368
redis-client (>= 0.22.0)
@@ -548,7 +550,7 @@ DEPENDENCIES
548550
rails-html-sanitizer
549551
rails_best_practices
550552
rainbow
551-
react_on_rails_pro (= 17.0.0.rc.12)
553+
react_on_rails_pro (= 17.0.0)
552554
redcarpet
553555
redis (~> 5.0)
554556
rspec-rails (~> 6.0.0)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
"react-dom": "~19.2.7",
8383
"react-error-boundary": "^4.1.2",
8484
"react-intl": "^6.4.4",
85-
"react-on-rails-pro": "17.0.0-rc.12",
86-
"react-on-rails-pro-node-renderer": "17.0.0-rc.12",
85+
"react-on-rails-pro": "17.0.0",
86+
"react-on-rails-pro-node-renderer": "17.0.0",
8787
"react-on-rails-rsc": "19.2.1",
8888
"react-redux": "^8.1.0",
8989
"react-router": "^6.13.0",

yarn.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8767,10 +8767,10 @@ react-is@^18.0.0, react-is@^18.3.1:
87678767
resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz"
87688768
integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==
87698769

8770-
react-on-rails-pro-node-renderer@17.0.0-rc.12:
8771-
version "17.0.0-rc.12"
8772-
resolved "https://registry.npmjs.org/react-on-rails-pro-node-renderer/-/react-on-rails-pro-node-renderer-17.0.0-rc.12.tgz#e867fa5f61cc8b94dcdc9d40762fee615041ec57"
8773-
integrity sha512-Dx+jJpvHo4o3TY4PXQXrlU6QfHjBFYPfF7XaEzQJ3i/WMSx1NXshtMFhzHGh5qAPFhdZwFIEoOObh7Ikf2EYmA==
8770+
react-on-rails-pro-node-renderer@17.0.0:
8771+
version "17.0.0"
8772+
resolved "https://registry.yarnpkg.com/react-on-rails-pro-node-renderer/-/react-on-rails-pro-node-renderer-17.0.0.tgz#5aec3ffb90b70e2465df1b8495a3f6b4bc432789"
8773+
integrity sha512-82yuZubo1iaoVpnH8adznf0rVLoZvsSWxYbLYdbKhrdwPjt9MxtyJG6//sqd77hSRX3EVnXQONvkiiur8qLQtw==
87748774
dependencies:
87758775
"@fastify/formbody" "^7.4.0 || ^8.0.2"
87768776
"@fastify/multipart" "^8.3.1 || ^9.0.3"
@@ -8780,12 +8780,12 @@ react-on-rails-pro-node-renderer@17.0.0-rc.12:
87808780
lockfile "^1.0.4"
87818781
pino "^9.14.0 || ^10.1.0"
87828782

8783-
react-on-rails-pro@17.0.0-rc.12:
8784-
version "17.0.0-rc.12"
8785-
resolved "https://registry.npmjs.org/react-on-rails-pro/-/react-on-rails-pro-17.0.0-rc.12.tgz#34671885af972cba410cd9496728c5d3188b63f5"
8786-
integrity sha512-2BahIzm71nLHp0x7A8Q+zS5Wdh5uIdvUUR/rzZNcJOe9GvcSQ4AWxBtpQkqu5ucQ0omdc4LvQAODo83+4bHZPg==
8783+
react-on-rails-pro@17.0.0:
8784+
version "17.0.0"
8785+
resolved "https://registry.yarnpkg.com/react-on-rails-pro/-/react-on-rails-pro-17.0.0.tgz#831e4cbe48d7b4d60185fecbae7e7fb6ea1d2a6f"
8786+
integrity sha512-4eEOnr0K5d5POR9iwaaJGZWrNZUUL1gehhlQDfx83T8Nk3PIb4xVQkOVGkQBko4Wj/fCs9TSUFpMm741+9bNwg==
87878787
dependencies:
8788-
react-on-rails "17.0.0-rc.12"
8788+
react-on-rails "17.0.0"
87898789

87908790
react-on-rails-rsc@19.2.1:
87918791
version "19.2.1"
@@ -8797,10 +8797,10 @@ react-on-rails-rsc@19.2.1:
87978797
react-server-dom-webpack "~19.2.7"
87988798
webpack-sources "^3.2.0"
87998799

8800-
react-on-rails@17.0.0-rc.12:
8801-
version "17.0.0-rc.12"
8802-
resolved "https://registry.npmjs.org/react-on-rails/-/react-on-rails-17.0.0-rc.12.tgz#080f580d81cac5c070c0b50dec009b88af7df5d0"
8803-
integrity sha512-/Y4+ohGT+bnlkLx5txd6EjnjOa5rssNPgPAqWITjR9ruCMAHA1Pf0QmYabAzihIsswB2SOdDp71CVbseirE/kw==
8800+
react-on-rails@17.0.0:
8801+
version "17.0.0"
8802+
resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-17.0.0.tgz#5bc518fb73c6c250fb8cbf1aa4d3bc36b0093c1f"
8803+
integrity sha512-jVJmaXJaVsCVoZCWMQ3ePACWaGkq3hOlmbeR0LniQKLr8+kDDgL0RbZ/6D1J2tMAsd1CxS+sOu0PCyO0ZfAQ+g==
88048804

88058805
react-proxy@^1.1.7:
88068806
version "1.1.8"

0 commit comments

Comments
 (0)