import fs from 'fs'; import glob from 'glob'; const files = glob.sync('/Users/marcmintel/Projects/at-mintel/packages/*/package.json'); files.forEach(f => { const content = fs.readFileSync(f, 'utf8'); if (content.includes('"private": true,')) { console.log(`Fixing ${f}`); const newContent = content.replace(/\s*"private": true,?\n/g, '\n'); fs.writeFileSync(f, newContent); } });