import fs from 'fs';

const writeSpecs = (specPath, specs) => {
  fs.writeFileSync(specPath, JSON.stringify(specs, null, '  '), 'utf8');
};

export default writeSpecs;

import fs from 'fs';

const writeSpecs = (specPath, specs) => {
  fs.writeFileSync(specPath, `${JSON.stringify(specs, null, '  ')}\n`, 'utf8');
};

export default writeSpecs;

Fix missing newlines at end of package.json files (#5)