Skip to content

Upgrade from Webpacker 3 to Shakapacker 7 and React-Rails 3 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9aa9558
Upgrade webpacker to version 4.0.0
ahangarha Apr 21, 2023
70e8944
Update files and js packages to match Webpacker 4 req
ahangarha Apr 21, 2023
322861a
Add nvmrc
ahangarha Apr 21, 2023
25ef38a
Upgrade Webpacker to v5.0.0
ahangarha Apr 21, 2023
d6428ae
Update files and js packages to match Webpacker req
ahangarha Apr 21, 2023
48326da
Upgrade Webpacker to v5.4.4
ahangarha Apr 21, 2023
ff5d04e
Update files and js packages to match Webpacker req
ahangarha Apr 21, 2023
23ab422
Upgrade Webpacker to 6.0.0.rc.6
ahangarha Apr 21, 2023
48f7786
Update packages and set react-rails to 2.6.2
ahangarha Apr 22, 2023
347eafb
Update files based on Webpacker version
ahangarha Apr 22, 2023
1e2659e
Change Webpacker to Shakapacker 6.0.0
ahangarha Apr 23, 2023
54915f2
Install peer dependencies
ahangarha Apr 23, 2023
e3c7de6
Rename binstubs from webpack to webpacker
ahangarha Apr 25, 2023
d8c7bfc
Update js files and config to match Shakapacker
ahangarha Apr 25, 2023
1eab234
Upgrade Shakapcaker to 6.6.0
ahangarha May 29, 2023
cc0fabc
Upgrade to react-rails 2.7.1
ahangarha May 29, 2023
4df48ae
Update js files related to webpack config
ahangarha May 29, 2023
49a4a32
Install babel plugin
ahangarha May 29, 2023
52f4470
Update bundler
ahangarha Aug 1, 2023
e5d2acc
Upgrade Shakapacker to version 7.0.2
ahangarha Aug 1, 2023
3a8fbf5
Update spelling and formatting based on SP7
ahangarha Aug 1, 2023
b3fed47
Upgrade to React-Rails 3.0.0.rc.0
ahangarha Aug 1, 2023
79c09c8
Clean up duplicates and outdated code
ahangarha Aug 2, 2023
cb7d90d
Remove redundant comment
ahangarha Aug 10, 2023
612294b
Add newline at the end of all webpack config files
ahangarha Aug 10, 2023
1199ea1
Remove .nvmrc
ahangarha Aug 10, 2023
5d1aa6b
Update RR to 3.1.x
ahangarha Aug 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .babelrc

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

.byebug_history
/public/packs
Expand Down
3 changes: 0 additions & 3 deletions .postcssrc.yml

This file was deleted.

9 changes: 4 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.4'
gem "rails", "~> 5.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v6?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in one PR?
I thought Upgrading Rails could and should have its own PR. And this little change was to make it possible to build the project. I don't remember now but there was an issue with Rails < 5.2. I couldn't run the app.

# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
Expand All @@ -16,8 +15,8 @@ gem 'puma', '~> 4.3'
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker'
# Transpile app-like JavaScript. Read more: https://github.com/shakacode/shakapacker
gem 'shakapacker', '7.0.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

Expand Down Expand Up @@ -51,4 +50,4 @@ end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "react-rails"
gem "react-rails", '~> 3.1.0'
233 changes: 128 additions & 105 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,186 +1,209 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.6)
actionpack (= 5.1.6)
actioncable (5.2.8.1)
actionpack (= 5.2.8.1)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
websocket-driver (>= 0.6.1)
actionmailer (5.2.8.1)
actionpack (= 5.2.8.1)
actionview (= 5.2.8.1)
activejob (= 5.2.8.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.6)
actionview (= 5.1.6)
activesupport (= 5.1.6)
rack (~> 2.0)
actionpack (5.2.8.1)
actionview (= 5.2.8.1)
activesupport (= 5.2.8.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.6)
activesupport (= 5.1.6)
actionview (5.2.8.1)
activesupport (= 5.2.8.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.6)
activesupport (= 5.1.6)
activejob (5.2.8.1)
activesupport (= 5.2.8.1)
globalid (>= 0.3.6)
activemodel (5.1.6)
activesupport (= 5.1.6)
activerecord (5.1.6)
activemodel (= 5.1.6)
activesupport (= 5.1.6)
arel (~> 8.0)
activesupport (5.1.6)
activemodel (5.2.8.1)
activesupport (= 5.2.8.1)
activerecord (5.2.8.1)
activemodel (= 5.2.8.1)
activesupport (= 5.2.8.1)
arel (>= 9.0)
activestorage (5.2.8.1)
actionpack (= 5.2.8.1)
activerecord (= 5.2.8.1)
marcel (~> 1.0.0)
activesupport (5.2.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
arel (8.0.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
arel (9.0.0)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
bindex (0.5.0)
builder (3.2.3)
byebug (10.0.2)
bindex (0.8.1)
builder (3.2.4)
byebug (11.1.3)
capybara (2.18.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (>= 2.0, < 4.0)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.5)
connection_pool (2.2.2)
crass (1.0.5)
erubi (1.8.0)
execjs (2.7.0)
ffi (1.9.25)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (1.6.0)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.3)
erubi (1.12.0)
execjs (2.8.1)
ffi (1.15.5)
globalid (1.1.0)
activesupport (>= 5.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.3.1)
loofah (2.20.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mail (2.8.1)
mini_mime (>= 0.1.1)
method_source (0.9.2)
mini_mime (1.0.1)
mini_portile2 (2.7.1)
minitest (5.11.3)
multi_json (1.13.1)
nio4r (2.5.8)
nokogiri (1.13.1)
mini_portile2 (~> 2.7.0)
net-imap
net-pop
net-smtp
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
minitest (5.18.0)
net-imap (0.3.4)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
timeout
net-smtp (0.3.3)
net-protocol
nio4r (2.5.9)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
public_suffix (4.0.6)
puma (4.3.11)
public_suffix (5.0.1)
puma (4.3.12)
nio4r (~> 2.0)
racc (1.6.0)
rack (2.2.3)
rack-proxy (0.6.5)
racc (1.6.2)
rack (2.2.6.4)
rack-proxy (0.7.6)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.1.6)
actioncable (= 5.1.6)
actionmailer (= 5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
activemodel (= 5.1.6)
activerecord (= 5.1.6)
activesupport (= 5.1.6)
rack-test (2.1.0)
rack (>= 1.3)
rails (5.2.8.1)
actioncable (= 5.2.8.1)
actionmailer (= 5.2.8.1)
actionpack (= 5.2.8.1)
actionview (= 5.2.8.1)
activejob (= 5.2.8.1)
activemodel (= 5.2.8.1)
activerecord (= 5.2.8.1)
activestorage (= 5.2.8.1)
activesupport (= 5.2.8.1)
bundler (>= 1.3.0)
railties (= 5.1.6)
railties (= 5.2.8.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.1.6)
actionpack (= 5.1.6)
activesupport (= 5.1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (5.2.8.1)
actionpack (= 5.2.8.1)
activesupport (= 5.2.8.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
react-rails (2.5.0)
thor (>= 0.19.0, < 2.0)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
react-rails (3.1.1)
babel-transpiler (>= 0.7.0)
connection_pool
execjs
railties (>= 3.2)
tilt
rexml (3.2.5)
ruby_dep (1.5.0)
rubyzip (1.3.0)
sass (3.6.0)
rubyzip (2.3.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass-rails (5.1.0)
railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
selenium-webdriver (4.9.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
semantic_range (3.0.0)
shakapacker (7.0.2)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
thor (0.20.3)
sqlite3 (1.6.2)
mini_portile2 (~> 2.8.0)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.9)
turbolinks (5.2.0)
tilt (2.1.0)
timeout (0.3.2)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.5)
tzinfo (1.2.11)
thread_safe (~> 0.1)
uglifier (4.1.19)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webpacker (3.5.5)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.6.5)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
Expand All @@ -196,16 +219,16 @@ DEPENDENCIES
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
puma (~> 4.3)
rails (~> 5.1.4)
react-rails
rails (~> 5.2)
react-rails (~> 3.1.0)
sass-rails (~> 5.0)
selenium-webdriver
shakapacker (= 7.0.2)
sqlite3
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
webpacker

BUNDLED WITH
1.16.6
2.4.17
Empty file added app/javascript/components/.keep
Empty file.
Loading