@mikro-orm/core 7.0.3-dev.10 → 7.0.3-dev.11

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/package.json +1 -1
  2. package/utils/Utils.js +5 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "7.0.3-dev.10",
3
+ "version": "7.0.3-dev.11",
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
  "keywords": [
6
6
  "data-mapper",
package/utils/Utils.js CHANGED
@@ -129,7 +129,7 @@ export function parseJsonSafe(value) {
129
129
  /** Collection of general-purpose utility methods used throughout the ORM. */
130
130
  export class Utils {
131
131
  static PK_SEPARATOR = '~~~';
132
- static #ORM_VERSION = '7.0.3-dev.10';
132
+ static #ORM_VERSION = '7.0.3-dev.11';
133
133
  /**
134
134
  * Checks if the argument is instance of `Object`. Returns false for arrays.
135
135
  */
@@ -802,14 +802,11 @@ export class Utils {
802
802
  return await import(module);
803
803
  }
804
804
  catch (err) {
805
- if (err.code === 'ERR_MODULE_NOT_FOUND') {
806
- if (warning) {
807
- // eslint-disable-next-line no-console
808
- console.warn(warning);
809
- }
810
- return undefined;
805
+ if (warning && err.code === 'ERR_MODULE_NOT_FOUND') {
806
+ // eslint-disable-next-line no-console
807
+ console.warn(warning);
811
808
  }
812
- throw err;
809
+ return undefined;
813
810
  }
814
811
  }
815
812
  static xor(a, b) {