chore: fix the usage of js-yaml

This commit is contained in:
blam
2021-01-04 11:04:31 +01:00
parent edba5c93d7
commit 153db01fc4
+1 -1
View File
@@ -16,7 +16,7 @@ const {
const pluginsDirectory = require('path').join(process.cwd(), 'data/plugins');
const pluginMetadata = fs
.readdirSync(pluginsDirectory)
.map(file => yaml.safeLoad(fs.readFileSync(`./data/plugins/${file}`, 'utf8')))
.map(file => yaml.load(fs.readFileSync(`./data/plugins/${file}`, 'utf8')))
.sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()));
const truncate = text =>
text.length > 170 ? text.substr(0, 170) + '...' : text;