@mikro-orm/decorators 7.0.0-dev.303 → 7.0.0-dev.305
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 +2 -2
- package/utils.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/decorators",
|
|
3
|
-
"version": "7.0.0-dev.
|
|
3
|
+
"version": "7.0.0-dev.305",
|
|
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": "^6.6.8"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
55
|
+
"@mikro-orm/core": "7.0.0-dev.305",
|
|
56
56
|
"reflect-metadata": "^0.1.0 || ^0.2.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
package/utils.js
CHANGED
|
@@ -86,7 +86,7 @@ export function lookupPathFromDecorator(name, stack) {
|
|
|
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
88
|
// the `_applyDecoratedDescriptor` method instead.
|
|
89
|
-
let line = stack.findIndex(line =>
|
|
89
|
+
let line = stack.findIndex(line => /__decorate|Reflect\.decorate|_applyDecoratedDescriptor/.exec(line));
|
|
90
90
|
// bun does not have those lines at all, only the DecorateProperty/DecorateConstructor,
|
|
91
91
|
// but those are also present in node, so we need to check this only if they weren't found.
|
|
92
92
|
if (line === -1) {
|
|
@@ -105,7 +105,7 @@ export function lookupPathFromDecorator(name, stack) {
|
|
|
105
105
|
line++;
|
|
106
106
|
}
|
|
107
107
|
try {
|
|
108
|
-
const re =
|
|
108
|
+
const re = /\(.+\)/i.exec(stack[line]) ? /\((.*):\d+:\d+\)/ : /at\s*(.*):\d+:\d+$/;
|
|
109
109
|
return stack[line].match(re)[1];
|
|
110
110
|
}
|
|
111
111
|
catch {
|