Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 2fbb16f

Browse files
committed
docs: Updates changelog
1 parent 6d0e903 commit 2fbb16f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CHANGELOG.md

+30
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,36 @@ All notable changes to this project will be documented in this file. This projec
1414

1515
### Removed
1616

17+
## [0.3.0]
18+
19+
### Breaking Changes
20+
21+
- Updated minimum node version to `>=18.0.0`
22+
- Package is now ESM-only. One major reason for this change is that TypeScript now understands ESM importing naturally, making it easy to use this package in TypeScript projects without any additional configuration. If you are using CommonJS, you will need to use a bundler such as Webpack or Rollup to use this package, or import the library dynamically using `await import("mongo-data-api")`. The following snippet will provide support for importing your module safely in CommonJS.
23+
24+
```ts
25+
let mongoDataApiClient: MongoClient | undefined;
26+
const createMongoClient = async () => {
27+
if (mongoDataApiClient) return mongoDataApiClient;
28+
29+
const { MongoClient } = await import("mongo-data-api");
30+
mongoDataApiClient = new MongoClient(/*options*/);
31+
return mongoDataApiClient;
32+
};
33+
```
34+
35+
### Added
36+
37+
- Smart retries via `p-retry` for hard failures such as `ECONNRESET` and `ECONNREFUSED`
38+
39+
### Fixed
40+
41+
- Return type on `insertOne` is now of type `ObjectId` instead of `string`
42+
43+
### Changed
44+
45+
### Removed
46+
1747
## [0.2.2]
1848

1949
### Fixed

0 commit comments

Comments
 (0)