Skip to content

Commit

Permalink
Fix confusing option deprecation messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jul 4, 2014
1 parent 61e5e6b commit 2b969b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
unreleased
==========

* Fix confusing option deprecation messages

1.6.1 / 2014-06-28
==================

Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ function session(options){
}

if (resaveSession === undefined) {
deprecate('pass resave option; default value will change');
deprecate('undefined resaveSession option; provide resave option');
resaveSession = true;
}

if (saveUninitializedSession === undefined) {
deprecate('pass saveUninitialized option; default value will change');
deprecate('undefined saveUninitialized option; provide saveUninitialized option');
saveUninitializedSession = true;
}

Expand Down Expand Up @@ -116,7 +116,7 @@ function session(options){
store.on('connect', function(){ storeReady = true; });

if (!options.secret) {
deprecate('pass secret option; do not use req.secret');
deprecate('req.secret; provide secret option');
}

return function session(req, res, next) {
Expand Down

0 comments on commit 2b969b6

Please sign in to comment.