Skip to content

Commit c9d1c36

Browse files
committed
chore: update http-proxy-middleware (#5663)
* chore: update http-proxy-middleware * chore: update migration guide for Node.js version and spdy server support * chore: replace http-proxy with httpxy in package.json and ipc.test.js * fixup! * chore: httpxy@0.5.3 * refactor: update httpxy import to use namespace import and remove IPv6 handling in Server * chore: update http-proxy-middleware to version 4.0.0
1 parent 99e8c5b commit c9d1c36

6 files changed

Lines changed: 23 additions & 82 deletions

File tree

.cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"memfs",
1111
"execa",
1212
"networkidle",
13+
"bracketless",
1314
"ipaddr",
1415
"pageerror",
1516
"unmock",
@@ -37,6 +38,7 @@
3738
"FACCA",
3839
"darkgrey",
3940
"Consolas",
41+
"httpxy",
4042
"peerigon",
4143
"Ichigo",
4244
"Kurosaki",

lib/Server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3011,6 +3011,7 @@ class Server {
30113011
*/
30123012
#parseHostnameFromHeader = function (header) {
30133013
if (!header) return null;
3014+
30143015
try {
30153016
// If the header does not have a scheme, prepend // so URL can parse it
30163017
const parseUrl = new URL(

migration-v6.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ This document serves as a migration guide for `webpack-dev-server@6.0.0`.
44

55
## ⚠ Breaking Changes
66

7-
- Minimum supported `Node.js` version is `20.9.0`.
7+
- Minimum supported `Node.js` version is `22.15.0`.
88
- Minimum supported `webpack` version is `5.101.0`.
99
- Support for **SockJS** in the WebSocket transport has been removed. Now, only **native WebSocket** is supported, or **custom** client and server implementations can be used.
1010
- The options for passing to the `proxy` have changed. Please refer to the [http-proxy-middleware migration guide](https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md) for details.
11-
- Remove support for the spdy server type. Use the http2 server type instead; however, since Express does not work correctly with it, a custom server (e.g., Connect or Hono) should be used.
11+
- Remove support for the spdy server type.Use the http2 server type instead; however, since Express does not work correctly with it, a custom server (e.g., Connect or Hono) should be used.
1212

1313
v4:
1414

package-lock.json

Lines changed: 14 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"connect-history-api-fallback": "^2.0.0",
6060
"express": "^5.2.1",
6161
"graceful-fs": "^4.2.11",
62-
"http-proxy-middleware": "^3.0.5",
62+
"http-proxy-middleware": "^4.0.0",
6363
"ipaddr.js": "^2.3.0",
6464
"launch-editor": "^2.13.2",
6565
"open": "^11.0.0",
@@ -105,7 +105,7 @@
105105
"expect": "^30.4.1",
106106
"hono": "^4.12.9",
107107
"html-webpack-plugin": "^5.6.3",
108-
"http-proxy": "^1.18.1",
108+
"httpxy": "^0.5.3",
109109
"husky": "^9.1.6",
110110
"jest-mock": "^30.4.1",
111111
"jsdom": "^29.1.1",

test/e2e/ipc.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import os from "node:os";
44
import path from "node:path";
55
import { describe, it } from "node:test";
66
import { expect } from "expect";
7-
import httpProxy from "http-proxy";
7+
// eslint-disable-next-line import/no-unresolved
8+
import * as httpProxy from "httpxy";
89
import webpack from "webpack";
910
import Server from "../../lib/Server.js";
1011
import config from "../fixtures/client-config/webpack.config.js";

0 commit comments

Comments
 (0)