Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@mikro-orm/core

Package Overview
Dependencies
Maintainers
1
Versions
4082
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mikro-orm/core - npm Package Compare versions

Comparing version
7.0.0-dev.289
to
7.0.0-dev.290
+20
-0
metadata/MetadataProvider.js

@@ -32,3 +32,23 @@ import { Utils } from '../utils/Utils.js';

});
// Preserve function expressions from indexes/uniques — they can't survive JSON cache serialization
const expressionMap = new Map();
for (const arr of [meta.indexes, meta.uniques]) {
for (const idx of arr ?? []) {
if (typeof idx.expression === 'function' && idx.name) {
expressionMap.set(idx.name, idx.expression);
}
}
}
Utils.mergeConfig(meta, cache);
// Restore function expressions that were lost during JSON serialization
if (expressionMap.size > 0) {
for (const arr of [meta.indexes, meta.uniques]) {
for (const idx of arr ?? []) {
const fn = idx.name && expressionMap.get(idx.name);
if (fn && typeof idx.expression !== 'function') {
idx.expression = fn;
}
}
}
}
}

@@ -35,0 +55,0 @@ static useCache() {

+1
-1
{
"name": "@mikro-orm/core",
"type": "module",
"version": "7.0.0-dev.289",
"version": "7.0.0-dev.290",
"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.",

@@ -6,0 +6,0 @@ "exports": {

@@ -126,3 +126,3 @@ import { clone } from './clone.js';

static PK_SEPARATOR = '~~~';
static #ORM_VERSION = '7.0.0-dev.289';
static #ORM_VERSION = '7.0.0-dev.290';
/**

@@ -129,0 +129,0 @@ * Checks if the argument is instance of `Object`. Returns false for arrays.