From 58abbe469806e3c68cec6632a7f54e9d3ef4c0c0 Mon Sep 17 00:00:00 2001 From: 3846masa <3846masahiro+git@gmail.com> Date: Thu, 20 Oct 2022 07:21:40 +0900 Subject: [PATCH] fix: support undici v5.11.0 BREAKING CHANGES: supports undici v5.11.0 or above only --- package.json | 4 ++-- src/undici/cookie_client.ts | 3 +-- yarn.lock | 22 ++++++++++++++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 807abc11..b4ce0d5e 100644 --- a/package.json +++ b/package.json @@ -99,13 +99,13 @@ "superagent": "8.0.2", "tough-cookie": "4.1.2", "typescript": "4.8.4", - "undici": "5.10.0", + "undici": "5.11.0", "urllib": "3.2.3" }, "peerDependencies": { "deasync": "^0.1.26", "tough-cookie": "^4.0.0", - "undici": "^5.1.1" + "undici": "^5.11.0" }, "peerDependenciesMeta": { "deasync": { diff --git a/src/undici/cookie_client.ts b/src/undici/cookie_client.ts index 0e9b43bd..a59c8f98 100644 --- a/src/undici/cookie_client.ts +++ b/src/undici/cookie_client.ts @@ -1,7 +1,6 @@ import type { Agent, Dispatcher } from 'undici'; -import { Client } from 'undici'; +import { Client, RedirectHandler } from 'undici'; import { kDispatch, kMaxRedirections, kUrl } from 'undici/lib/core/symbols'; -import { RedirectHandler } from 'undici/lib/handler/redirect'; import type { CookieOptions } from '../cookie_options'; import { createCookieHeaderValue } from '../utils/create_cookie_header_value'; diff --git a/yarn.lock b/yarn.lock index 9df3ac36..6c14d323 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,7 +4,6 @@ "@3846masa/configs@github:3846masa/configs#47d64189b67ef47d433c61acdbd91393ddc742f4": version "1.0.81" - uid "47d64189b67ef47d433c61acdbd91393ddc742f4" resolved "https://codeload.github.com/3846masa/configs/tar.gz/47d64189b67ef47d433c61acdbd91393ddc742f4" dependencies: "@tsconfig/strictest" "1.0.2" @@ -2291,6 +2290,13 @@ builtins@^5.0.0: dependencies: semver "^7.0.0" +busboy@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + cacache@^16.0.0, cacache@^16.0.2, cacache@^16.0.6: version "16.0.7" resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.0.7.tgz#74a5d9bc4c17b4c0b373c1f5d42dadf5dc06638d" @@ -6553,6 +6559,11 @@ stream-combiner2@~1.1.1: duplexer2 "~0.1.0" readable-stream "^2.0.2" +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -6944,7 +6955,14 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici@5.10.0, undici@^5.6.0: +undici@5.11.0: + version "5.11.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.11.0.tgz#1db25f285821828fc09d3804b9e2e934ae86fc13" + integrity sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw== + dependencies: + busboy "^1.6.0" + +undici@^5.6.0: version "5.10.0" resolved "https://registry.yarnpkg.com/undici/-/undici-5.10.0.tgz#dd9391087a90ccfbd007568db458674232ebf014" integrity sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==