Skip to content

Commit

Permalink
site: remove temporary code for history (#31) [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
linusg authored Sep 14, 2023
1 parent 813086e commit f0c9f6a
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions site/generate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -476,24 +476,12 @@ walkStruct(struct);
let history;

try {
// history = await (await fetch('https://test262.fyi/data/history.json')).json();
// tmp: backfill a couple of days of data, and convert kiesel versions to full hashes
history = await (await fetch('https://raw.githubusercontent.com/CanadaHonk/test262.fyi/f6a51223ec9e6db2d9ce4868d17b6ac033190ef7/backfill.json')).json();
history = await (await fetch('https://test262.fyi/data/history.json')).json();
} catch {
// failed, probably does not exist or ?????
history = {};
}

// tmp: history was an array for a few days, convert to new format
if (Array.isArray(history)) {
const old = history;

history = {};
for (const x of old) {
history[(new Date(x.time)).toISOString().split('T')[0]] = x;
}
}

const date = (new Date()).toISOString().split('T')[0];
const indexResults = JSON.parse(readFileSync(join(dataDir, 'index.json')));

Expand Down

0 comments on commit f0c9f6a

Please sign in to comment.