Skip to content

Commit

Permalink
fix: supports undici v6.2.1
Browse files Browse the repository at this point in the history
close #706
close #728
  • Loading branch information
3846masa committed Jan 11, 2024
1 parent 3029de1 commit cf59279
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"workerThreads": false
},
"resolutions": {
"urllib/undici": "^5.28.2"
"urllib/undici": "6.2.1"
},
"dependencies": {
"agent-base": "^7.1.0"
Expand Down Expand Up @@ -105,7 +105,7 @@
"superagent": "8.1.2",
"tough-cookie": "4.1.3",
"typescript": "5.3.3",
"undici": "5.28.2",
"undici": "6.2.1",
"urllib": "3.19.1"
},
"peerDependencies": {
Expand Down
4 changes: 0 additions & 4 deletions src/undici/__tests__/global_fetch.spec.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import { CookieJar } from 'tough-cookie';
import { createTestServer, readStream } from '../../__tests__/helpers.mjs';
import { CookieAgent } from '../cookie_agent.js';

declare global {
const fetch: typeof import('undici').fetch;
}

if (semver.lt(process.version, 'v18.2.0')) {
process.exit(0);
}
Expand Down
4 changes: 4 additions & 0 deletions src/undici/cookie_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class CookieHandler implements Required<Dispatcher.DispatchHandlers> {
this[kHandlers] = handlers;
}

onResponseStarted = (): void => {
this[kHandlers].onResponseStarted?.();
};

onConnect = (abort: () => void): void => {
this[kHandlers].onConnect?.(abort);
};
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7517,10 +7517,10 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

undici@5.28.2, undici@^5.22.1, undici@^5.28.2:
version "5.28.2"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.2.tgz#fea200eac65fc7ecaff80a023d1a0543423b4c91"
integrity sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==
undici@6.2.1, undici@^5.22.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/undici/-/undici-6.2.1.tgz#554293044619e065d986c37a4c92185c3bc02121"
integrity sha512-7Wa9thEM6/LMnnKtxJHlc8SrTlDmxqJecgz1iy8KlsN0/iskQXOQCuPkrZLXbElPaSw5slFFyKIKXyJ3UtbApw==
dependencies:
"@fastify/busboy" "^2.0.0"

Expand Down

0 comments on commit cf59279

Please sign in to comment.