@mikro-orm/core 6.4.13-dev.2 → 6.4.13-dev.3

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 +2 -2
  2. package/utils/Utils.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.4.13-dev.2",
3
+ "version": "6.4.13-dev.3",
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.13-dev.2",
67
+ "mikro-orm": "6.4.13-dev.3",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }
package/utils/Utils.js CHANGED
@@ -664,7 +664,8 @@ class Utils {
664
664
  // but those are also present in node, so we need to check this only if they weren't found.
665
665
  if (line === -1) {
666
666
  // here we handle bun which stack is different from nodejs so we search for reflect-metadata
667
- const reflectLine = stack.findIndex(line => Utils.normalizePath(line).includes('node_modules/reflect-metadata/Reflect.js'));
667
+ // Different bun versions might have different stack traces. The "last index" works for both 1.2.6 and 1.2.7.
668
+ const reflectLine = stack.findLastIndex(line => Utils.normalizePath(line).includes('node_modules/reflect-metadata/Reflect.js'));
668
669
  if (reflectLine === -1 || reflectLine + 2 >= stack.length || !stack[reflectLine + 1].includes('bun:wrap')) {
669
670
  return name;
670
671
  }