All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Drop Node 12, 14, 16 support
- Add Node 20, 22, 23 support
- Extend
mongodb
peer dependency allowed versions to6.x
- Upgrade dependency
- Upgraded peer dependency
mongodb
to 5.0.0 - Change
engines
to require Node 12.9 or newer, matching the upgrade tomongodb
that occurred inv4.5.0
- Declare
express-session
as a peer dependency.
- Moved
mongodb
to a peer dependency (and also as a dev dependency forconnect-mongo
developers).connect-mongo
is no longer pinned to a specific version ofmongodb
. This allows end users to avoid errors due to Typescript definition changes when moving to new versions ofmongodb
. Users can use any version ofmongodb
that provides a compatible (non-breaking) interface tomongodb ^4.1.0
. Tested onmongodb
4.1.0
and4.1.1
. Should fix: #433 #434 #436
- Fixed "Callback was already called" when some code throws immediately after calling the set function
- Drop Node 10 support
- Upgrade
mongodb
to V4 [#422] [#426]
- Move
writeConcern
away from top-level option to fix deprecation warning #422
store.all()
method not working with encrypted store #410 #411- Update and unpin
mongodb
dependency due to upstream fix has been deployed #409
- Use
export =
for better cjs require without.default
- Add typescript example
- Fix incorrect assertion checking after adding
client
options
- Add
client
option for non-promise client
- Fix crypto parsing error by upgrading
kruptein
tov3.0.0
and change encodeas tobase64
- Added mongoose example
- Revert
createAutoRemoveIdx
and add backautoRemove
andautoRemoveInterval
- Use
matchedCount
instead ofmodifiedCount
to avoid throwing exceptions when nothing to modify #390 - Fixed
Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
by downgrade to[email protected]
- Revert update session when touch #351
- Fix cannot read property
lastModified
of null - Fix TS typing error
- Support Node.Js 10.x, 12.x and 14.x and drop older support.
- Review method to connect to MongoDB and keep only
mongoUrl
andclientPromise
options. - Remove the "Remove expired sessions compatibility mode". Now library user can choose to create auto remove index on startup or not.
- Remove
fallbackMemory
options. - Rewrite the library and test case using typescript.
Checkout the complete migration guide for more details.
- Add dbName option (#343)
- Add missing
secret
option to TS definition (#342)
- Add @types/ dev dependencies for tsc. fixes #340 (#341)
- Add TS type definition
- Added
useUnifiedTopology=true
to mongo options
- Refactor merge config logic
- chore: update depns (#326)
- Drop Node.js 4 & 6 support
- Upgrade
mongoose
to v5 andmongodb
to v3 and drop old version support - Replace deprecated mongo operation
- MongoStore need to supply client/clientPromise instead of db/dbPromise due to depns upgrade
- Add Node.js 10 & 12 support
- Implement store.all function (#291)
- Add option
writeOperationOptions
(#295) - Add Transparent crypto support (#314)
- Change test framework from Mocha to Jest
- Change linter from
xo
toeslint
- Fixed interval autoremove mode to use current date with every interval (#304, #305) (jlampise)
- Fxi #300 DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead
- Fxi #297 DeprecationWarning: collection.update is deprecated. Use updateOne, updateMany, or bulkWrite instead
- Fixed #271 TypeError: cb is not a function (brainthinks)
- Drop Node.js 0.12 and io.js support
- Drop MongoDB 2.x support
- Drop mongodb driver < 2.0.36 support
- Drop mongoose < 4.1.2 support
- Fix
ensureIndex
deprecation warning (#268, #269, #270) - Improve
get()
(#246) - Pass session in
touch
event - Remove
bluebird
from dependencies
- Fix #228 Broken with [email protected]
- Restrict
bluebird
accepted versions to 3.x
- Add
create
andupdate
events (#215) - Extend
mongodb
compatibility to2.x
- Fix bluebird warning (Awk34)
- Accept
dbPromise
as connection param - Add
close()
method to close current connection
- Support mongodb
2.1.x
- Enforce entry-points
- Fix entry-point
Breaking changes:
- For older Node.js version (
< 4.0
), the module must be loaded usingrequire('connect-mongo/es5')
- Drop
hash
option (advanced)
Others changes:
- Add
transformId
option to allow custom transformation on session id (advanced) - Rewrite in ES6 (w/ fallback)
- Update dependencies
- Improve compatibility
- Bug fixes and improvements (whitef0x0, TimothyGu, behcet-li)
- Fix initialization when a connecting
mongodb
2.0.x
instance is given (1999)
- Add
touchAfter
option to enable lazy update behavior ontouch()
method (rafaelcardoso) - Add
fallbackMemory
option to switch toMemoryStore
in some case.
- Add
touch()
method to be fully compliant withexpress-session
>= 1.10
(rafaelcardoso)
- Add
ttl
option - Add
autoRemove
option - Deprecate
defaultExpirationTime
option. Usettl
instead (in seconds)
- Make callbacks optional
- Extend compatibility to
mongodb
2.0.x
- [bugfix] #143 Missing Sessions from DB should still make callback (brekkehj)
- Accept full-featured MongoDB connection strings as
url
+ advanced options - Re-use existing or upcoming mongoose connection
- [DEPRECATED]
mongoose_connection
is renamedmongooseConnection
- [DEPRECATED]
auto_reconnect
is renamedautoReconnect
- [BREAKING]
autoReconnect
option is nowtrue
by default - [BREAKING] Insert
collection
option inurl
in not possible any more - [BREAKING] Replace for-testing-purpose
callback
byconnected
event - Add debug (use with
DEBUG=connect-mongo
) - Improve error management
- Compatibility with
mongodb
>= 1.2.0
and< 2.0.0
- Fix many bugs
- Bumped mongodb version from 1.3.x to 1.4.x (B0k0)
- Add
sid
hash capability (ZheFeng) - Add
serialize
andunserialize
options (ksheedlo)
- Merged a change which reduces data duplication
- Merged several changes by Ken Pratt, including Write Concern support
- Updated to
mongodb
version 1.2
- Integrated pull request for
mongoose_connection
option - Move to mongodb 1.0.x
- Made collection setup more robust to avoid race condition
- Added session expiry
- Added url support
- Added auto_reconnect option
- Fixed authentication
- Initial release