Socket
Socket
Sign inDemoInstall

cacheable-request

Package Overview
Dependencies
8
Maintainers
3
Versions
61
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.2 to 7.0.3

dist/index.d.ts

103

package.json
{
"name": "cacheable-request",
"version": "7.0.2",
"version": "7.0.3",
"description": "Wrap native HTTP requests with RFC compliant cache support",
"license": "MIT",
"repository": "lukechilds/cacheable-request",
"author": "Luke Childs <lukechilds123@gmail.com> (http://lukechilds.co.uk)",
"main": "src/index.js",
"repository": "jaredwray/cacheable-request",
"author": "Jared Wray <me@jaredwray.com> (http://jaredwray.com)",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"engines": {
"node": ">=8"
"node": ">=14.16"
},
"scripts": {
"test": "xo && nyc ava",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"test": "xo --fix && jest --coverage",
"build": "tsc --project tsconfig.build.json",
"clean": "rm -rf node_modules && rm -rf ./coverage && rm -rf ./package-lock.json && rm -rf ./test/testdb.sqlite && rm -rf ./dist"
},
"files": [
"src"
"dist"
],

@@ -32,26 +34,75 @@ "keywords": [

"dependencies": {
"clone-response": "^1.0.2",
"get-stream": "^5.1.0",
"http-cache-semantics": "^4.0.0",
"keyv": "^4.0.0",
"lowercase-keys": "^2.0.0",
"normalize-url": "^6.0.1",
"get-stream": "^6.0.1",
"http-cache-semantics": "^4.1.1",
"keyv": "^4.5.2",
"mimic-response": "^3.1.0",
"normalize-url": "^6.0.3",
"responselike": "^2.0.0"
},
"devDependencies": {
"@keyv/sqlite": "^2.0.0",
"ava": "^1.1.0",
"coveralls": "^3.0.0",
"create-test-server": "3.0.0",
"delay": "^4.0.0",
"eslint-config-xo-lukechilds": "^1.0.0",
"nyc": "^14.1.1",
"pify": "^4.0.0",
"sqlite3": "^4.0.2",
"this": "^1.0.2",
"xo": "^0.23.0"
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@keyv/sqlite": "^3.6.5",
"@types/create-test-server": "^3.0.1",
"@types/delay": "^3.1.0",
"@types/get-stream": "^3.0.2",
"@types/http-cache-semantics": "^4.0.1",
"@types/jest": "^29.5.1",
"@types/node": "^18.0.0",
"@types/pify": "^5.0.1",
"@types/responselike": "^1.0.0",
"@types/sqlite3": "^3.1.8",
"create-test-server": "3.0.1",
"eslint-plugin-jest": "^27.2.1",
"delay": "^5.0.0",
"jest": "^29.5.0",
"pify": "^5.0.0",
"sqlite3": "^5.1.6",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typescript": "^4.7.4",
"xo": "^0.54.2"
},
"jest": {
"globals": {
"ts-jest": {
"tsconfig": "./tsconfig.json"
}
},
"moduleFileExtensions": [
"ts",
"js"
],
"transform": {
"^.+\\.(ts|tsx)$": "ts-jest"
},
"testMatch": [
"**/test/*.test.(ts)"
],
"testEnvironment": "node"
},
"xo": {
"extends": "xo-lukechilds"
"plugins": [
"jest"
],
"extends": [
"plugin:jest/recommended"
],
"rules": {
"@typescript-eslint/object-curly-spacing": 0,
"@typescript-eslint/naming-convention": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/restrict-template-expressions": 0,
"@typescript-eslint/no-unsafe-return": 0,
"new-cap": 0,
"n/prefer-global/url": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/restrict-plus-operands": 0,
"@typescript-eslint/no-floating-promises": 0,
"@typescript-eslint/await-thenable": 0,
"@typescript-eslint/no-unsafe-argument": 0
}
}
}

@@ -5,4 +5,4 @@ # cacheable-request

[![Build Status](https://travis-ci.org/lukechilds/cacheable-request.svg?branch=master)](https://travis-ci.org/lukechilds/cacheable-request)
[![Coverage Status](https://coveralls.io/repos/github/lukechilds/cacheable-request/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/cacheable-request?branch=master)
[![tests](https://github.com/jaredwray/cacheable-request/actions/workflows/tests.yaml/badge.svg)](https://github.com/jaredwray/cacheable-request/actions/workflows/tests.yaml)
[![codecov](https://codecov.io/gh/jaredwray/cacheable-request/branch/master/graph/badge.svg?token=LDLaqe4PsI)](https://codecov.io/gh/jaredwray/cacheable-request)
[![npm](https://img.shields.io/npm/dm/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request)

@@ -24,3 +24,3 @@ [![npm](https://img.shields.io/npm/v/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request)

- In memory cache by default
- Official support for Redis, MongoDB, SQLite, PostgreSQL and MySQL storage adapters
- Official support for Redis, Memcache, Etcd, MongoDB, SQLite, PostgreSQL and MySQL storage adapters
- Easily plug in your own or third-party storage adapters

@@ -40,4 +40,4 @@ - If DB connection fails, cache is automatically bypassed ([disabled by default](#optsautomaticfailover))

```js
const http = require('http');
const CacheableRequest = require('cacheable-request');
import http from 'http';
import CacheableRequest from 'cacheable-request';

@@ -61,3 +61,3 @@ // Then instead of

`cacheable-request` uses [Keyv](https://github.com/lukechilds/keyv) to support a wide range of storage adapters.
`cacheable-request` uses [Keyv](https://github.com/jaredwray/keyv) to support a wide range of storage adapters.

@@ -76,3 +76,3 @@ For example, to use Redis as a cache backend, you just need to install the official Redis Keyv storage adapter:

[View all official Keyv storage adapters.](https://github.com/lukechilds/keyv#official-storage-adapters)
[View all official Keyv storage adapters.](https://github.com/jaredwray/keyv#official-storage-adapters)

@@ -94,3 +94,3 @@ Keyv also supports anything that follows the Map API so it's easy to write your own storage adapter or use a third-party solution.

View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters.
View the [Keyv docs](https://github.com/jaredwray/keyv) for more information on how to use storage adapters.

@@ -114,3 +114,3 @@ ## API

A [Keyv](https://github.com/lukechilds/keyv) storage adapter instance, or connection string if using with an official Keyv storage adapter.
A [Keyv](https://github.com/jaredwray/keyv) storage adapter instance, or connection string if using with an official Keyv storage adapter.

@@ -213,2 +213,4 @@ ### Instance

MIT © Luke Childs
MIT © Luke Childs 2017-2021
MIT © Jared Wray 2022

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc