Skip to content

Commit 959dbe9

Browse files
committed
docs: update docs to reflect reaility
1 parent b8fb496 commit 959dbe9

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Welcome! This file keeps lightweight coordination notes for anyone (human or AI)
66

77
1. Follow `docs/PLANS.md` for the prioritized maintenance backlog.
88
2. When picking up a task, append a short status note under the relevant section in `docs/PLANS.md` (e.g. `- [started YYYY-MM-DD] <task>`), then remove or update it when you finish.
9-
3. Build pipeline now uses `tsdown` for dual ESM/CJS bundles into `dist/` plus `tsc` for typed transpilation (`yarn build` runs both). Local sanity checks confirm `yarn build`, `yarn test:lint`, and `yarn test:prettier` pass (lint only warns on crypto key_size/iv_size/at_size camelCase). Full `yarn test` should be run from a host environment with MongoDB (e.g., docker compose up) until tests are migrated to mongodb-memory-server.
9+
3. Build pipeline now uses `tsdown` for dual ESM/CJS bundles into `dist/` plus `tsc` for typed transpilation (`yarn build` and `yarn typecheck`). Local sanity checks confirm `yarn build`, `yarn test:lint`, and `yarn test:prettier` pass (lint only warns on crypto key_size/iv_size/at_size camelCase). Full `yarn test` still needs a running MongoDB (e.g., docker compose up) until tests migrate to mongodb-memory-server.
1010

1111
## Workflow Expectations
1212

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88

99
- **Breaking:** Drop Node <= 18; require Node.js >= 20.8 for builds, tests, and runtime.
10-
- **Compatibility:** Still targets MongoDB driver >= 5.x and server 4.4–8.0 (peer range `>=5` unchanged).
11-
- **Upgrades:** Library + tooling refreshed (Ava 6, @ava/typescript 6, TypeScript 5.9, ESLint 9, Prettier 3, mongodb dev 7.0, express 4.21/express-session 1.18, and related utilities).
10+
- **Compatibility:** Still targets MongoDB driver >= 5.x and server 4.4–8.0 (peer range `>=5`); CI exercises Node 20/22/24 across driver 5/6/7 and MongoDB 4.4–8.0.
11+
- **Packaging:** Switched to `tsdown` for dual ESM/CJS bundles in `dist/`, added exports map and ESM `type: module` package metadata, and cleaned typings (`dist/index.d.ts` + `.d.cts`).
12+
- **Tooling:** Tightened TypeScript config (strict flags, es2022 target, node16 module resolution) and refreshed dev stack (Ava 6, @ava/typescript 6, TypeScript 5.9, ESLint 9, Prettier 3, Husky 9).
13+
- **Runtime types:** `MongoStore` is now generic and hooks (serialize/transformId/crypto) are typed to reduce `any` usage.
1214

1315
## [5.1.0] - 2023-10-14
1416

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ MongoDB session store for [Connect](https://github.com/senchalabs/connect) and [
55
[![npm version](https://img.shields.io/npm/v/connect-mongo.svg)](https://www.npmjs.com/package/connect-mongo)
66
[![downloads](https://img.shields.io/npm/dm/connect-mongo.svg)](https://www.npmjs.com/package/connect-mongo)
77
[![Sanity check](https://github.com/jdesboeufs/connect-mongo/actions/workflows/sanity.yml/badge.svg)](https://github.com/jdesboeufs/connect-mongo/actions/workflows/sanity.yml)
8-
[![Coverage Status](https://coveralls.io/repos/jdesboeufs/connect-mongo/badge.svg?branch=master&service=github)](https://coveralls.io/github/jdesboeufs/connect-mongo?branch=master)
8+
[![coverage](https://codecov.io/gh/jdesboeufs/connect-mongo/branch/master/graph/badge.svg)](https://app.codecov.io/gh/jdesboeufs/connect-mongo)
9+
[![compatibility matrix](https://img.shields.io/badge/ci-matrix-green)](https://github.com/jdesboeufs/connect-mongo/actions/workflows/sanity.yml)
910

1011
> Breaking change in V4 and rewritten the whole project using Typescript. Please checkout the [migration guide](MIGRATION_V4.md) and [changelog](CHANGELOG.md) for details.
1112
@@ -49,8 +50,8 @@ yarn add connect-mongo
4950
## Compatibility
5051

5152
* Support Express up to `5.0`
52-
* Support [native MongoDB driver](http://mongodb.github.io/node-mongodb-native/) `5.x` - `7.x` (peer dependency range `>=5 <8`)
53-
* Support Node.js 20 LTS, 22 LTS and 24 (Current)
53+
* Support [native MongoDB driver](https://www.mongodb.com/docs/drivers/node/current/) `>= 5.x` (peer dependency range `>=5.0.0`, tested in CI with 5.x, 6.x, and 7.x)
54+
* Support Node.js 20 LTS, 22 LTS and 24 (Current LTS)
5455
* Support [MongoDB](https://www.mongodb.com/) server versions `4.4` - `8.0`
5556

5657
We follow MongoDB's official [Node.js driver compatibility tables](https://www.mongodb.com/docs/drivers/compatibility/?driver-language=javascript&javascript-driver-framework=nodejs) and exercise **every** combination of the versions above (3 Node releases × 3 driver majors × 5 server tags) in CI so that mismatches surface quickly. Note that driver 5.x officially supports Node 20, while Node 22/24 coverage relies on driver 6.x/7.x, matching the upstream guidance.
@@ -279,7 +280,7 @@ One of the following options should be provided. If more than one option are pro
279280

280281
|Option|Default|Description|
281282
|------|:-----:|-----------|
282-
|`mongoOptions`|`{ useUnifiedTopology: true }`|Options object for [`MongoClient.connect()`](https://mongodb.github.io/node-mongodb-native/3.3/api/MongoClient.html#.connect) method. Can be used with `mongoUrl` option.|
283+
|`mongoOptions`|`{}`|Options object forwarded to [`MongoClient.connect`](https://www.mongodb.com/docs/drivers/node/current/fundamentals/connection/#mongodb-uri-connection-string), e.g. TLS/SRV settings. Can be used with `mongoUrl` option.|
283284
|`dbName`||A name of database used for storing sessions. Can be used with `mongoUrl`, or `clientPromise` options. Takes precedence over database name present in the connection string.|
284285
|`collectionName`|`'sessions'`|A name of collection used for storing sessions.|
285286
|`ttl`|`1209600`|The maximum lifetime (in seconds) of the session which will be used to set `session.cookie.expires` if it is not yet set. Default is 14 days.|
@@ -337,11 +338,12 @@ After the first run you can edit `example/.env` to swap between the local docker
337338

338339
### Release
339340

340-
Since I cannot access the setting page. I can only do it manually.
341+
Until the GitHub release workflow lands, do the manual flow:
341342

342343
1. Bump version, update `CHANGELOG.md` and README. Commit and push.
343-
2. Run `yarn build && yarn test && npm publish`
344-
3. `git tag vX.Y.Z && git push --tags`
344+
2. Run `yarn test && yarn build` (build uses `tsdown` to emit dual ESM/CJS bundles to `dist/`).
345+
3. Publish: `npm publish`
346+
4. Tag: `git tag vX.Y.Z && git push --tags`
345347

346348
## License
347349

0 commit comments

Comments
 (0)