@mikro-orm/reflection 7.0.0-dev.63 → 7.0.0-dev.65

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.
@@ -4,7 +4,7 @@ export declare class TsMorphMetadataProvider extends MetadataProvider {
4
4
  private project;
5
5
  private sources;
6
6
  useCache(): boolean;
7
- loadEntityMetadata(meta: EntityMetadata, name: string): void;
7
+ loadEntityMetadata(meta: EntityMetadata): void;
8
8
  getExistingSourceFile(path: string, ext?: string, validate?: boolean): SourceFile;
9
9
  protected initProperties(meta: EntityMetadata): void;
10
10
  private extractType;
@@ -1,12 +1,12 @@
1
1
  import { ComputedPropertyName, ModuleKind, NoSubstitutionTemplateLiteral, Project, StringLiteral } from 'ts-morph';
2
- import { ConfigurationLoader, MetadataError, MetadataProvider, MetadataStorage, ReferenceKind, Utils, } from '@mikro-orm/core';
2
+ import { MetadataError, MetadataProvider, MetadataStorage, ReferenceKind, Utils, } from '@mikro-orm/core';
3
3
  export class TsMorphMetadataProvider extends MetadataProvider {
4
4
  project;
5
5
  sources;
6
6
  useCache() {
7
7
  return this.config.get('metadataCache').enabled ?? true;
8
8
  }
9
- loadEntityMetadata(meta, name) {
9
+ loadEntityMetadata(meta) {
10
10
  if (!meta.path) {
11
11
  return;
12
12
  }
@@ -23,9 +23,7 @@ export class TsMorphMetadataProvider extends MetadataProvider {
23
23
  // load types and column names
24
24
  for (const prop of Object.values(meta.properties)) {
25
25
  const type = this.extractType(prop);
26
- if (!type || this.config.get('discovery').alwaysAnalyseProperties) {
27
- this.initPropertyType(meta, prop);
28
- }
26
+ this.initPropertyType(meta, prop);
29
27
  prop.type = type || prop.type;
30
28
  }
31
29
  }
@@ -165,9 +163,8 @@ export class TsMorphMetadataProvider extends MetadataProvider {
165
163
  }
166
164
  }
167
165
  initProject() {
168
- const settings = ConfigurationLoader.getSettings();
169
166
  /* v8 ignore next */
170
- const tsConfigFilePath = this.config.get('discovery').tsConfigPath ?? settings.tsConfigPath ?? './tsconfig.json';
167
+ const tsConfigFilePath = this.config.get('discovery').tsConfigPath ?? './tsconfig.json';
171
168
  try {
172
169
  this.project = new Project({
173
170
  tsConfigFilePath: Utils.normalizePath(process.cwd(), tsConfigFilePath),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/reflection",
3
3
  "type": "module",
4
- "version": "7.0.0-dev.63",
4
+ "version": "7.0.0-dev.65",
5
5
  "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.",
6
6
  "exports": {
7
7
  "./package.json": "./package.json",
@@ -56,6 +56,6 @@
56
56
  "@mikro-orm/core": "^6.6.1"
57
57
  },
58
58
  "peerDependencies": {
59
- "@mikro-orm/core": "7.0.0-dev.63"
59
+ "@mikro-orm/core": "7.0.0-dev.65"
60
60
  }
61
61
  }