getPackageVersion() — tailwindcss Function Reference
Architecture documentation for the getPackageVersion() function in package-version.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD ba2b2d3f_de0b_3aba_8ef9_99f2d53c94d9["getPackageVersion()"] 0f4b2aca_6ae5_ec90_f7db_7b345b730686["package-version.ts"] ba2b2d3f_de0b_3aba_8ef9_99f2d53c94d9 -->|defined in| 0f4b2aca_6ae5_ec90_f7db_7b345b730686 382c823e_93e7_43e9_c9aa_1dc8c7d46b17["resolveJsId()"] ba2b2d3f_de0b_3aba_8ef9_99f2d53c94d9 -->|calls| 382c823e_93e7_43e9_c9aa_1dc8c7d46b17 style ba2b2d3f_de0b_3aba_8ef9_99f2d53c94d9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/utils/package-version.ts lines 9–18
export async function getPackageVersion(pkg: string, base: string): Promise<string | null> {
try {
let packageJson = resolveJsId(`${pkg}/package.json`, base)
if (!packageJson) return null
let { version } = JSON.parse(await fs.readFile(packageJson, 'utf8'))
return version
} catch {
return null
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does getPackageVersion() do?
getPackageVersion() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/utils/package-version.ts.
Where is getPackageVersion() defined?
getPackageVersion() is defined in packages/@tailwindcss-upgrade/src/utils/package-version.ts at line 9.
What does getPackageVersion() call?
getPackageVersion() calls 1 function(s): resolveJsId.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free