Skip to content

Commit 63ca966

Browse files
committedJun 17, 2019
docs: update readme and bump version to 3.0.0
1 parent aceb1ee commit 63ca966

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed
 

‎CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
3.0.0 / 2019-06-17
2+
================
3+
4+
__Breaking changes:__
5+
* __Drop__ Node.js 4 & 6 support
6+
* __Add__ Node.js 10 & 12 support
7+
* Upgrade `mongoose` to v5 and `mongodb` to v3 and drop old version support
8+
* Replace deprecated mongo operation
9+
* MongoStore need to supply client/clientPromise instead of db/dbPromise due to depns upgrade
10+
11+
__Others changes:__
12+
* __Add__ Implement store.all function (#291)
13+
* __Add__ Add option writeOperationOptions (#295)
14+
* __Add__ Transparent crypto support (#314)
15+
* Change test framework from Mocha to Jest
16+
* Change linter from xo to eslint
17+
118
2.0.3 / 2018-12-03
219
================
320

‎README.md

+5-18
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ MongoDB session store for [Connect](https://github.com/senchalabs/connect) and [
1717
* Support Node.js 8, 10 and 12
1818
* Support [MongoDB](https://www.mongodb.com/) `3.2 - 4.0`
1919

20-
For extended compatibility, see previous versions.
21-
This branch is under development. Documentation for latest release please refer to [v2.0.3](https://github.com/jdesboeufs/connect-mongo/tree/v2.0.3)
20+
For extended compatibility, see previous versions [v2.0.3](https://github.com/jdesboeufs/connect-mongo/tree/v2.0.3).
21+
But please note that we are not maintaining v2.x.x anymore.
2222

2323
## Usage
2424

@@ -36,19 +36,6 @@ app.use(session({
3636
}));
3737
```
3838

39-
Express `2.x`, `3.x` and Connect `1.x`, `2.x`:
40-
41-
```js
42-
const MongoStore = require('connect-mongo')(express);
43-
44-
app.use(express.session({
45-
secret: 'foo',
46-
store: new MongoStore(options)
47-
}));
48-
```
49-
50-
For Connect `1.x` and `2.x`, just replace `express` by `connect`.
51-
5239
### Connection to MongoDB
5340

5441
In many circumstances, `connect-mongo` will not be the only part of your application which need a connection to a MongoDB database. It could be interesting to re-use an existing connection.
@@ -126,7 +113,7 @@ A `MongoStore` instance will emit the following events:
126113
| `touch` | A session has been touched (but not modified) | `sessionId` |
127114
| `update` | A session has been updated | `sessionId` |
128115
| `set` | A session has been created OR updated _(for compatibility purpose)_ | `sessionId` |
129-
| `destroy` | A session has been destroyed | `sessionId` |
116+
| `destroy` | A session has been destroyed manually | `sessionId` |
130117

131118
## Session expiration
132119

@@ -137,8 +124,8 @@ Otherwise, it will create a new one, using `ttl` option.
137124
```js
138125
app.use(session({
139126
store: new MongoStore({
140-
url: 'mongodb://localhost/test-app',
141-
ttl: 14 * 24 * 60 * 60 // = 14 days. Default
127+
url: 'mongodb://localhost/test-app',
128+
ttl: 14 * 24 * 60 * 60 // = 14 days. Default
142129
})
143130
}));
144131
```

‎package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "connect-mongo",
3-
"version": "3.0.0-rc.2",
3+
"version": "3.0.0",
44
"description": "MongoDB session store for Express and Connect",
55
"keywords": [
66
"connect",
@@ -11,7 +11,8 @@
1111
],
1212
"contributors": [
1313
"Casey Banner <kcbanner@gmail.com>",
14-
"Jerome Desboeufs <jerome.desboeufs@gmail.com>"
14+
"Jerome Desboeufs <jerome.desboeufs@gmail.com>",
15+
"MC Or <mingchuno@gmail.com>"
1516
],
1617
"license": "MIT",
1718
"repository": {

0 commit comments

Comments
 (0)
Please sign in to comment.