@mikro-orm/reflection 7.0.4-dev.9 → 7.0.5-dev.0

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.
@@ -118,14 +118,14 @@ export class TsMorphMetadataProvider extends MetadataProvider {
118
118
  .map(t => t.getLiteralValueOrThrow());
119
119
  }
120
120
  }
121
- if (prop.array && prop.enum) {
122
- prop.enum = false;
123
- }
124
121
  let type = typeName;
125
122
  const union = type.split(' | ');
126
123
  const optional = property.hasQuestionToken?.() || union.includes('null') || union.includes('undefined') || tsType.isNullable();
127
124
  type = union.filter(t => !['null', 'undefined'].includes(t)).join(' | ');
128
125
  prop.array ??= type.endsWith('[]') || !!/Array<(.*)>/.exec(type);
126
+ if (prop.array && prop.enum) {
127
+ prop.enum = false;
128
+ }
129
129
  type = type
130
130
  .replace(/Array<(.*)>/, '$1') // unwrap array
131
131
  .replace(/\[]$/, '') // remove array suffix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/reflection",
3
- "version": "7.0.4-dev.9",
3
+ "version": "7.0.5-dev.0",
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",
@@ -50,10 +50,10 @@
50
50
  "ts-morph": "27.0.2"
51
51
  },
52
52
  "devDependencies": {
53
- "@mikro-orm/core": "^7.0.3"
53
+ "@mikro-orm/core": "^7.0.4"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.0.4-dev.9"
56
+ "@mikro-orm/core": "7.0.5-dev.0"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"