@mikro-orm/migrations-mongodb 7.0.0-dev.23 → 7.0.0-dev.24

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.
Files changed (2) hide show
  1. package/Migrator.js +1 -1
  2. package/package.json +3 -3
package/Migrator.js CHANGED
@@ -140,7 +140,7 @@ export class Migrator {
140
140
  resolve(params) {
141
141
  const createMigrationHandler = async (method) => {
142
142
  const migration = await Utils.dynamicImport(params.path);
143
- const MigrationClass = Object.values(migration)[0];
143
+ const MigrationClass = Object.values(migration).find(cls => typeof cls === 'function' && typeof cls.constructor === 'function');
144
144
  const instance = new MigrationClass(this.driver, this.config);
145
145
  await this.runner.run(instance, method);
146
146
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/migrations-mongodb",
3
3
  "type": "module",
4
- "version": "7.0.0-dev.23",
4
+ "version": "7.0.0-dev.24",
5
5
  "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
6
  "exports": {
7
7
  "./package.json": "./package.json",
@@ -50,7 +50,7 @@
50
50
  "access": "public"
51
51
  },
52
52
  "dependencies": {
53
- "@mikro-orm/mongodb": "7.0.0-dev.23",
53
+ "@mikro-orm/mongodb": "7.0.0-dev.24",
54
54
  "mongodb": "6.19.0",
55
55
  "umzug": "3.8.2"
56
56
  },
@@ -58,6 +58,6 @@
58
58
  "@mikro-orm/core": "^6.5.1"
59
59
  },
60
60
  "peerDependencies": {
61
- "@mikro-orm/core": "7.0.0-dev.23"
61
+ "@mikro-orm/core": "7.0.0-dev.24"
62
62
  }
63
63
  }