Skip to content

Commit be080d1

Browse files
authored
ci(package): patch http-proxy (#1084)
1 parent bea6780 commit be080d1

File tree

3 files changed

+245
-20
lines changed

3 files changed

+245
-20
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
],
1111
"scripts": {
1212
"clean": "rm -rf dist coverage tsconfig.tsbuildinfo .eslintcache",
13+
"postinstall": "patch-package",
1314
"install:all": "yarn && (cd examples && yarn)",
1415
"lint": "yarn prettier && yarn eslint",
1516
"lint:fix": "yarn prettier:fix && yarn eslint:fix",
@@ -80,6 +81,7 @@
8081
"lint-staged": "15.5.0",
8182
"mockttp": "3.17.0",
8283
"open": "8.4.2",
84+
"patch-package": "8.0.0",
8385
"prettier": "3.5.3",
8486
"supertest": "7.1.0",
8587
"ts-jest": "29.2.6",

patches/http-proxy+1.18.1.patch

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
diff --git a/node_modules/http-proxy/lib/http-proxy/common.js b/node_modules/http-proxy/lib/http-proxy/common.js
2+
index 6513e81..d01d8db 100644
3+
--- a/node_modules/http-proxy/lib/http-proxy/common.js
4+
+++ b/node_modules/http-proxy/lib/http-proxy/common.js
5+
@@ -1,6 +1,6 @@
6+
var common = exports,
7+
url = require('url'),
8+
- extend = require('util')._extend,
9+
+ extend = Object.assign,
10+
required = require('requires-port');
11+
12+
var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i,
13+
diff --git a/node_modules/http-proxy/lib/http-proxy/index.js b/node_modules/http-proxy/lib/http-proxy/index.js
14+
index 977a4b3..739409c 100644
15+
--- a/node_modules/http-proxy/lib/http-proxy/index.js
16+
+++ b/node_modules/http-proxy/lib/http-proxy/index.js
17+
@@ -1,5 +1,5 @@
18+
var httpProxy = module.exports,
19+
- extend = require('util')._extend,
20+
+ extend = Object.assign,
21+
parse_url = require('url').parse,
22+
EE3 = require('eventemitter3'),
23+
http = require('http'),

0 commit comments

Comments
 (0)