@mikro-orm/core 7.0.0-dev.61 → 7.0.0-dev.62

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/MikroORM.js CHANGED
@@ -39,7 +39,6 @@ export class MikroORM {
39
39
  * - no support for folder based discovery
40
40
  */
41
41
  constructor(options) {
42
- ConfigurationLoader.registerDotenv(options);
43
42
  const env = ConfigurationLoader.loadEnvironmentVarsSync();
44
43
  const coreVersion = ConfigurationLoader.checkPackageVersion();
45
44
  options = Utils.merge(options, env);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
3
  "type": "module",
4
- "version": "7.0.0-dev.61",
4
+ "version": "7.0.0-dev.62",
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",
@@ -52,8 +52,7 @@
52
52
  "access": "public"
53
53
  },
54
54
  "dependencies": {
55
- "dotenv": "17.2.3",
56
- "mikro-orm": "7.0.0-dev.61",
55
+ "mikro-orm": "7.0.0-dev.62",
57
56
  "reflect-metadata": "0.2.2"
58
57
  },
59
58
  "peerDependencies": {
@@ -25,7 +25,6 @@ export declare class ConfigurationLoader {
25
25
  * This method is used only in CLI context.
26
26
  */
27
27
  static registerTypeScriptSupport(configPath?: string, tsLoader?: 'swc' | 'tsx' | 'jiti' | 'tsimp' | 'auto'): Promise<boolean>;
28
- static registerDotenv<D extends IDatabaseDriver>(options: Options<D>): void;
29
28
  static loadEnvironmentVars<D extends IDatabaseDriver>(): Promise<Partial<Options<D>>>;
30
29
  static loadEnvironmentVarsSync<D extends IDatabaseDriver>(): Partial<Options<D>>;
31
30
  static getORMPackages(): Set<string>;
@@ -1,4 +1,3 @@
1
- import dotenv from 'dotenv';
2
1
  import { realpathSync } from 'node:fs';
3
2
  import { colors } from '../logging/colors.js';
4
3
  import { Configuration } from './Configuration.js';
@@ -185,17 +184,6 @@ export class ConfigurationLoader {
185
184
  console.warn('Neither `swc`, `tsx`, `jiti` nor `tsimp` found in the project dependencies, support for working with TypeScript files might not work. To use `swc`, you need to install both `@swc-node/register` and `@swc/core`.');
186
185
  return false;
187
186
  }
188
- static registerDotenv(options) {
189
- const path = process.env.MIKRO_ORM_ENV ?? ((options.baseDir ?? process.cwd()) + '/.env');
190
- const env = {};
191
- dotenv.config({ path, processEnv: env, quiet: true });
192
- // only propagate known env vars
193
- for (const key of Object.keys(env)) {
194
- if (key.startsWith('MIKRO_ORM_')) {
195
- process.env[key] ??= env[key]; // respect user provided values
196
- }
197
- }
198
- }
199
187
  static async loadEnvironmentVars() {
200
188
  const ret = this.loadEnvironmentVarsSync();
201
189
  // only to keep some sort of back compatibility with those using env vars only, to support `MIKRO_ORM_TYPE`