tooling/util/package.js
async function write(packageName, pkg) {
  const packagePath = path.join(cwd, packageName, 'package.json');

  await fs.writeFile(packagePath, `${JSON.stringify(pkg, null, 2)}\n`);
}
async function write(packageName, pkg) {
  const packagePath = path.join(cwd, packageName, 'package.json');

  await fs.writeFile(packagePath, `${JSON.stringify(pkg, null, 2)}\n`);
}
async function write ( packageName , pkg ) { const packagePath = path . join ( cwd , packageName , 'package.json' ) ; await fs . writeFile ( packagePath , ` ${ JSON . stringify ( pkg , null , 2 ) } \n ` ) ; }
Writes an object to a package.json
@param {string} packageName
@param {Object} pkg
Writes an object to a package . json