MCPcopy Index your code
hub / github.com/fontsource/fontsource / writeUpdate

Function writeUpdate

packages/publish/src/utils.ts:13–22  ·  view source on GitHub ↗
(
	pkg: BumpObject,
	opts: WriteOptions,
)

Source from the content-addressed store, hash-verified

11}
12
13export const writeUpdate = async (
14 pkg: BumpObject,
15 opts: WriteOptions,
16): Promise<void> => {
17 const pkgPath = path.join(pkg.path, 'package.json');
18 const pkgJson: PackageJson = await fs.readJson(pkgPath);
19 if (opts.version) pkgJson.version = pkg.bumpVersion;
20 if (opts.hash) pkgJson.publishHash = pkg.hash;
21 await fs.writeFile(pkgPath, stringify(pkgJson));
22};
23
24const getPackages = async (dir: string): Promise<string[]> => {
25 const packages = await fs.readdir(dir, {

Callers 2

bumpFunction · 0.90
packPublishFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected