mirror of
https://github.com/napi-rs/napi-rs.git
synced 2026-01-25 15:38:06 +00:00
10 lines
243 B
TypeScript
10 lines
243 B
TypeScript
import { writeFileAsync } from './utils'
|
|
|
|
export async function updatePackageJson(
|
|
path: string,
|
|
partial: Record<string, any>,
|
|
) {
|
|
const old = require(path)
|
|
await writeFileAsync(path, JSON.stringify({ ...old, ...partial }, null, 2))
|
|
}
|