MCPcopy Create free account
hub / github.com/conventional-changelog/commitlint / writePkg

Function writePkg

@commitlint/cli/src/cli.test.ts:1019–1024  ·  view source on GitHub ↗
(payload: unknown, options: TestOptions)

Source from the content-addressed store, hash-verified

1017});
1018
1019async function writePkg(payload: unknown, options: TestOptions) {
1020 const pkgPath = path.join(options.cwd, "package.json");
1021 const pkg = JSON.parse(await fs.readFile(pkgPath, "utf-8"));
1022 const result = merge(pkg, payload);
1023 await fs.writeFile(pkgPath, JSON.stringify(result, null, " "));
1024}

Callers 1

cli.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected