Skip to content

Commit 2223a22

Browse files
jkomynoaqrln
andauthored
feat(config): hide third-party dependencies from type exports, fix e2e test (prisma#26383)
Co-authored-by: jkomyno <[email protected]> Co-authored-by: Alexey Orlenko <[email protected]>
1 parent d9a9356 commit 2223a22

File tree

19 files changed

+671
-136
lines changed

19 files changed

+671
-136
lines changed

packages/cli/src/utils/loadConfig.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
import { defaultConfig, loadConfigFromFile, PrismaConfigInternal } from '@prisma/config'
1+
import { loadConfigFromFile, type PrismaConfigInternal } from '@prisma/config'
2+
import { Debug } from '@prisma/debug'
23
import { assertNever, HelpError } from '@prisma/internals'
34

5+
const debug = Debug('prisma:cli:loadConfig')
6+
47
/**
58
* Will try to load the prisma config file from the given path, default path or create a default config.
69
*/
710
export async function loadConfig(configFilePath?: string): Promise<PrismaConfigInternal | HelpError> {
811
const { config, error, resolvedPath } = await loadConfigFromFile({ configFile: configFilePath })
912

1013
if (error) {
14+
debug('Error loading config file: %o', error)
1115
switch (error._tag) {
1216
case 'ConfigFileNotFound':
1317
return new HelpError(`Config file not found at "${resolvedPath}"`)
@@ -22,5 +26,5 @@ export async function loadConfig(configFilePath?: string): Promise<PrismaConfigI
2226
}
2327
}
2428

25-
return { ...defaultConfig(), ...config }
29+
return config
2630
}

0 commit comments

Comments
 (0)