MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / writePackageJson

Function writePackageJson

scripts/bump-version.test.ts:12–15  ·  view source on GitHub ↗
(dir: string, content: Record<string, unknown>)

Source from the content-addressed store, hash-verified

10}
11
12function writePackageJson(dir: string, content: Record<string, unknown>): void {
13 fs.mkdirSync(dir, { recursive: true });
14 fs.writeFileSync(path.join(dir, 'package.json'), `${JSON.stringify(content, null, 2)}\n`);
15}
16
17function readPackageJson(dir: string): Record<string, any> {
18 return JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf-8'));

Callers 2

setupFixtureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected