ioredis-mock
Advanced tools
Comparing version 5.5.2 to 5.5.3
@@ -7,2 +7,4 @@ "use strict"; | ||
var _redisCommands = _interopRequireDefault(require("redis-commands")); | ||
var commands = _interopRequireWildcard(require("./commands")); | ||
@@ -26,4 +28,2 @@ | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } | ||
@@ -33,2 +33,4 @@ | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/* eslint-disable max-classes-per-file */ | ||
@@ -140,2 +142,14 @@ const defaultOptions = { | ||
}); | ||
const supportedCommands = [..._redisCommands.default.list, ..._redisCommands.default.list.map(command => `${command}Buffer`)]; | ||
const docsLink = 'https://github.com/stipsan/ioredis-mock/blob/master/compat.md#supported-commands-'; | ||
supportedCommands.forEach(command => { | ||
if (!(command in this)) { | ||
Object.defineProperty(this, command, { | ||
value: () => { | ||
throw new TypeError(`Unsupported command: ${JSON.stringify(command)}, please check the full list over mocked commands: ${docsLink}`); | ||
}, | ||
writable: false | ||
}); | ||
} | ||
}); | ||
} | ||
@@ -142,0 +156,0 @@ |
@@ -37,14 +37,15 @@ { | ||
"fengari-interop": "^0.1.2", | ||
"lodash": "^4.17.20", | ||
"lodash": "^4.17.21", | ||
"minimatch": "^3.0.4", | ||
"standard-as-callback": "^2.0.1" | ||
"standard-as-callback": "^2.1.0" | ||
}, | ||
"peerDependencies": { | ||
"ioredis": "4.x" | ||
"ioredis": "4.x", | ||
"redis-commands": "1.x" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.12.1", | ||
"@babel/core": "^7.12.3", | ||
"@babel/preset-env": "^7.12.1", | ||
"@babel/register": "^7.12.1", | ||
"@babel/cli": "^7.13.14", | ||
"@babel/core": "^7.13.15", | ||
"@babel/preset-env": "^7.13.15", | ||
"@babel/register": "^7.13.14", | ||
"babel-eslint": "^10.1.0", | ||
@@ -55,16 +56,16 @@ "bluebird": "^3.7.2", | ||
"coveralls": "^3.1.0", | ||
"esbuild": "^0.11.0", | ||
"eslint": "^7.13.0", | ||
"esbuild": "^0.11.12", | ||
"eslint": "^7.24.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-config-prettier": "^8.0.0", | ||
"eslint-config-prettier": "^8.2.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jest": "^24.1.3", | ||
"husky": "^5.0.0", | ||
"eslint-plugin-jest": "^24.3.5", | ||
"husky": "^6.0.0", | ||
"ioredis": "^4.19.2", | ||
"jest": "^26.6.3", | ||
"jest-circus": "^26.6.3", | ||
"lint-staged": "^10.5.1", | ||
"prettier": "^2.1.2", | ||
"lint-staged": "^10.5.4", | ||
"prettier": "^2.2.1", | ||
"prettier-package-json": "^2.1.3", | ||
"redis-commands": "^1.6.0", | ||
"redis-commands": "^1.7.0", | ||
"stream-mock": "^2.0.5" | ||
@@ -129,3 +130,3 @@ }, | ||
"runkitExampleFilename": "example.js", | ||
"version": "5.5.2" | ||
"version": "5.5.3" | ||
} |
@@ -1,2 +0,2 @@ | ||
# ioredis-mock · [](https://npm-stat.com/charts.html?package=ioredis-mock) [](https://www.npmjs.com/package/ioredis-mock) [](compat.md) [](https://github.com/semantic-release/semantic-release) | ||
# ioredis-mock · [](https://npm-stat.com/charts.html?package=ioredis-mock) [](https://www.npmjs.com/package/ioredis-mock) [](compat.md) [](https://github.com/semantic-release/semantic-release) | ||
@@ -3,0 +3,0 @@ This library emulates [ioredis](https://github.com/luin/ioredis) by performing |
Sorry, the diff of this file is too big to display
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
483613
15749
0
7
Updatedlodash@^4.17.21
Updatedstandard-as-callback@^2.1.0