always write version with 2 spaces

This commit is contained in:
antelle 2021-05-08 19:35:36 +02:00
parent cc6839d13e
commit 034e0ec2e3
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 1 additions and 2 deletions

View File

@ -30,7 +30,6 @@ function processFile(name) {
throw new Error('No match found!');
}
data.version = version;
const numSpaces = name.endsWith('package-lock.json') ? 2 : 4;
const newContent = JSON.stringify(data, null, numSpaces) + '\n';
const newContent = JSON.stringify(data, null, 2) + '\n';
fs.writeFileSync(name, newContent, 'utf8');
}