@mikro-orm/migrations 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
@@ -213,7 +213,7 @@ export class Migrator {
213
213
  resolve(params) {
214
214
  const createMigrationHandler = async (method) => {
215
215
  const migration = await Utils.dynamicImport(params.path);
216
- const MigrationClass = Object.values(migration)[0];
216
+ const MigrationClass = Object.values(migration).find(cls => typeof cls === 'function' && typeof cls.constructor === 'function');
217
217
  const instance = new MigrationClass(this.driver, this.config);
218
218
  await this.runner.run(instance, method);
219
219
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/migrations",
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,13 +50,13 @@
50
50
  "access": "public"
51
51
  },
52
52
  "dependencies": {
53
- "@mikro-orm/knex": "7.0.0-dev.23",
53
+ "@mikro-orm/knex": "7.0.0-dev.24",
54
54
  "umzug": "3.8.2"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@mikro-orm/core": "^6.5.1"
58
58
  },
59
59
  "peerDependencies": {
60
- "@mikro-orm/core": "7.0.0-dev.23"
60
+ "@mikro-orm/core": "7.0.0-dev.24"
61
61
  }
62
62
  }