UNPKG

bigblocks

Version:

Complete Bitcoin UI component library - authentication, social, wallet, market, inscriptions, and blockchain interactions for React

16 lines (15 loc) 519 B
import { readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); export async function getPackageInfo() { try { const packagePath = join(__dirname, "..", "..", "..", "package.json"); const packageContent = readFileSync(packagePath, "utf-8"); return JSON.parse(packageContent); } catch { return { version: "0.0.38" }; } }