Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cacheable-request

Package Overview
Dependencies
Maintainers
3
Versions
64
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 10.2.0 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc