Skip to content

Commit

Permalink
Merge pull request #253 from jaredwray/reverting-back-to-previous-get…
Browse files Browse the repository at this point in the history
…-stream

reverting back to previous get-stream
  • Loading branch information
jaredwray committed Jun 22, 2023
2 parents 92b2e15 + 1210a82 commit 4896ac3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cacheable-request",
"version": "10.2.11",
"version": "10.2.12",
"description": "Wrap native HTTP requests with RFC compliant cache support",
"license": "MIT",
"repository": "jaredwray/cacheable-request",
Expand Down Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"@types/http-cache-semantics": "^4.0.1",
"get-stream": "^7.0.0",
"get-stream": "^6.0.1",
"http-cache-semantics": "^4.1.1",
"keyv": "^4.5.2",
"mimic-response": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import crypto from 'node:crypto';
import stream, {PassThrough as PassThroughStream} from 'node:stream';
import {IncomingMessage} from 'node:http';
import normalizeUrl from 'normalize-url';
import {getStreamAsBuffer} from 'get-stream';
import getStream from 'get-stream';
import CachePolicy from 'http-cache-semantics';
import Response from 'responselike';
import Keyv from 'keyv';
Expand Down Expand Up @@ -127,7 +127,7 @@ class CacheableRequest {
clonedResponse = cloneResponse(response);
(async () => {
try {
const bodyPromise = getStreamAsBuffer(response);
const bodyPromise = getStream.buffer(response);
await Promise.race([
requestErrorPromise,
new Promise(resolve => response.once('end', resolve)), // eslint-disable-line no-promise-executor-return
Expand Down

0 comments on commit 4896ac3

Please sign in to comment.