Skip to content

Commit

Permalink
Upgrade decompress-response to 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed May 15, 2020
1 parent 761b8e0 commit c2bc014
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 100 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -49,6 +49,7 @@
"@types/responselike": "^1.0.0",
"cacheable-lookup": "^5.0.3",
"cacheable-request": "^7.0.1",
"decompress-response": "^6.0.0",
"get-stream": "^5.1.0",
"http2-wrapper": "^1.0.0-beta.4.5",
"lowercase-keys": "^2.0.0",
Expand Down
5 changes: 4 additions & 1 deletion source/core/index.ts
Expand Up @@ -10,6 +10,7 @@ import https = require('https');
import timer, {ClientRequestWithTimings, Timings, IncomingMessageWithTimings} from '@szmarczak/http-timer';
import CacheableLookup from 'cacheable-lookup';
import CacheableRequest = require('cacheable-request');
import decompressResponse = require('decompress-response');
// @ts-ignore Missing types
import http2wrapper = require('http2-wrapper');
import lowercaseKeys = require('lowercase-keys');
Expand All @@ -23,7 +24,6 @@ import timedOut, {Delays, TimeoutError as TimedOutTimeoutError} from './utils/ti
import urlToOptions from './utils/url-to-options';
import optionsToUrl, {URLOptions} from './utils/options-to-url';
import WeakableMap from './utils/weakable-map';
import decompressResponse from './utils/decompress-response';

type HttpRequestFunction = typeof httpRequest;
type Error = NodeJS.ErrnoException;
Expand Down Expand Up @@ -1234,6 +1234,9 @@ export default class Request extends Duplex implements RequestEvents<Request> {
const typedResponse = response as unknown as IncomingMessage & {req: ClientRequest};
const {req} = typedResponse;

// TODO: Fix `cacheable-response`

This comment has been minimized.

Copy link
@Kikobeats

Kikobeats Apr 17, 2023

Contributor
(typedResponse as any)._readableState.autoDestroy = false;

if (req) {
req.emit('cacheableResponse', typedResponse);
}
Expand Down
99 changes: 0 additions & 99 deletions source/core/utils/decompress-response.ts

This file was deleted.

0 comments on commit c2bc014

Please sign in to comment.