Skip to content

build: update dependency webpack-dev-middleware to v8 (main)#32816

Open
angular-robot wants to merge 1 commit intoangular:mainfrom
angular-robot:ng-renovate/main-webpack-dev-middleware-8-x
Open

build: update dependency webpack-dev-middleware to v8 (main)#32816
angular-robot wants to merge 1 commit intoangular:mainfrom
angular-robot:ng-renovate/main-webpack-dev-middleware-8-x

Conversation

@angular-robot
Copy link
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
webpack-dev-middleware 7.4.58.0.0 age adoption passing confidence

  • If you want to rebase/retry this PR, check this box

Release Notes

webpack/webpack-dev-middleware (webpack-dev-middleware)

v8.0.0

Compare Source

Major Changes
  • The getFilenameFromUrl function is now asynchronous, returning a Promise that resolves to the object with the found filename (or undefined if the file was not found) or throws an error if the URL cannot be processed. Additionally, the object contains the extra property with stats (file system stats) and outputFileSystem (output file system where file was found) properties. (by @​alexander-akait in #​2284)

  • Minimum supported Node.js version is 20.9.0. (by @​alexander-akait in #​2284)

  • Minimum supported webpack version is 5.101.0. (by @​alexander-akait in #​2284)

Minor Changes
Patch Changes

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

7.4.5 (2025-09-24)
Bug Fixes
7.4.4 (2025-09-23)
Bug Fixes
7.4.3 (2025-09-05)
Bug Fixes
  • do not call the next middleware for 304 responses (#​2155) (c26a326)
  • do not call the next middleware when request is finished or errored (#​2156) (116c680)
7.4.2 (2024-08-21)
Bug Fixes
7.4.1 (2024-08-20)
Bug Fixes

See associated pull request for more information.
@angular-robot angular-robot added action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: automation This PR is targeted to only merge into the branch defined in Github [bot use only] labels Mar 23, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates webpack-dev-middleware to version 8.0.0, which is a major update containing breaking changes. A significant breaking change makes this update incompatible with webpack-dev-server@5.2.3, which is a dependency in this project. This creates a risky situation and should be addressed. I have left a comment detailing the issue.

"tslib": "2.8.1",
"webpack": "5.105.4",
"webpack-dev-middleware": "7.4.5",
"webpack-dev-middleware": "8.0.0",

Choose a reason for hiding this comment

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

high

This update to webpack-dev-middleware v8.0.0 creates a serious mismatch between compile-time types and runtime behavior.

@angular-devkit/build_angular has a direct dependency on webpack-dev-middleware, which appears to be for resolving TypeScript types. With this change, it will resolve to v8.0.0.

However, webpack-dev-server@5.2.3, which is used at runtime, depends on webpack-dev-middleware@^7.0.0. pnpm will correctly provide webpack-dev-server with a v7 release of the middleware, avoiding an immediate runtime crash. This creates a dangerous situation where the code is compiled against v8 types, but runs against a v7 implementation. While this might not break immediately if the used options are compatible, it is a fragile setup.

A key breaking change in webpack-dev-middleware@8.0.0 is that getFilenameFromUrl is now async. webpack-dev-server@5.2.3 uses it synchronously. If for any reason webpack-dev-server resolves to v8 at runtime, it will break.

To avoid this fragility and potential for runtime errors, this dependency should be kept in sync with what webpack-dev-server supports. This update should be reverted until webpack-dev-server officially supports webpack-dev-middleware v8.

Suggested change
"webpack-dev-middleware": "8.0.0",
"webpack-dev-middleware": "7.4.5",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: automation This PR is targeted to only merge into the branch defined in Github [bot use only]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant