Skip to content

Commit

Permalink
Add some comments to the major collator
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpacaFur committed Apr 15, 2024
1 parent 0857a51 commit 634d0b1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/api/src/major/major-collator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ async function fileExists(
}

// TODO: this code is quick and dirty but works. this should be replaced with some dry-er code later.
/**
* Iterates over the ./majors directory, collecting majors and adding them to
* the exported MAJORS and MAJOR_YEARS object/set respectively. It prioritizes
* parsed.commit.json files over parsed.initial.json files because _.commit._
* files have been human-reviewed and _.initial._ files are raw scraper output.
*/
async function collateMajors() {
// TODO: determine why these needed to be runtime imports (normal import statements didn't work here).
const fs = await import("fs/promises");
const path = await import("path");
const years = (
Expand Down

0 comments on commit 634d0b1

Please sign in to comment.