From 67d5039ff5a5518489529f9706199234e9b64ad6 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Sat, 27 May 2023 04:05:22 -0300 Subject: [PATCH] Fix `get-stream` import statement (#2266) --- source/core/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/core/index.ts b/source/core/index.ts index b97fe8a46..6f79377a5 100644 --- a/source/core/index.ts +++ b/source/core/index.ts @@ -14,7 +14,7 @@ import CacheableRequest, { } from 'cacheable-request'; import decompressResponse from 'decompress-response'; import is from '@sindresorhus/is'; -import {buffer as getBuffer} from 'get-stream'; +import getStream from 'get-stream'; import {FormDataEncoder, isFormData as isFormDataLike} from 'form-data-encoder'; import type {ClientRequestWithTimings, Timings, IncomingMessageWithTimings} from '@szmarczak/http-timer'; import type ResponseLike from 'responselike'; @@ -54,6 +54,8 @@ export type Progress = { total?: number; }; +const {buffer: getBuffer} = getStream; + const supportsBrotli = is.string(process.versions.brotli); const methodsWithoutBody: ReadonlySet = new Set(['GET', 'HEAD']);