@mikro-orm/core 6.4.17-dev.66 → 6.4.17-dev.68

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.4.17-dev.66",
3
+ "version": "6.4.17-dev.68",
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",
@@ -64,7 +64,7 @@
64
64
  "esprima": "4.0.1",
65
65
  "fs-extra": "11.3.0",
66
66
  "globby": "11.1.0",
67
- "mikro-orm": "6.4.17-dev.66",
67
+ "mikro-orm": "6.4.17-dev.68",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }
@@ -347,7 +347,7 @@ class ConfigurationLoader {
347
347
  // inspired by https://github.com/facebook/docusaurus/pull/3386
348
348
  static checkPackageVersion() {
349
349
  const coreVersion = Utils_1.Utils.getORMVersion();
350
- if (process.env.MIKRO_ORM_ALLOW_VERSION_MISMATCH) {
350
+ if (process.env.MIKRO_ORM_ALLOW_VERSION_MISMATCH || coreVersion === 'N/A') {
351
351
  return coreVersion;
352
352
  }
353
353
  const deps = this.getORMPackages();
package/utils/Utils.js CHANGED
@@ -947,9 +947,14 @@ class Utils {
947
947
  return require('../../package.json').version;
948
948
  }
949
949
  catch {
950
- // this works with node in production build (where we do not have the `src` folder)
951
- // eslint-disable-next-line @typescript-eslint/no-var-requires
952
- return require('../package.json').version;
950
+ try {
951
+ // this works with node in production build (where we do not have the `src` folder)
952
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
953
+ return require('../package.json').version;
954
+ }
955
+ catch {
956
+ return 'N/A';
957
+ }
953
958
  }
954
959
  }
955
960
  /* istanbul ignore next */