- Fix: The pruning timer will no longer keep Node alive, it's been given the
unref()
treatment
- Feature: New option
pgPromise
enables the library to re-use an existing connection from pg-promise. This is a mutually-exclusive alternative to specifyingpool
,conObject
, orconString
(only one of these can be provided).
- Feature: New option
conObject
enables connection details to be set through an object - Improvement: Hardening of
conString
parsing + some added tests of it
- Breaking change + improved support: When the pg module is provided to this module, then a pool from the new
6.x
version of that module is now required rather than providing the module itself
- Bug fix: Previous timestamp fix failed critically, fixing it again. Thanks @G3z and @eemeli
- Bug fix: The internal query helper was treating params() wrong when called with two argument. Thanks for reporting @colideum!
- Bug fix: If the database and the node instances had different clocks, then things wouldn't work that well due to mixed timestamp sources. Now node handles all timestamps. Thanks for reporting @sverkoye!
- Feature: Support the
store.touch()
method to allow for extending the life time of a session without changing the data of it. This enables setting theresave
option tofalse
, which is recommended to avoid a session extender save overwriting another save that adds new data to the session. More info in the express-session readme. - Fix: Relax the engine requirements – accept newer versions of Node.js/iojs as well
- Fix: Added support for sails by supporting sending the full Express 3 object into the plugin
- Fix: If the
pg
instance used is created by this module, then this module should also close it onclose()
- Improvement: Rather than randomly cleaning up expired sessions that will now happen at the
options.pruneSessionInterval
defined interval. - Breaking change: Clients now need to close the session store to gracefully shut down their app as the pruning of sessions can't know when the rest of the app has stopped running and thus can't know when to stop pruning sessions if it itsn't told so explicitly through thew new
close()
method – or by deactivating the automatic pruning by settingingoptions.pruneSessionInterval
tofalse
. If automatic pruning is disabled the client needs to callpruneSessions()
manually or otherwise ensure that old sessions are pruned.
- Fix regression: No longer default to
public
schema, as added in2.2.0
, but rather default to the pre-2.2.0
behavior of no defined schema. This to ensure backwards compatibility with the2.x
branch, per semantic versioning best practise.
- Hotfix: Update
require('pg')
to match package.json, thanks for reporting @dmitriiabramov
- New: Now possibly to set another schema than the default
- Change: Now using the
pg
dependency again rather thanpg.js
as the latter will be discontinued aspg
now fills its role
- Fix bug with creating new sessions that was caused by 2.1.0
- Enable the table name to be configured through new
tableName
option
- Backwards incompatible change: Support for Express 4 means that Express 3 apps (and similar for Connect apps) should send
express.session
to the module rather than justexpress
. - Dependency change: The database module is now pg.js rather than pg – same library, but without compilation of any native bindings and thus less delay when eg. installing the application from scratch.
- Support for PostgreSQL versions older than 9.2
- Fix for sometimes not expiring sessions correctly
- First NPM-version of the script originally published as a Gist here: https://gist.github.com/voxpelli/6447728