lib.js
function writePackageVersion(newVersion) {
  var packageJson = path.join(process.cwd(), 'package.json'),
    raw = require(packageJson);

  raw.version = newVersion;

  fs.writeFileSync(packageJson, JSON.stringify(raw, null, 2));
}
function writePackageVersion(newVersion) {
  var packageJson = path.join(process.cwd(), 'package.json'),
    raw = require(packageJson);

  raw.version = newVersion;

  fs.writeFileSync(packageJson, JSON.stringify(raw, null, 2));
}
function writePackageVersion ( newVersion ) { var packageJson = path . join ( process . cwd ( ) , 'package.json' ) , raw = require ( packageJson ) ; raw . version = newVersion ; fs . writeFileSync ( packageJson , JSON . stringify ( raw , null , 2 ) ) ; }
Updates the package.json with the new version number
@method writePackageVersion
@param  {String} newVersion New version string MAJOR.MINOR.PATCH
Updates the package . json with the new version number