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
  fbf9a2b5_45c6_3141_7674_b85b9a39248f["fixImportPath()"]
  6936d81a_3aea_7810_a6c4_754fa3012c40["fix-imports.ts"]
  fbf9a2b5_45c6_3141_7674_b85b9a39248f -->|defined in| 6936d81a_3aea_7810_a6c4_754fa3012c40
  97220c15_5a23_978d_e458_67b7b1ae525f["resolvePathAlias()"]
  fbf9a2b5_45c6_3141_7674_b85b9a39248f -->|calls| 97220c15_5a23_978d_e458_67b7b1ae525f
  style fbf9a2b5_45c6_3141_7674_b85b9a39248f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/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-orm/scripts/fix-imports.ts.
Where is fixImportPath() defined?
fixImportPath() is defined in drizzle-orm/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