Skip to content

Commit aa0cddc

Browse files
committed
Merge remote-tracking branch 'origin/main' into HEAD
* origin/main: (22 commits) docs: add Dependabot configuration guide (#1094) Sync address-review prompt with upstream PR #16 (#1098) Supersede #910: entry shape test with lint unblock (#919) fix: align rspack v2 peer deps and installer defaults (#1091) docs: update README and guides for Shakapacker v10 (#1092) Release 10.0.0 Update CHANGELOG.md for v10.0.0 (#1089) Release 10.0.0-rc.1 Update CHANGELOG.md for v10.0.0-rc.1 (#1087) Supersede #961 by using pack-config-diff (#973) Add final summary output to rake release (#1041) Add bin/setup to install development deps (#1039) Release 10.0.0-rc.0 Use npx release-it to avoid mise shim failures (#1040) Fix Nokogiri build failure on Ruby 3.4.6 (#1038) Update CHANGELOG.md for v10.0.0-rc.0 (#1037) Update rspack dev deps to 2.0.0-rc.0 (#1036) Fix stale and broken documentation across Shakapacker guides (#1023) Allow webpack-cli v7 in peer dependencies (#1021) refactor: simplify resolving js peer versions when installing (#1034) ... # Conflicts: # package.json
2 parents 2f1d3d2 + 2641acd commit aa0cddc

61 files changed

Lines changed: 1502 additions & 931 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/dummy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
persist-credentials: false
3131
- uses: actions/setup-node@v4
3232
with:
33-
node-version: "20"
33+
node-version: "20.x"
3434
- uses: ruby/setup-ruby@v1
3535
with:
3636
ruby-version: "3.2"
@@ -40,7 +40,6 @@ jobs:
4040
bundle install
4141
yarn install --frozen-lockfile --production=false
4242
npm install -g yalc
43-
cd spec/dummy && npm install
4443
4544
- name: Build TypeScript
4645
run: yarn build

.github/workflows/node.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ jobs:
139139
cd /tmp/test-types
140140
npx tsc --noEmit \
141141
--skipLibCheck \
142-
--moduleResolution node \
142+
--moduleResolution bundler \
143+
--types node \
143144
*.d.ts
144145
test:
145146
name: Testing

.github/workflows/test-bundlers.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
5757
- name: Install dependencies
5858
run: |
59-
yalc link shakapacker
59+
yarn install
60+
yalc add shakapacker
6061
yarn install
6162
6263
- name: Switch to Webpack
@@ -109,7 +110,8 @@ jobs:
109110
110111
- name: Install dependencies
111112
run: |
112-
yalc link shakapacker
113+
yarn install
114+
yalc add shakapacker
113115
yarn install
114116
115117
- name: Switch to RSpack
@@ -162,7 +164,8 @@ jobs:
162164
163165
- name: Install dependencies
164166
run: |
165-
yalc link shakapacker
167+
yarn install
168+
yalc add shakapacker
166169
yarn install
167170
168171
- name: Test switching between bundlers

.github/workflows/trigger-docs-site.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Trigger docs site rebuild
33
on:
44
push:
55
branches: [main]
6-
paths: ['docs/**']
6+
paths: ["docs/**"]
77

88
jobs:
99
notify-docs-site:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ yalc.lock
2626
# Config exporter output directory
2727
shakapacker-config-exports/
2828

29+
# Webpack build output
30+
public/packs/
31+
2932
# TypeScript generated files
3033
package/**/*.d.ts
3134
package/**/*.d.ts.map

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ lib/install/config/**/*.js
55
# Temporarily ignore workflow files that cannot be modified in PRs due to claude-review validation
66
.github/workflows/claude.yml
77
.github/workflows/claude-code-review.yml
8+
.context/

CHANGELOG.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,35 @@
99

1010
## [Unreleased]
1111

12+
### Changed
13+
14+
- **Changed `shakapacker:install` to default fresh Rspack installs to v2 (`^2.0.0-0`)**. [PR #1091](https://github.com/shakacode/shakapacker/pull/1091) by [ihabadham](https://github.com/ihabadham). `lib/install/package.json` now declares `@rspack/core` and `@rspack/cli` as `^1.0.0 || ^2.0.0-0`; fresh installs pick the v2 range. Existing apps are unaffected. Note: Rspack v2 requires Node.js 20.19.0+.
15+
16+
### Fixed
17+
18+
- **Widened `@rspack/plugin-react-refresh` peer range to `^1.0.0 || ^2.0.0-0`**. [PR #1091](https://github.com/shakacode/shakapacker/pull/1091) by [ihabadham](https://github.com/ihabadham). Fixes the `ERESOLVE` conflict when installing `@rspack/plugin-react-refresh@^2.0.0` alongside `shakapacker@10.0.0`.
19+
20+
## [v10.0.0] - April 8, 2026
21+
1222
### Added
1323

24+
- **Added `bin/diff-bundler-config` CLI for semantic bundler configuration diffs**. [PR #973](https://github.com/shakacode/shakapacker/pull/973) by [justin808](https://github.com/justin808). Wraps the extracted [`pack-config-diff`](https://github.com/shakacode/pack-config-diff) package to provide semantic diffing of webpack/rspack configurations with normalized exit codes. Supersedes [#961](https://github.com/shakacode/shakapacker/pull/961).
1425
- **Added `bin/shakapacker-watch` binstub for clean Ctrl-C shutdown in Procfile-based workflows**. [PR #1026](https://github.com/shakacode/shakapacker/pull/1026) by [justin808](https://github.com/justin808). The new wrapper script traps INT/TERM signals and forwards TERM to the underlying `bin/shakapacker --watch` process, preventing Ruby interrupt backtraces when stopping `bin/dev`. Use `bin/shakapacker-watch --watch` in Procfiles instead of `bin/shakapacker --watch`.
26+
- **Allowed `webpack-cli` v7 (`^7.0.0`) in peer dependencies**. [PR #1021](https://github.com/shakacode/shakapacker/pull/1021) by [justin808](https://github.com/justin808). Fixes [#1020](https://github.com/shakacode/shakapacker/issues/1020). Note: `webpack-cli` v7 requires Node.js >= 20.9.0.
27+
28+
### ⚠️ Breaking Changes
29+
30+
- **Breaking: bumped the minimum `webpack` version to `^5.101.0`**. [PR #1021](https://github.com/shakacode/shakapacker/pull/1021) by [justin808](https://github.com/justin808). The previous minimum was `^5.76.0`.
31+
- **Breaking: required `webpack-dev-server` `^5.2.2` and dropped support for v4**. [PR #1021](https://github.com/shakacode/shakapacker/pull/1021) by [justin808](https://github.com/justin808). The removed v4 range was `^4.15.2`.
32+
33+
### Changed
34+
35+
- **Changed `shakapacker:install` to default `webpack-cli` installs to the latest v6 range**. [PR #1021](https://github.com/shakacode/shakapacker/pull/1021) by [justin808](https://github.com/justin808). This keeps installs compatible with Node.js `20.0-20.8`; v7 remains supported via peer dependencies for Node.js >= 20.9.0.
36+
- **Changed dev server config handling to warn on deprecated middleware hooks and ignore them for webpack-dev-server v5**. [PR #1021](https://github.com/shakacode/shakapacker/pull/1021) by [justin808](https://github.com/justin808). Use `setup_middlewares` instead of `on_before_setup_middleware` and `on_after_setup_middleware`.
37+
38+
### Fixed
39+
40+
- **Ensured `shakapacker:install` installs the latest `compression-webpack-plugin`**. [PR #1035](https://github.com/shakacode/shakapacker/pull/1035) by [G-Rath](https://github.com/G-Rath).
1541

1642
## [v9.7.0] - March 15, 2026
1743

@@ -891,7 +917,8 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
891917

892918
See [CHANGELOG.md in rails/webpacker (up to v5.4.3)](https://github.com/rails/webpacker/blob/master/CHANGELOG.md)
893919

894-
[Unreleased]: https://github.com/shakacode/shakapacker/compare/v9.7.0...main
920+
[Unreleased]: https://github.com/shakacode/shakapacker/compare/v10.0.0...main
921+
[v10.0.0]: https://github.com/shakacode/shakapacker/compare/v9.7.0...v10.0.0
895922
[v9.7.0]: https://github.com/shakacode/shakapacker/compare/v9.6.1...v9.7.0
896923
[v9.6.1]: https://github.com/shakacode/shakapacker/compare/v9.6.0...v9.6.1
897924
[v9.6.0]: https://github.com/shakacode/shakapacker/compare/v9.5.0...v9.6.0

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ See the sections below for full detail and examples.
2222

2323
- Run corresponding RSpec tests when changing source files
2424
- For example, when changing `lib/shakapacker/foo.rb`, run `spec/shakapacker/foo_spec.rb`
25-
- Run the full test suite with `bundle exec rspec` before pushing
25+
- Run the full test suite with `bundle exec rake test` before pushing
2626
- **Use explicit RSpec spy assertions** - prefer `have_received`/`not_to have_received` over indirect counter patterns
2727
- Good: `expect(Open3).to have_received(:capture3).with(anything, hook_command, anything)`
2828
- Good: `expect(Open3).not_to have_received(:capture3).with(anything, hook_command, anything)`
@@ -48,7 +48,7 @@ See the sections below for full detail and examples.
4848
- **Do NOT add entries for**: linting, formatting, refactoring, tests, or documentation fixes
4949
- **Format**: `[PR #123](https://github.com/shakacode/shakapacker/pull/123) by [username](https://github.com/username)` (Shakapacker uses `#` in PR links)
5050
- **Use `/update-changelog` command** for guided changelog updates with automatic formatting
51-
- **Version management**: Run `bundle exec rake update_changelog` after releases to update version headers
51+
- **Version management**: Use the `/update-changelog` command to stamp version headers during release prep
5252
- **Examples**: Run `grep -A 3 "^### " CHANGELOG.md | head -30` to see real formatting examples
5353

5454
## Open Source Maintainability

CONTRIBUTING.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Thank you for your interest in contributing to Shakapacker! We welcome all contr
88
- [Submitting Pull Requests](#submitting-pull-requests)
99
- [Setting Up a Development Environment](#setting-up-a-development-environment)
1010
- [Making sure your changes pass all tests](#making-sure-your-changes-pass-all-tests)
11-
- [Testing the generator](#testing-the-generator)
11+
- [Testing the installer](#46-testing-the-installer)
1212

1313
## Reporting Issues
1414

@@ -44,8 +44,8 @@ This project includes configuration for git hooks via `husky` and `lint-staged`,
4444
To enable pre-commit hooks locally:
4545

4646
```bash
47-
npx husky install
48-
npx husky add .husky/pre-commit "npx lint-staged"
47+
yarn install
48+
npx husky
4949
```
5050

5151
---
@@ -174,11 +174,16 @@ yarn lint --cache
174174
yalc push # or yalc publish --push
175175
```
176176

177-
3. Run the following commands to set up the development environment.
177+
3. Run `bin/setup` to install development dependencies.
178+
```bash
179+
bin/setup
180+
# Optional: enable local pre-commit hooks
181+
npx husky
178182
```
183+
Manual equivalent:
184+
```bash
179185
bundle install
180186
yarn install
181-
yarn prepare:husky # Set up pre-commit hooks for linting
182187
```
183188

184189
## Understanding Optional Peer Dependencies

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
shakapacker (9.7.0)
4+
shakapacker (10.0.0)
55
activesupport (>= 5.2)
66
package_json
77
rack-proxy (>= 0.6.1)
@@ -126,7 +126,7 @@ GEM
126126
net-smtp (0.5.0)
127127
net-protocol
128128
nio4r (2.7.3)
129-
nokogiri (1.16.7)
129+
nokogiri (1.19.2)
130130
mini_portile2 (~> 2.8.2)
131131
racc (~> 1.4)
132132
package_json (0.1.0)

0 commit comments

Comments
 (0)