Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fs.readFile(filename, 'utf8', (err, data) => {
if (err) {
console.error('ReadFail');
return;
};
const content = JSON.parse(data);
content.contributes.configuration.properties['vue-helper.version']['enum'] = versions;
config.update('version', versions[versions.length - 1], true);
fs.writeFileSync(filename, JSON.stringify(content, null, 2));
});
}