@mikro-orm/decorators 7.0.12-dev.3 → 7.0.12-dev.5

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.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/decorators",
3
- "version": "7.0.12-dev.3",
3
+ "version": "7.0.12-dev.5",
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",
@@ -52,7 +52,7 @@
52
52
  "@mikro-orm/core": "^7.0.11"
53
53
  },
54
54
  "peerDependencies": {
55
- "@mikro-orm/core": "7.0.12-dev.3",
55
+ "@mikro-orm/core": "7.0.12-dev.5",
56
56
  "reflect-metadata": "^0.1.0 || ^0.2.0"
57
57
  },
58
58
  "peerDependenciesMeta": {
package/utils.js CHANGED
@@ -85,8 +85,9 @@ export function lookupPathFromDecorator(name, stack) {
85
85
  // In some situations (e.g. swc 1.3.4+), the presence of a source map can obscure the call to
86
86
  // __decorate(), replacing it with the constructor name. To support these cases we look for
87
87
  // Reflect.decorate() as well. Also when babel is used, we need to check
88
- // the `_applyDecoratedDescriptor` method instead.
89
- let line = stack.findIndex(line => /__decorate|Reflect\.decorate|_applyDecoratedDescriptor|applyClassDecs/.exec(line));
88
+ // the `_applyDecoratedDescriptor` method instead. TypeScript 5+ emits `__esDecorate`
89
+ // (inlined into the user file) for TC39 stage-3 native decorators.
90
+ let line = stack.findIndex(line => /__decorate|__esDecorate|Reflect\.decorate|_applyDecoratedDescriptor|applyClassDecs/.exec(line));
90
91
  // Bun can skip decorator helper frames. Native ES decorators expose the entity
91
92
  // path right after `bun:wrap`, while reflect-metadata stacks reach it via Reflect.js.
92
93
  if (line === -1) {