Skip to content

Commit fc16549

Browse files
authored
fix: allow webpack-dev-server v6 (#1102)
### Summary This [version will be released in the next week or so](webpack/webpack-dev-server#5662 (comment)), and importantly enables addressing GHSA-w5hq-g745-h8pq The migration docs are [here](https://github.com/webpack/webpack-dev-server/blob/93c191a285101c94a72e5be180c997595cb330f3/migration-v6.md) - I don't think any of the breaking changes require any changes to Shakapacker ### Pull Request checklist <!-- If any of the items on this checklist do not apply to the PR, both check it out and wrap it by `~`. --> - [x] Add/update test to cover these changes - [x] Update documentation - [ ] Update CHANGELOG file ### Other Information <!-- Mention any other important information that might relate to this PR but that don't belong in the summary, like detailed benchmarks or possible follow-up changes. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated peer dependency and dependency strategy guidance to include support for `webpack-dev-server` v6 (in addition to v5). * **Chores** * Broadened `webpack-dev-server` version ranges across package and install configuration to support either v5 or v6. * **Changelog** * Added an “Unreleased” note highlighting support for `webpack-dev-server` v6. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 29f855a commit fc16549

6 files changed

Lines changed: 10 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
## [Unreleased]
1111

12+
### Added
13+
14+
- **Allowed `webpack-dev-server` v6**. [PR #1102](https://github.com/shakacode/shakapacker/pull/1102) by [G-Rath](https://github.com/G-Rath).
15+
1216
### Fixed
1317

1418
- **Fixed helper binstubs delegating Node resolution to Ruby `exec` in unset and empty `PATH` environments.** [PR #1200](https://github.com/shakacode/shakapacker/pull/1200) and [PR #1201](https://github.com/shakacode/shakapacker/pull/1201) by [justin808](https://github.com/justin808). Restores shell-compatible Node lookup for `bin/shakapacker-config` and `bin/diff-bundler-config` after the `v10.2.0` Ruby-binstub regression, while keeping friendly missing-Node errors for `ENOENT` and `EACCES`.

docs/dependency-strategy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Supplemental package for the standard webpack managed build experience.
150150

151151
| Package | Range | When needed |
152152
| ------------------------------------ | -------------------- | ----------------- |
153-
| webpack-dev-server | `^5.2.2` | Dev mode with HMR |
153+
| webpack-dev-server | `^5.2.2 \|\| ^6.0.0` | Dev mode with HMR |
154154
| mini-css-extract-plugin | `^2.0.0` | CSS extraction |
155155
| webpack-subresource-integrity | `^5.1.0` | SRI hashes |
156156
| @pmmmwh/react-refresh-webpack-plugin | `^0.5.0 \|\| ^0.6.0` | React HMR |
@@ -225,7 +225,7 @@ The core `shakapacker` package keeps intentional optional peer ranges where comp
225225
{
226226
"devDependencies": {
227227
"shakapacker-webpack": "^11.0.0",
228-
"webpack-dev-server": "^5.2.2",
228+
"webpack-dev-server": "^6.0.0",
229229
"@swc/core": "^1.3.0",
230230
"swc-loader": "^0.2.0",
231231
"css-loader": "^7.0.0",

docs/peer-dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ releases support.
3030
"terser-webpack-plugin": "^5.3.1"
3131
"webpack-assets-manifest": "^5.0.6 || ^6.0.0"
3232
"webpack-cli": "^4.9.2 || ^5.0.0 || ^6.0.0 || ^7.0.0"
33-
"webpack-dev-server": "^5.2.2"
33+
"webpack-dev-server": "^5.2.2 || ^6.0.0"
3434
"webpack-subresource-integrity": "^5.1.0"
3535
```
3636

lib/install/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"webpack": "^5.101.0",
1212
"webpack-assets-manifest": "^5.0.6 || ^6.0.0",
1313
"webpack-cli": "^4.9.2 || ^5.0.0 || ^6.0.0 || ^7.0.0",
14-
"webpack-dev-server": "^5.2.2",
14+
"webpack-dev-server": "^5.2.2 || ^6.0.0",
1515
"webpack-merge": "^5.8.0 || ^6.0.0",
1616
"webpack-subresource-integrity": "^5.1.0"
1717
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"webpack": "^5.101.0",
128128
"webpack-assets-manifest": "^5.0.6 || ^6.0.0",
129129
"webpack-cli": "^4.9.2 || ^5.0.0 || ^6.0.0 || ^7.0.0",
130-
"webpack-dev-server": "^5.2.2",
130+
"webpack-dev-server": "^5.2.2 || ^6.0.0",
131131
"webpack-subresource-integrity": "^5.1.0"
132132
},
133133
"peerDependenciesMeta": {

packages/shakapacker-webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"webpack": "^5.101.0",
3434
"webpack-cli": "^7.0.0",
3535
"webpack-assets-manifest": "^6.0.0",
36-
"webpack-dev-server": "^5.2.2",
36+
"webpack-dev-server": "^5.2.2 || ^6.0.0",
3737
"mini-css-extract-plugin": "^2.0.0",
3838
"webpack-subresource-integrity": "^5.1.0",
3939
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.0 || ^0.6.0",

0 commit comments

Comments
 (0)