@mikro-orm/core 7.0.0-dev.320 → 7.0.0-dev.321
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/package.json +1 -1
- package/utils/Utils.js +1 -1
- package/utils/clone.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.0.0-dev.
|
|
3
|
+
"version": "7.0.0-dev.321",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
package/utils/Utils.js
CHANGED
|
@@ -123,7 +123,7 @@ export function parseJsonSafe(value) {
|
|
|
123
123
|
}
|
|
124
124
|
export class Utils {
|
|
125
125
|
static PK_SEPARATOR = '~~~';
|
|
126
|
-
static #ORM_VERSION = '7.0.0-dev.
|
|
126
|
+
static #ORM_VERSION = '7.0.0-dev.321';
|
|
127
127
|
/**
|
|
128
128
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
129
129
|
*/
|
package/utils/clone.js
CHANGED
|
@@ -20,6 +20,7 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
+
const TypedArray = Object.getPrototypeOf(Uint8Array);
|
|
23
24
|
export function clone(parent, respectCustomCloneMethod = true) {
|
|
24
25
|
const allParents = [];
|
|
25
26
|
const allChildren = [];
|
|
@@ -74,6 +75,10 @@ export function clone(parent, respectCustomCloneMethod = true) {
|
|
|
74
75
|
parent.copy(child);
|
|
75
76
|
return child;
|
|
76
77
|
}
|
|
78
|
+
else if (parent instanceof TypedArray) {
|
|
79
|
+
child = parent.copyWithin(0);
|
|
80
|
+
return child;
|
|
81
|
+
}
|
|
77
82
|
else if (parent instanceof Error) {
|
|
78
83
|
child = new parent.constructor(parent.message);
|
|
79
84
|
}
|