Skip to content
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

Allow webpack-cli 6.x (non-breaking, requires #536) #533

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/dummy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
node-version: '16'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.2'
ruby-version: '3.1.6'
- name: Install dependencies
run: |
bundle install
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,23 @@ jobs:
- gemfiles/Gemfile-rails.7.0.x
- gemfiles/Gemfile-rails.7.1.x
- gemfiles/Gemfile-rails.7.2.x
- gemfiles/Gemfile-rails.8.0.x
# Uncomment the following line only to ensure compatibility with the
# upcomming Rails versions, maybe before a release.
#- gemfiles/Gemfile-rails-edge
exclude:
- ruby: '2.7'
gemfile: gemfiles/Gemfile-rails.7.2.x
- ruby: '2.7'
gemfile: gemfiles/Gemfile-rails.8.0.x
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails.7.2.x
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails.8.0.x
- ruby: '3.1'
gemfile: gemfiles/Gemfile-rails.6.0.x
- ruby: '3.1'
gemfile: gemfiles/Gemfile-rails.8.0.x
- ruby: '3.2'
gemfile: gemfiles/Gemfile-rails.6.0.x
- ruby: '3.3'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
cache: yarn

- name: Install dependencies
Expand All @@ -35,7 +35,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [14.x, 16.x, 18.x, 20.x]
node: [14.x, 16.x, 18.x, 20.x, 22.x]

runs-on: ${{ matrix.os }}

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,23 @@ jobs:
- gemfiles/Gemfile-rails.7.0.x
- gemfiles/Gemfile-rails.7.1.x
- gemfiles/Gemfile-rails.7.2.x
- gemfiles/Gemfile-rails.8.0.x
# Uncomment the following line only to ensure compatibility with the
# upcomming Rails versions, maybe before a release.
#- gemfiles/Gemfile-rails-edge
exclude:
- ruby: '2.7'
gemfile: gemfiles/Gemfile-rails.7.2.x
- ruby: '2.7'
gemfile: gemfiles/Gemfile-rails.8.0.x
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails.7.2.x
- ruby: '3.0'
gemfile: gemfiles/Gemfile-rails.8.0.x
- ruby: '3.1'
gemfile: gemfiles/Gemfile-rails.6.0.x
- ruby: '3.1'
gemfile: gemfiles/Gemfile-rails.8.0.x
- ruby: '3.2'
gemfile: gemfiles/Gemfile-rails.6.0.x
- ruby: '3.3'
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ _next_ branch is for v8 changes
## [Unreleased]
Changes since the last non-beta release.

### Added

- Allow `webpack-cli` v6. [PR 533](https://github.com/shakacode/shakapacker/pull/533) by [tagliala](https://github.com/tagliala).

### Changed
- Changed internal `require`s to `require_relative` to make code less dependent on the load path. [PR 516](https://github.com/shakacode/shakapacker/pull/516) by [tagliala](https://github.com/tagliala).
- Allow configuring webpack from a Typescript file (`config/webpack/webpack.config.ts`). [PR 524](https://github.com/shakacode/shakapacker/pull/524) by [jdelStrother](https://github.com/jdelStrother).
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile-rails.6.0.x
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ gemspec path: "../"
gem "rails", "~> 6.0.0"
gem "rake", ">= 11.1"
gem "rack-proxy", require: false
gem "rspec-rails", "~> 5.0.0"
gem "rspec-rails", "~> 5.0"
gem "byebug"
2 changes: 1 addition & 1 deletion gemfiles/Gemfile-rails.6.1.x
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ gemspec path: "../"
gem "rails", '~>6.1.0'
gem "rake", ">= 11.1"
gem "rack-proxy", require: false
gem "rspec-rails", "~> 6.0.0"
gem "rspec-rails", "~> 6.1"
gem "byebug"
2 changes: 1 addition & 1 deletion gemfiles/Gemfile-rails.7.0.x
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ gemspec path: "../"
gem "rails", '~>7.0.0'
gem "rake", ">= 11.1"
gem "rack-proxy", require: false
gem "rspec-rails", "~> 6.0.0"
gem "rspec-rails", "~> 7.0"
gem "byebug"
2 changes: 1 addition & 1 deletion gemfiles/Gemfile-rails.7.1.x
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ gemspec path: "../"
gem "rails", '~>7.1.0'
gem "rake", ">= 11.1"
gem "rack-proxy", require: false
gem "rspec-rails", "~> 6.0.0"
gem "rspec-rails", "~> 7.0"
gem "byebug"
2 changes: 1 addition & 1 deletion gemfiles/Gemfile-rails.7.2.x
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ gemspec path: "../"
gem "rails", '~>7.2.0'
gem "rake", ">= 11.1"
gem "rack-proxy", require: false
gem "rspec-rails", "~> 6.0.0"
gem "rspec-rails", "~> 7.0"
gem "byebug"
11 changes: 11 additions & 0 deletions gemfiles/Gemfile-rails.8.0.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source "https://rubygems.org"

git_source(:github) { |repo| "https://github.com/#{repo}.git" }

gemspec path: "../"

gem "rails", '~>8.0.0'
gem "rake", ">= 11.1"
gem "rack-proxy", require: false
gem "rspec-rails", "~> 7.0"
gem "byebug"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"terser-webpack-plugin": "^5.3.1",
"webpack": "^5.72.0",
"webpack-assets-manifest": "^5.0.6",
"webpack-cli": "^4.9.2 || ^5.0.0",
"webpack-cli": "^4.9.2 || ^5.0.0 || ^6.0.0",
"webpack-dev-server": "^4.9.0 || ^5.0.0",
"webpack-merge": "^5.8.0 || ^6.0.0"
},
Expand Down
11 changes: 10 additions & 1 deletion spec/generator_specs/generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,17 @@
bundle install
))
else
# TODO: remove when Ruby < 3.1 support will be dropped
# Ref: https://github.com/shakacode/shakapacker/issues/534
bundler_update_command =
if RUBY_VERSION.start_with?("3.1")
"gem update bundler"
else
"gem install bundler --version '< 2.6'"
end

sh_in_dir({}, BASE_RAILS_APP_PATH, %(
gem update bundler
#{bundler_update_command}
bundle add shakapacker --path "#{GEM_ROOT}"
))
end
Expand Down
Loading