Home / Function/ fixImportPath() — drizzle-orm Function Reference

fixImportPath() — drizzle-orm Function Reference

Architecture documentation for the fixImportPath() function in fix-imports.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  2a81953a_ccc3_0301_439f_6380fdd58ec9["fixImportPath()"]
  e05dadce_a14d_559d_85bd_2dc7ede571f8["fix-imports.ts"]
  2a81953a_ccc3_0301_439f_6380fdd58ec9 -->|defined in| e05dadce_a14d_559d_85bd_2dc7ede571f8
  6b4d9d19_74d1_2c38_67a2_953f9c6161b4["resolvePathAlias()"]
  2a81953a_ccc3_0301_439f_6380fdd58ec9 -->|calls| 6b4d9d19_74d1_2c38_67a2_953f9c6161b4
  style 2a81953a_ccc3_0301_439f_6380fdd58ec9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-valibot/scripts/fix-imports.ts lines 17–25

function fixImportPath(importPath: string, file: string, ext: string) {
	importPath = resolvePathAlias(importPath, file);

	if (!/\..*\.(js|ts)$/.test(importPath)) {
		return importPath;
	}

	return importPath.replace(/\.(js|ts)$/, ext);
}

Domain

Subdomains

Frequently Asked Questions

What does fixImportPath() do?
fixImportPath() is a function in the drizzle-orm codebase, defined in drizzle-valibot/scripts/fix-imports.ts.
Where is fixImportPath() defined?
fixImportPath() is defined in drizzle-valibot/scripts/fix-imports.ts at line 17.
What does fixImportPath() call?
fixImportPath() calls 1 function(s): resolvePathAlias.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free