MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getPackageJson

Function getPackageJson

packages/bundler-plugins/src/core/utils.ts:29–31  ·  view source on GitHub ↗
({ cwd, stopAt }: { cwd?: string; stopAt?: string } = {})

Source from the content-addressed store, hash-verified

27 * * Stop at the home dir, to avoid looking too deeply
28 */
29export function getPackageJson({ cwd, stopAt }: { cwd?: string; stopAt?: string } = {}): PackageJson | undefined {
30 return lookupPackageJson(cwd ?? process.cwd(), path.normalize(stopAt ?? os.homedir()));
31}
32
33export function parseMajorVersion(ver: string): number | undefined {
34 let version = ver;

Callers 2

utils.test.tsFile · 0.90
getBuildInformationFunction · 0.70

Calls 1

lookupPackageJsonFunction · 0.85

Tested by

no test coverage detected