UNPKG

@ossjs/release

Version:

Minimalistic, opinionated, and predictable release automation tool.

19 lines (16 loc) 454 B
import * as fs from 'node:fs' import * as path from 'node:path' import { execAsync } from '#/src/utils/exec-async.js' export function writePackageJson(nextContent: Record<string, any>): void { const packageJsonPath = path.resolve( execAsync.contextOptions.cwd!.toString(), 'package.json', ) fs.writeFileSync( packageJsonPath, /** * @fixme Do not alter the indentation. */ JSON.stringify(nextContent, null, 2), ) }