Home / File/ get-package-info.ts — ui Source File

get-package-info.ts — ui Source File

Architecture documentation for get-package-info.ts, a typescript file in the ui codebase. 3 imports, 0 dependents.

File typescript FrameworkTooling CLICore 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  29fcaa88_eb0c_ce0b_1e7d_fd4769cdc803["get-package-info.ts"]
  d05ec4ea_7a68_3a36_bfa4_9ba7f8409ee5["path"]
  29fcaa88_eb0c_ce0b_1e7d_fd4769cdc803 --> d05ec4ea_7a68_3a36_bfa4_9ba7f8409ee5
  f9f5e551_eb59_1a6b_8bf2_b97e73eb13de["fs-extra"]
  29fcaa88_eb0c_ce0b_1e7d_fd4769cdc803 --> f9f5e551_eb59_1a6b_8bf2_b97e73eb13de
  d5d70c70_8891_c332_c5f2_45e2f95e0ed4["type-fest"]
  29fcaa88_eb0c_ce0b_1e7d_fd4769cdc803 --> d5d70c70_8891_c332_c5f2_45e2f95e0ed4
  style 29fcaa88_eb0c_ce0b_1e7d_fd4769cdc803 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import path from "path"
import fs from "fs-extra"
import { type PackageJson } from "type-fest"

export function getPackageInfo(
  cwd: string = "",
  shouldThrow: boolean = true
): PackageJson | null {
  const packageJsonPath = path.join(cwd, "package.json")

  return fs.readJSONSync(packageJsonPath, {
    throws: shouldThrow,
  }) as PackageJson
}

Subdomains

Functions

Dependencies

  • fs-extra
  • path
  • type-fest

Frequently Asked Questions

What does get-package-info.ts do?
get-package-info.ts is a source file in the ui codebase, written in typescript. It belongs to the FrameworkTooling domain, CLICore subdomain.
What functions are defined in get-package-info.ts?
get-package-info.ts defines 1 function(s): getPackageInfo.
What does get-package-info.ts depend on?
get-package-info.ts imports 3 module(s): fs-extra, path, type-fest.
Where is get-package-info.ts in the architecture?
get-package-info.ts is located at packages/shadcn/src/utils/get-package-info.ts (domain: FrameworkTooling, subdomain: CLICore, directory: packages/shadcn/src/utils).

Analyze Your Own Codebase

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

Try Supermodel Free