@mikro-orm/core
Advanced tools
+1
-1
| { | ||
| "name": "@mikro-orm/core", | ||
| "version": "7.1.11-dev.0", | ||
| "version": "7.1.11-dev.1", | ||
| "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": [ |
@@ -106,3 +106,3 @@ import type { Constructor, IMigrationGenerator, IMigrationRunner, IMigrator, IMigratorStorage, MaybePromise, Migration, MigrationInfo, MigrationResult, MigrationRow, MigratorEvent } from '../typings.js'; | ||
| }): RunnableMigration; | ||
| protected initialize(MigrationClass: Constructor<Migration>, name: string): RunnableMigration; | ||
| protected initialize(MigrationClass: Constructor<Migration>, name?: string): RunnableMigration; | ||
| /** | ||
@@ -109,0 +109,0 @@ * Checks if `src` folder exists, it so, tries to adjust the migrations and seeders paths automatically to use it. |
@@ -361,3 +361,4 @@ import { Utils } from './Utils.js'; | ||
| return { | ||
| name: this.storage.getMigrationName(name), | ||
| // the constructor name is the last resort, minifiers can mangle it (e.g. when bundling) | ||
| name: this.storage.getMigrationName(name ?? instance.name ?? MigrationClass.name), | ||
| up: afterRun => this.runner.run(instance, 'up', afterRun), | ||
@@ -413,3 +414,3 @@ down: afterRun => this.runner.run(instance, 'down', afterRun), | ||
| if (typeof migration === 'function') { | ||
| return this.initialize(migration, migration.name); | ||
| return this.initialize(migration); | ||
| } | ||
@@ -416,0 +417,0 @@ return this.initialize(migration.class, migration.name); |
+1
-1
@@ -156,3 +156,3 @@ import { clone } from './clone.js'; | ||
| static PK_SEPARATOR = '~~~'; | ||
| static #ORM_VERSION = '7.1.11-dev.0'; | ||
| static #ORM_VERSION = '7.1.11-dev.1'; | ||
| /** | ||
@@ -159,0 +159,0 @@ * Checks if the argument is instance of `Object`. Returns false for arrays. |
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
1581213
0.02%33759
0.01%8
-11.11%