From c5655e093a974d01058736d9ee448d9fd551a7d2 Mon Sep 17 00:00:00 2001 From: Jonathan Ong Date: Fri, 31 Jan 2014 13:52:27 -0800 Subject: [PATCH] bump cookies to 0.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no longer need to do that keygrip stuff, though i’m more inclined to remove all the error checking. --- History.md | 1 + lib/application.js | 5 ++--- package.json | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/History.md b/History.md index 9f211eb..7f96219 100644 --- a/History.md +++ b/History.md @@ -6,6 +6,7 @@ * add req.host= * add: context.throw supports Error instances * update co + * update cookies 0.2.1 / 2013-12-30 ================== diff --git a/lib/application.js b/lib/application.js index 40790a2..4166b94 100644 --- a/lib/application.js +++ b/lib/application.js @@ -10,7 +10,6 @@ var context = require('./context'); var request = require('./request'); var response = require('./response'); var Cookies = require('cookies'); -var Keygrip = require('keygrip'); var accepts = require('accepts'); var assert = require('assert'); var http = require('http'); @@ -121,10 +120,10 @@ app.callback = function(){ */ app.__defineSetter__('keys', function(keys){ - var ok = Array.isArray(keys) || keys instanceof Keygrip; + var ok = keys && (Array.isArray(keys) + || (keys.constructor && keys.constructor.name === 'Keygrip')); debug('keys %j', keys); if (!ok) throw new TypeError('app.keys must be an array or Keygrip'); - if (!(keys instanceof Keygrip)) keys = new Keygrip(keys); this._keys = keys; }); diff --git a/package.json b/package.json index dc970fc..bc466ab 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,7 @@ "mime": "~1.2.11", "fresh": "~0.2.1", "koa-compose": "~2.2.0", - "cookies": "~0.3.7", - "keygrip": "~1.0.0", + "cookies": "~0.4.0", "delegates": "0.0.3" }, "devDependencies": {