Home / Function/ getPackageVersionSync() — tailwindcss Function Reference

getPackageVersionSync() — tailwindcss Function Reference

Architecture documentation for the getPackageVersionSync() function in package-version.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  533ef2c5_1881_2c6f_f557_41582fbe2478["getPackageVersionSync()"]
  bd081bcd_62af_807e_d0f6_f163121a1f96["cache()"]
  bd081bcd_62af_807e_d0f6_f163121a1f96 -->|calls| 533ef2c5_1881_2c6f_f557_41582fbe2478
  f29a95c9_1a7d_1f94_04ba_9a97869b9a02["resolveJsId()"]
  533ef2c5_1881_2c6f_f557_41582fbe2478 -->|calls| f29a95c9_1a7d_1f94_04ba_9a97869b9a02
  style 533ef2c5_1881_2c6f_f557_41582fbe2478 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/utils/package-version.ts lines 20–29

export function getPackageVersionSync(pkg: string, base: string): string | null {
  try {
    let packageJson = resolveJsId(`${pkg}/package.json`, base)
    if (!packageJson) return null
    let { version } = JSON.parse(readFileSync(packageJson, 'utf8'))
    return version
  } catch {
    return null
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getPackageVersionSync() do?
getPackageVersionSync() is a function in the tailwindcss codebase.
What does getPackageVersionSync() call?
getPackageVersionSync() calls 1 function(s): resolveJsId.
What calls getPackageVersionSync()?
getPackageVersionSync() is called by 1 function(s): cache.

Analyze Your Own Codebase

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

Try Supermodel Free