@mikro-orm/core
Advanced tools
+1
-1
| { | ||
| "name": "@mikro-orm/core", | ||
| "version": "7.1.5-dev.24", | ||
| "version": "7.1.5-dev.25", | ||
| "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,0 +5,0 @@ "keywords": [ |
@@ -552,3 +552,9 @@ import { clone } from './clone.js'; | ||
| const unwrap = prop.ref ? '?.unwrap()' : ''; | ||
| let ret = ` if (${this.getPropertyCondition(path)}`; | ||
| let condition = this.getPropertyCondition(path); | ||
| // a getter may dereference state that only exists once hydrated, so when snapshotting an | ||
| // unhydrated reference we short-circuit the read behind the initialized check | ||
| if (prop.getter && !prop.setter && path.length === 1) { | ||
| condition = `entity.__helper.__initialized && ${condition}`; | ||
| } | ||
| let ret = ` if (${condition}`; | ||
| if (prop.lazy && prop.ref) { | ||
@@ -555,0 +561,0 @@ ret += ` && entity${path.map(k => this.wrap(k)).join('')}?.isInitialized()`; |
@@ -1,3 +0,2 @@ | ||
| import type { EntityManager } from '../EntityManager.js'; | ||
| import { type LoggingOptions } from '../logging/Logger.js'; | ||
| import type { EntityManager, ForkOptions } from '../EntityManager.js'; | ||
| /** | ||
@@ -38,6 +37,4 @@ * Uses `AsyncLocalStorage` to create async context that holds the current EM fork. | ||
| } | ||
| /** Options for creating a new RequestContext, allowing schema and logger overrides. */ | ||
| export interface CreateContextOptions { | ||
| schema?: string; | ||
| loggerContext?: LoggingOptions; | ||
| /** Options for creating a new RequestContext, allowing global overrides. */ | ||
| export interface CreateContextOptions extends Omit<ForkOptions, 'useContext' | 'disableContextResolution' | 'keepTransactionContext' | 'clear'> { | ||
| } |
+1
-1
@@ -144,3 +144,3 @@ import { clone } from './clone.js'; | ||
| static PK_SEPARATOR = '~~~'; | ||
| static #ORM_VERSION = '7.1.5-dev.24'; | ||
| static #ORM_VERSION = '7.1.5-dev.25'; | ||
| /** | ||
@@ -147,0 +147,0 @@ * Checks if the argument is instance of `Object`. Returns false for arrays. |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
1565365
0.02%33508
0.01%