Skip to content

Commit cbf75b6

Browse files
committed
Revert "feat: upgrade to undici v7 (#547)"
This reverts commit 9803c4e.
1 parent e030ec9 commit cbf75b6

19 files changed

+98
-498
lines changed

examples/h2-other-side-closed-exit-0-fetch.cjs

Lines changed: 0 additions & 34 deletions
This file was deleted.

examples/h2-other-side-closed-exit-0.cjs

Lines changed: 0 additions & 34 deletions
This file was deleted.

examples/longruning.cjs

Lines changed: 0 additions & 49 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,11 @@
4444
"prepublishOnly": "npm run build"
4545
},
4646
"dependencies": {
47-
"form-data": "^4.0.1",
4847
"formstream": "^1.5.1",
4948
"mime-types": "^2.1.35",
5049
"qs": "^6.12.1",
5150
"type-fest": "^4.20.1",
52-
"undici": "^7.0.0",
51+
"undici": "^6.19.2",
5352
"ylru": "^2.0.0"
5453
},
5554
"devDependencies": {
@@ -69,7 +68,6 @@
6968
"cross-env": "^7.0.3",
7069
"eslint": "8",
7170
"eslint-config-egg": "14",
72-
"https-pem": "^3.0.0",
7371
"iconv-lite": "^0.6.3",
7472
"proxy": "^1.0.2",
7573
"selfsigned": "^2.0.1",

scripts/replace_urllib_version.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ async function main() {
1313
for (const file of files) {
1414
const content = await fs.readFile(file, 'utf-8');
1515
// replace "const VERSION = 'VERSION';" to "const VERSION = '4.0.0';"
16-
// "exports.VERSION = 'VERSION';" => "exports.VERSION = '4.0.0';"
17-
const newContent = content.replace(/ = 'VERSION';/, match => {
18-
const after = ` = '${pkg.version}';`;
16+
const newContent = content.replace(/const VERSION = 'VERSION';/, match => {
17+
const after = `const VERSION = '${pkg.version}';`;
1918
console.log('[%s] %s => %s', file, match, after);
2019
return after;
2120
});

src/FetchOpaqueInterceptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface OpaqueInterceptorOptions {
3232
export function fetchOpaqueInterceptor(opts: OpaqueInterceptorOptions) {
3333
const opaqueLocalStorage = opts?.opaqueLocalStorage;
3434
return (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch'] => {
35-
return function redirectInterceptor(opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler) {
35+
return function redirectInterceptor(opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers) {
3636
const opaque = opaqueLocalStorage?.getStore();
3737
(handler as any).opaque = opaque;
3838
return dispatch(opts, handler);

src/FormData.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/HttpAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class HttpAgent extends Agent {
7070
this.#checkAddress = options.checkAddress;
7171
}
7272

73-
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean {
73+
dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean {
7474
if (this.#checkAddress && options.origin) {
7575
const originUrl = typeof options.origin === 'string' ? new URL(options.origin) : options.origin;
7676
let hostname = originUrl.hostname;

0 commit comments

Comments
 (0)