Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 477f446c34 | |||
| fbb8bb685c | |||
| 4cf62fd91c | |||
| 8ee45c5646 |
13
changelog.md
13
changelog.md
@@ -1,5 +1,18 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-11-28 - 7.0.6 - fix(classes.collection)
|
||||||
|
Guard against missing collection before attaching document constructor in Collection decorator
|
||||||
|
|
||||||
|
- Added a truthy check for `coll` before setting `(coll as any).docCtor` in the Collection decorator (ts/classes.collection.ts).
|
||||||
|
- Prevents a potential TypeError when `collectionFactory.getCollection` returns null/undefined during decorator initialization.
|
||||||
|
|
||||||
|
## 2025-11-28 - 7.0.5 - fix(package)
|
||||||
|
Add package exports entry and remove legacy main/typings fields
|
||||||
|
|
||||||
|
- Added an "exports" entry in package.json mapping "." to ./dist_ts/index.js to declare the package's ESM entrypoint.
|
||||||
|
- Removed legacy "main" and "typings" fields from package.json.
|
||||||
|
- Improves Node/module resolution and modern bundler compatibility by using the package exports field.
|
||||||
|
|
||||||
## 2025-11-28 - 7.0.4 - fix(decorators)
|
## 2025-11-28 - 7.0.4 - fix(decorators)
|
||||||
Add Symbol.metadata polyfill and import it at entry to ensure decorator metadata is available
|
Add Symbol.metadata polyfill and import it at entry to ensure decorator metadata is available
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/smartdata",
|
"name": "@push.rocks/smartdata",
|
||||||
"version": "7.0.4",
|
"version": "7.0.6",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.",
|
"description": "An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.",
|
||||||
"main": "dist_ts/index.js",
|
"exports": {
|
||||||
"typings": "dist_ts/index.d.ts",
|
".": "./dist_ts/index.js"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tstest test/ --verbose --logfile --timeout 120",
|
"test": "tstest test/ --verbose --logfile --timeout 120",
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartdata',
|
name: '@push.rocks/smartdata',
|
||||||
version: '7.0.4',
|
version: '7.0.6',
|
||||||
description: 'An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.'
|
description: 'An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export function Collection(dbArg: SmartdataDb | TDelayed<SmartdataDb>) {
|
|||||||
}
|
}
|
||||||
const coll = collectionFactory.getCollection(constructor.name, dbArg);
|
const coll = collectionFactory.getCollection(constructor.name, dbArg);
|
||||||
// Attach document constructor for searchableFields lookup
|
// Attach document constructor for searchableFields lookup
|
||||||
if (!(coll as any).docCtor) {
|
if (coll && !(coll as any).docCtor) {
|
||||||
(coll as any).docCtor = decoratedClass;
|
(coll as any).docCtor = decoratedClass;
|
||||||
}
|
}
|
||||||
return coll;
|
return coll;
|
||||||
|
|||||||
Reference in New Issue
Block a user