Skip to content

Commit

Permalink
Changelog: 🚀
Browse files Browse the repository at this point in the history
## Added

### ZRANGEBYSCORE command (stipsan#350 @usebaz)

```js
const data = {
  foo: new Map([
    ['first', { score: 1, value: 'first' }],
    ['second', { score: 2, value: 'second' }],
    ['third', { score: 3, value: 'third' }],
    ['fourth', { score: 4, value: 'fourth' }],
    ['fifth', { score: 5, value: 'fifth' }],
  ]),
};
const RedisMock = require('ioredis-mock');
const redis = new MockRedis({ data });
redis
  .zrangebyscore('foo', 1, 3)
  .then(result => console.log(result)) // logs ['first', 'second', 'third']
```

### QUIT stub (stipsan#350 @usebaz)

In `ioredis` this is the equivalent to calling `redis.disconnect`. `ioredis-mock` does not implement connection simulation functionality yet so for now it's just a stub.

```js
redis.quit() // OK
```

### UNSUBSCRIBE stub (stipsan#350 @usebaz)

Our previous release added `subscribe` and joining the fray you can now pretend to be unsubscribing (just like the newsletters in your inbox!)

```js
redis.unsubscribe() // OK
```
  • Loading branch information
stipsan authored Jan 3, 2018
1 parent 0066012 commit c131dea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ and this project adheres to

## [Unreleased]

## [3.6.0] - 2018-01-03

### Added

* `zrangebyscore` command in addition to `unsubscribe` and `quit` stubs (#350 @usebaz)

## [3.5.0] - 2017-12-07

### Added

* Subscribe Stub (#348 @yitongding)
* `subscribe` command stub (#348 @yitongding)

## [3.4.2] - 2017-11-28

Expand Down Expand Up @@ -475,7 +481,8 @@ changes.
* multi
* exec

[unreleased]: https://github.com/stipsan/ioredis-mock/compare/v3.5.0...HEAD
[unreleased]: https://github.com/stipsan/ioredis-mock/compare/v3.6.0...HEAD
[3.6.0]: https://github.com/stipsan/ioredis-mock/compare/v3.5.0...v3.6.0
[3.5.0]: https://github.com/stipsan/ioredis-mock/compare/v3.4.2...v3.5.0
[3.4.2]: https://github.com/stipsan/ioredis-mock/compare/v3.4.1...v3.4.2
[3.4.1]: https://github.com/stipsan/ioredis-mock/compare/v3.4.0...v3.4.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ioredis-mock · [![CircleCI Status](https://img.shields.io/circleci/project/github/stipsan/ioredis-mock.svg?style=flat-square)](https://circleci.com/gh/stipsan/ioredis-mock) [![AppVeyor branch](https://img.shields.io/appveyor/ci/stipsan/ioredis-mock/master.svg?style=flat-square&label=win)](https://ci.appveyor.com/project/stipsan/ioredis-mock) [![npm](https://img.shields.io/npm/dm/ioredis-mock.svg?style=flat-square)](https://npm-stat.com/charts.html?package=ioredis-mock) [![npm version](https://img.shields.io/npm/v/ioredis-mock.svg?style=flat-square)](https://www.npmjs.com/package/ioredis-mock) [![Redis Compatibility: 53%](https://img.shields.io/badge/redis-53%25-yellow.svg?style=flat-square)](compat.md) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
# ioredis-mock · [![CircleCI Status](https://img.shields.io/circleci/project/github/stipsan/ioredis-mock.svg?style=flat-square)](https://circleci.com/gh/stipsan/ioredis-mock) [![AppVeyor branch](https://img.shields.io/appveyor/ci/stipsan/ioredis-mock/master.svg?style=flat-square&label=win)](https://ci.appveyor.com/project/stipsan/ioredis-mock) [![npm](https://img.shields.io/npm/dm/ioredis-mock.svg?style=flat-square)](https://npm-stat.com/charts.html?package=ioredis-mock) [![npm version](https://img.shields.io/npm/v/ioredis-mock.svg?style=flat-square)](https://www.npmjs.com/package/ioredis-mock) [![Redis Compatibility: 55%](https://img.shields.io/badge/redis-55%25-yellow.svg?style=flat-square)](compat.md) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)

This library emulates [ioredis](https://github.com/luin/ioredis) by performing
all operations in-memory. The best way to do integration testing against redis
Expand Down
8 changes: 4 additions & 4 deletions compat.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Supported commands ![Commands Coverage: 53%](https://img.shields.io/badge/coverage-53%25-yellow.svg)
## Supported commands ![Commands Coverage: 55%](https://img.shields.io/badge/coverage-55%25-yellow.svg)

| redis | ioredis | ioredis-mock |
| --------------------------------------------------------------- | :----------------: | :----------------: |
Expand Down Expand Up @@ -98,7 +98,7 @@
| [publish](http://redis.io/commands/PUBLISH) | :white_check_mark: | :white_check_mark: |
| [pubsub](http://redis.io/commands/PUBSUB) | :white_check_mark: | :x: |
| [punsubscribe](http://redis.io/commands/PUNSUBSCRIBE) | :white_check_mark: | :x: |
| [quit](http://redis.io/commands/QUIT) | :white_check_mark: | :x: |
| [quit](http://redis.io/commands/QUIT) | :white_check_mark: | :white_check_mark: |
| [randomkey](http://redis.io/commands/RANDOMKEY) | :white_check_mark: | :white_check_mark: |
| [readonly](http://redis.io/commands/READONLY) | :white_check_mark: | :x: |
| [readwrite](http://redis.io/commands/READWRITE) | :white_check_mark: | :x: |
Expand Down Expand Up @@ -146,7 +146,7 @@
| [touch](http://redis.io/commands/TOUCH) | :white_check_mark: | :x: |
| [ttl](http://redis.io/commands/TTL) | :white_check_mark: | :white_check_mark: |
| [type](http://redis.io/commands/TYPE) | :white_check_mark: | :white_check_mark: |
| [unsubscribe](http://redis.io/commands/UNSUBSCRIBE) | :white_check_mark: | :x: |
| [unsubscribe](http://redis.io/commands/UNSUBSCRIBE) | :white_check_mark: | :white_check_mark: |
| [unwatch](http://redis.io/commands/UNWATCH) | :white_check_mark: | :x: |
| [wait](http://redis.io/commands/WAIT) | :white_check_mark: | :x: |
| [watch](http://redis.io/commands/WATCH) | :white_check_mark: | :x: |
Expand All @@ -158,7 +158,7 @@
| [zlexcount](http://redis.io/commands/ZLEXCOUNT) | :white_check_mark: | :x: |
| [zrange](http://redis.io/commands/ZRANGE) | :white_check_mark: | :white_check_mark: |
| [zrangebylex](http://redis.io/commands/ZRANGEBYLEX) | :white_check_mark: | :x: |
| [zrangebyscore](http://redis.io/commands/ZRANGEBYSCORE) | :white_check_mark: | :x: |
| [zrangebyscore](http://redis.io/commands/ZRANGEBYSCORE) | :white_check_mark: | :white_check_mark: |
| [zrank](http://redis.io/commands/ZRANK) | :white_check_mark: | :x: |
| [zrem](http://redis.io/commands/ZREM) | :white_check_mark: | :x: |
| [zremrangebylex](http://redis.io/commands/ZREMRANGEBYLEX) | :white_check_mark: | :x: |
Expand Down

0 comments on commit c131dea

Please sign in to comment.