getJournalFiles = (journals) => {
  const journalFileMap = journals.reduce((map, journal) => {
    map[journal.index] = {}
    return map
  }, {})

  const addFilesToMap = (index, files) => {
    files.forEach(file => journalFileMap[index][file.filename] = true)
  }

  for (const journal of journals) {
    const { index, data } = journal
    const { adds, changes, removes } = data

    addFilesToMap(index, adds)
    addFilesToMap(index, changes)
    addFilesToMap(index, removes)
  }

  return journalFileMap
}
@param {IndexJournal[]} journals
@returns {object.<string, object.<string, boolean>}