diff --git a/changelog.md b/changelog.md index 97699c1..396287c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## 2025-11-17 - 2.0.14 - fix(smartmongo.plugins) +Use default import for mongodb-memory-server (Deno compatibility), update hints and bump package version to 2.0.13 + +- Replace namespace import with default import for mongodb-memory-server to ensure compatibility with Deno (ts/smartmongo.plugins.ts). +- Add readme.hints.md documenting the Deno compatibility change and the reason for using a default import. +- Bump package.json version to 2.0.13. +- Note: ts/00_commitinfo_data.ts still lists version 2.0.12 and may need to be updated to match package.json. + ## 2025-04-06 - 2.0.12 - fix(ci/config) Update CI workflow environment variables, refine package metadata, and improve configuration settings diff --git a/package.json b/package.json index 3c58c37..6a15dec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@push.rocks/smartmongo", - "version": "2.0.12", + "version": "2.0.13", "private": false, "description": "A module for creating and managing a local MongoDB instance for testing purposes.", "main": "dist_ts/index.js", diff --git a/readme.hints.md b/readme.hints.md index 0519ecb..e92e312 100644 --- a/readme.hints.md +++ b/readme.hints.md @@ -1 +1,10 @@ - \ No newline at end of file +# Project Hints + +## Deno Compatibility + +### mongodb-memory-server Import +- The package uses a **default import** for `mongodb-memory-server` in `ts/smartmongo.plugins.ts` +- Syntax: `import mongoPlugin from 'mongodb-memory-server';` +- This works in both Node.js and Deno environments +- **Why:** Deno wraps CommonJS exports in a `default` property, so default imports are required +- Fixed in version 2.0.13 (changed from `import * as mongoPlugin`) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index e73b603..18bbd9a 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartmongo', - version: '2.0.12', + version: '2.0.14', description: 'A module for creating and managing a local MongoDB instance for testing purposes.' } diff --git a/ts/smartmongo.plugins.ts b/ts/smartmongo.plugins.ts index 33442e9..04d21d7 100644 --- a/ts/smartmongo.plugins.ts +++ b/ts/smartmongo.plugins.ts @@ -7,6 +7,6 @@ import * as smartpromise from '@push.rocks/smartpromise'; export { mongodump, smartdata, smartpath, smartpromise }; // thirdparty -import * as mongoPlugin from 'mongodb-memory-server'; +import mongoPlugin from 'mongodb-memory-server'; export { mongoPlugin };