* Update dependencies 2 * Lint fixes * Update graphql packages * Update changelog-entry.json * Update @octokit/rest * Update commander with help from @rachmari @rachmari * Upgrade helmet * Upgrade js-yaml * Update server.js * Update cheerio * Revert "Update cheerio" This reverts commit 8aa17c39fbf564ee554037d89e7a473027d16984.
16 lines
538 B
JavaScript
16 lines
538 B
JavaScript
const yaml = require('js-yaml')
|
|
const { groupBy } = require('lodash')
|
|
const renderContent = require('../../../lib/render-content')
|
|
|
|
module.exports = async function processUpcomingChanges (upcomingChangesYml) {
|
|
const upcomingChanges = yaml.load(upcomingChangesYml).upcoming_changes
|
|
|
|
for (const change of upcomingChanges) {
|
|
change.date = change.date.slice(0, 10)
|
|
change.reason = await renderContent(change.reason)
|
|
change.description = await renderContent(change.description)
|
|
}
|
|
|
|
return groupBy(upcomingChanges, 'date')
|
|
}
|