cacheable-request
Advanced tools
Comparing version 7.0.2 to 7.0.3
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
44550
6
11
420
209
22
+ Addedmimic-response@^3.1.0
+ Addedget-stream@6.0.1(transitive)
+ Addedmimic-response@3.1.0(transitive)
- Removedclone-response@^1.0.2
- Removedlowercase-keys@^2.0.0
- Removedclone-response@1.0.3(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedget-stream@5.2.0(transitive)
- Removedmimic-response@1.0.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpump@3.0.2(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedget-stream@^6.0.1
Updatedhttp-cache-semantics@^4.1.1
Updatedkeyv@^4.5.2
Updatednormalize-url@^6.0.3