Skip to content

Bump shakapacker to 9.5#4645

Merged
aaccensi merged 4 commits intomasterfrom
bump-shakapacker
Feb 16, 2026
Merged

Bump shakapacker to 9.5#4645
aaccensi merged 4 commits intomasterfrom
bump-shakapacker

Conversation

@aaccensi
Copy link
Copy Markdown
Member

@aaccensi aaccensi commented Feb 10, 2026

Description

Bumped shakapacker in 3 stages:

Stage 1: 6.0 to 7.2.3 (v7 upgrade guide)

File Change
config/webpacker.yml Renamed to config/shakapacker.yml
config/shakapacker.yml Updated cache_path and comment
config/webpack/webpack.config.js Changed webpackConfig to generateWebpackConfig()
Gemfile Updated shakapacker 6.0.0 to 7.2.3
package.json Updated shakapacker 6.0.0 to 7.2.3
Gemfile.lock Updated with bundle update shackapacker ==conservative
yarn.lock Updated with yarn install
docker-compose.yml Env var names updated:WEBPACKER_* → SHAKAPACKER_*, binstub path updated
bin/webpacker,bin/webpacker-dev-server Deleted
bin/shakapacker,bin/shakapacker-dev-server Generated via bundle exec rake shakapacker:binstubs
app/helpers/application_helper.rb Added HAML-compatible javascript_pack_tag override

Stage 2: 7.2.3 to 8.4 (v8 upgrade guide)

File Change
package.json Added "packageManager": "yarn@1.22.22" field (required by v8)
package.json Updated shakapacker 7.2.3 to 8.4.0
Gemfile Updated shakapacker 7.2.3 to 8.4.0
Gemfile.lock Updated with bundle update shackapacker ==conservative
yarn.lock Updated with yarn install

Stage 3: 8.4 to 9.5 (v9 upgrade guide)

File Change
Gemfile Updated shakapacker 8.4.0 to 9.5.0
package.json Updated shakapacker 8.4.0 to 9.5.0
Gemfile.lock Updated with bundle update shackapacker ==conservative
yarn.lock Updated with yarn install
config/shakapacker.yml Added javascript_transpiler: babel (v9 defaults to SWC)
.semaphore/semaphore.yml Changed webpacker:compile to shakapacker:compile

Type of change

  • Bug fix
  • New feature
  • Enhancement
  • Documentation
  • Maintenance

Checklist

  • I have tested these changes
  • I have updated documentation as needed
  • I have tagged the relevant people for review

Related Issues

Closes #4644

@aaccensi aaccensi requested a review from a team as a code owner February 10, 2026 09:50
@aaccensi
Copy link
Copy Markdown
Member Author

@noracato do the changes to docker-compose.yml made for in stage 1 need some action at CI/CD level? Ansible perhaps?

Copy link
Copy Markdown
Member

@louispt1 louispt1 left a comment

Choose a reason for hiding this comment

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

Works well for me locally and seems reasonable!

I'm a bit unsure about the haml override - seems like something that might be an issue in the future but also not sure what we can do about it in the short term - maybe @noracato has ideas.

Comment thread config/shakapacker.yml
default: &default
source_path: app/javascript
source_entry_path: packs
javascript_transpiler: babel
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why babel?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Babel was the default javascript_transpiler before the bump but now it changed, so if we do not specify it it will use the new default (which is SWC). Their reason for the chance is because SWC is much faster so is not a trivial decision. For SWC we will need to install new dependencies and make sure nothing breaks if we remove that config, is all explained here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok seems out of scope for this PR then, interesting though!

Copy link
Copy Markdown
Member

@noracato noracato left a comment

Choose a reason for hiding this comment

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

Also tested locally, works well! The haml override is just something we have to deal with. I was actually afraid we would be needing much more of these fixes.

@aaccensi aaccensi merged commit f3e3011 into master Feb 16, 2026
2 checks passed
@aaccensi aaccensi deleted the bump-shakapacker branch February 16, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump Shakapacker to 9.5 in stages

3 participants