@mikro-orm/migrations-mongodb 6.5.2-dev.0 → 6.5.2-dev.2

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
@@ -142,7 +142,7 @@ class Migrator {
142
142
  resolve(params) {
143
143
  const createMigrationHandler = async (method) => {
144
144
  const migration = await core_1.Utils.dynamicImport(params.path);
145
- const MigrationClass = Object.values(migration)[0];
145
+ const MigrationClass = Object.values(migration).find(cls => typeof cls === 'function' && typeof cls.constructor === 'function');
146
146
  const instance = new MigrationClass(this.driver, this.config);
147
147
  await this.runner.run(instance, method);
148
148
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/migrations-mongodb",
3
- "version": "6.5.2-dev.0",
3
+ "version": "6.5.2-dev.2",
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
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -58,7 +58,7 @@
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@mikro-orm/mongodb": "6.5.2-dev.0",
61
+ "@mikro-orm/mongodb": "6.5.2-dev.2",
62
62
  "fs-extra": "11.3.1",
63
63
  "mongodb": "6.19.0",
64
64
  "umzug": "3.8.2"
@@ -67,6 +67,6 @@
67
67
  "@mikro-orm/core": "^6.5.1"
68
68
  },
69
69
  "peerDependencies": {
70
- "@mikro-orm/core": "6.5.2-dev.0"
70
+ "@mikro-orm/core": "6.5.2-dev.2"
71
71
  }
72
72
  }