@mikro-orm/core 7.1.11-dev.5 → 7.1.11-dev.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "7.1.11-dev.5",
3
+ "version": "7.1.11-dev.7",
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
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
153
153
  /** Collection of general-purpose utility methods used throughout the ORM. */
154
154
  export class Utils {
155
155
  static PK_SEPARATOR = '~~~';
156
- static #ORM_VERSION = '7.1.11-dev.5';
156
+ static #ORM_VERSION = '7.1.11-dev.7';
157
157
  /**
158
158
  * Checks if the argument is instance of `Object`. Returns false for arrays.
159
159
  */
package/utils/clone.js CHANGED
@@ -112,6 +112,12 @@ export function clone(parent, respectCustomCloneMethod = true) {
112
112
  });
113
113
  }
114
114
  for (const i in parent) {
115
+ // an own `__proto__` key (as produced by `JSON.parse`) has no own counterpart on
116
+ // `child` to shadow the inherited accessor, so assigning it would replace the
117
+ // clone's prototype instead of copying the value
118
+ if (i === '__proto__') {
119
+ continue;
120
+ }
115
121
  let attrs;
116
122
  if (proto) {
117
123
  attrs = getPropertyDescriptor(proto, i);