🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

cacheable-request

Package Overview
Dependencies
Maintainers
3
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cacheable-request - npm Package Compare versions

Comparing version

to
10.2.1

8

dist/index.js

@@ -77,3 +77,3 @@ import EventEmitter from 'node:events';

});
const handler = (response) => {
const handler = async (response) => {
if (revalidate) {

@@ -83,2 +83,8 @@ response.status = response.statusCode;

if (!revalidatedPolicy.modified) {
response.resume();
await new Promise(resolve => {
// Skipping 'error' handler cause 'error' event should't be emitted for 304 response
response
.once('end', resolve);
});
const headers = convertHeaders(revalidatedPolicy.policy.responseHeaders());

@@ -85,0 +91,0 @@ response = new Response({ statusCode: revalidate.statusCode, headers, body: revalidate.body, url: revalidate.url });

4

package.json
{
"name": "cacheable-request",
"version": "10.2.0",
"version": "10.2.1",
"description": "Wrap native HTTP requests with RFC compliant cache support",

@@ -36,2 +36,3 @@ "license": "MIT",

"dependencies": {
"@types/http-cache-semantics": "^4.0.1",
"get-stream": "^6.0.1",

@@ -49,3 +50,2 @@ "http-cache-semantics": "^4.1.0",

"@types/get-stream": "^3.0.2",
"@types/http-cache-semantics": "^4.0.1",
"@types/jest": "^29.0.3",

@@ -52,0 +52,0 @@ "@types/node": "^18.7.18",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet