From 3214570b7b407035a561bc9f7f8414efd1bc9161 Mon Sep 17 00:00:00 2001 From: Romain Prieto Date: Tue, 29 Mar 2016 15:43:37 +1100 Subject: [PATCH] Updated all dependencies + Snyk badge to show vulnerabilities Async version --- .gitignore | 1 + README.md | 1 + package.json | 18 +++++++++--------- test/rate-limiter.spec.js | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 68b21f0..10d9b1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules +/dump.rdb .DS_Store diff --git a/README.md b/README.md index a80ebbb..f80a558 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![Build Status](http://img.shields.io/travis/TabDigital/redis-rate-limiter.svg?style=flat)](http://travis-ci.org/TabDigital/redis-rate-limiter) [![Dependencies](http://img.shields.io/david/TabDigital/redis-rate-limiter.svg?style=flat)](https://david-dm.org/TabDigital/redis-rate-limiter) [![Dev dependencies](http://img.shields.io/david/dev/TabDigital/redis-rate-limiter.svg?style=flat)](https://david-dm.org/TabDigital/redis-rate-limiter) +[![Known Vulnerabilities](https://snyk.io/package/npm/redis-rate-limiter/badge.svg)](https://snyk.io/package/npm/redis-rate-limiter) Rate-limit any operation, backed by Redis. diff --git a/package.json b/package.json index cc24713..d48e7fa 100644 --- a/package.json +++ b/package.json @@ -9,16 +9,16 @@ "test": "./node_modules/.bin/mocha" }, "dependencies": { - "ip": "~0.3.1", - "moment": "~2.8.1" + "ip": "~1.1.2", + "moment": "~2.12.0" }, "devDependencies": { - "async": "~0.9.0", - "express": "~4.9.5", - "lodash": "~2.4.1", - "mocha": "~1.21.4", - "redis": "~0.12.1", - "should": "~4.0.4", - "supertest": "~0.13.0" + "async": "~1.5.2", + "express": "~4.13.4", + "lodash": "~4.6.1", + "mocha": "~2.4.5", + "redis": "~2.6.0-0", + "should": "~8.3.0", + "supertest": "~1.2.0" } } diff --git a/test/rate-limiter.spec.js b/test/rate-limiter.spec.js index b20d84b..4bf7f13 100644 --- a/test/rate-limiter.spec.js +++ b/test/rate-limiter.spec.js @@ -28,7 +28,7 @@ describe('Rate-limiter', function() { var limiter = createLimiter('10/second'); var reqs = request(limiter, 5, {id: 'a'}); async.parallel(reqs, function(err, rates) { - _.pluck(rates, 'current').should.eql([1, 2, 3, 4, 5]); + _.map(rates, 'current').should.eql([1, 2, 3, 4, 5]); _.each(rates, function(r) { r.key.should.eql('a'); r.limit.should.eql(10);