How to use the @pnpm/read-package-json function in @pnpm/read-package-json

To help you get started, we’ve selected a few @pnpm/read-package-json examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pnpm / pnpm / packages / list / src / readPkg.ts View on Github external
export default (pkgPath: string) => limitPkgReads(() => readPackageJson(pkgPath))
github pnpm / pnpm / packages / utils / src / safeReadPkg.ts View on Github external
export default async function safeReadPkg (pkgPath: string): Promise {
  try {
    return await readPkg(pkgPath)
  } catch (err) {
    if ((err as NodeJS.ErrnoException).code !== 'ENOENT') throw err
    return null
  }
}

@pnpm/read-package-json

Read a package.json

MIT
Latest version published 6 days ago

Package Health Score

68 / 100
Full package analysis

Popular @pnpm/read-package-json functions