@aneuhold/core-ts-db-lib 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,10 +5,18 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 🔖 [3.0.2] (2025-12-03)
9
+
10
+ ### 🏗️ Changed
11
+
12
+ - Updated dependencies: now requires `@aneuhold/core-ts-lib@^2.3.12`, `zod@^4.1.13`, and `@aneuhold/local-npm-registry@^0.2.19`.
13
+ - Development dependencies updated for compatibility: `@types/node`, `prettier`, `rimraf`, and `vitest`.
14
+ - `DocumentService.deepCopy` now uses `structuredClone` instead of BSON EJSON for deep copying objects.
8
15
 
9
16
  ## 🔖 [3.0.1] (2025-11-26)
10
17
 
11
18
  ### 🏗️ Changed
19
+
12
20
  - Refactored all dashboard task, filter, and sort types and services to use `UUID` instead of `string` for user and document IDs.
13
21
  - Updated dependency: now requires `@aneuhold/local-npm-registry@^0.2.18`.
14
22
 
@@ -107,6 +115,8 @@ Updated dependency: now requires `@aneuhold/core-ts-lib@^2.3.11`.
107
115
  - Updated workflow permissions to allow repository write access
108
116
 
109
117
  <!-- Link References -->
118
+
119
+ [3.0.2]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v3.0.1...core-ts-db-lib-v3.0.2
110
120
  [3.0.1]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v3.0.0...core-ts-db-lib-v3.0.1
111
121
  [3.0.0]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v2.0.90...core-ts-db-lib-v3.0.0
112
122
  [2.0.90]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v2.0.89...core-ts-db-lib-v2.0.90
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentService.d.ts","sourceRoot":"","sources":["../../src/services/DocumentService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,YAAY,IAAI;IAChD,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IAI5C,MAAM,CAAC,UAAU,IAAI,IAAI;CAG1B"}
1
+ {"version":3,"file":"DocumentService.d.ts","sourceRoot":"","sources":["../../src/services/DocumentService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,YAAY,IAAI;IAChD,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IAI5C,MAAM,CAAC,UAAU,IAAI,IAAI;CAG1B"}
@@ -1,4 +1,3 @@
1
- import { EJSON } from 'bson';
2
1
  import { v7 as uuidv7 } from 'uuid';
3
2
  import BaseDocument from '../documents/BaseDocument.js';
4
3
  /**
@@ -11,7 +10,7 @@ export default class DocumentService {
11
10
  * @param obj - The object to copy.
12
11
  */
13
12
  static deepCopy(obj) {
14
- return EJSON.parse(EJSON.stringify(obj, { relaxed: false }));
13
+ return structuredClone(obj);
15
14
  }
16
15
  static generateID() {
17
16
  return uuidv7();
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentService.js","sourceRoot":"","sources":["../../src/services/DocumentService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAWxD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAmB,GAAM;QACtC,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAM,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,MAAM,EAAU,CAAC;IAC1B,CAAC;CACF"}
1
+ {"version":3,"file":"DocumentService.js","sourceRoot":"","sources":["../../src/services/DocumentService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAWxD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAmB,GAAM;QACtC,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,UAAU;QACf,OAAO,MAAM,EAAU,CAAC;IAC1B,CAAC;CACF"}
@@ -1,4 +1,3 @@
1
- import { EJSON } from 'bson';
2
1
  import type { UUID } from 'crypto';
3
2
  import { v7 as uuidv7 } from 'uuid';
4
3
  import BaseDocument from '../documents/BaseDocument.js';
@@ -22,7 +21,7 @@ export default class DocumentService {
22
21
  * @param obj - The object to copy.
23
22
  */
24
23
  static deepCopy<T extends object>(obj: T): T {
25
- return EJSON.parse(EJSON.stringify(obj, { relaxed: false })) as T;
24
+ return structuredClone(obj);
26
25
  }
27
26
 
28
27
  static generateID(): UUID {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aneuhold/core-ts-db-lib",
3
3
  "author": "Anton G. Neuhold Jr.",
4
4
  "license": "MIT",
5
- "version": "3.0.1",
5
+ "version": "3.0.2",
6
6
  "description": "A core database library used for personal projects",
7
7
  "packageManager": "pnpm@10.12.1",
8
8
  "type": "module",
@@ -71,21 +71,20 @@
71
71
  "Node.js"
72
72
  ],
73
73
  "dependencies": {
74
- "@aneuhold/core-ts-lib": "^2.3.11",
75
- "bson": "^7.0.0",
74
+ "@aneuhold/core-ts-lib": "^2.3.12",
76
75
  "uuid": "^13.0.0",
77
- "zod": "^4.1.12"
76
+ "zod": "^4.1.13"
78
77
  },
79
78
  "devDependencies": {
80
- "@aneuhold/local-npm-registry": "^0.2.18",
79
+ "@aneuhold/local-npm-registry": "^0.2.19",
81
80
  "@aneuhold/main-scripts": "^2.7.2",
82
- "@types/node": "^24.10.0",
81
+ "@types/node": "^24.10.1",
83
82
  "eslint": "^9.39.1",
84
83
  "jsr": "^0.13.5",
85
- "prettier": "^3.6.2",
86
- "rimraf": "^6.1.0",
84
+ "prettier": "^3.7.2",
85
+ "rimraf": "^6.1.2",
87
86
  "tsx": "^4.20.6",
88
87
  "typescript": "^5.9.3",
89
- "vitest": "^4.0.8"
88
+ "vitest": "^4.0.14"
90
89
  }
91
90
  }