fix(smartmongo.plugins): Use default import for mongodb-memory-server (Deno compatibility), update hints and bump package version to 2.0.13

This commit is contained in:
2025-11-17 02:59:44 +00:00
parent e22c0d4644
commit 46db52184b
5 changed files with 21 additions and 4 deletions

View File

@@ -1,5 +1,13 @@
# Changelog # 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) ## 2025-04-06 - 2.0.12 - fix(ci/config)
Update CI workflow environment variables, refine package metadata, and improve configuration settings Update CI workflow environment variables, refine package metadata, and improve configuration settings

View File

@@ -1,6 +1,6 @@
{ {
"name": "@push.rocks/smartmongo", "name": "@push.rocks/smartmongo",
"version": "2.0.12", "version": "2.0.13",
"private": false, "private": false,
"description": "A module for creating and managing a local MongoDB instance for testing purposes.", "description": "A module for creating and managing a local MongoDB instance for testing purposes.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@@ -1 +1,10 @@
# 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`)

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartmongo', 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.' description: 'A module for creating and managing a local MongoDB instance for testing purposes.'
} }

View File

@@ -7,6 +7,6 @@ import * as smartpromise from '@push.rocks/smartpromise';
export { mongodump, smartdata, smartpath, smartpromise }; export { mongodump, smartdata, smartpath, smartpromise };
// thirdparty // thirdparty
import * as mongoPlugin from 'mongodb-memory-server'; import mongoPlugin from 'mongodb-memory-server';
export { mongoPlugin }; export { mongoPlugin };