Skip to content

Commit

Permalink
Fixing json import
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gallant committed Dec 9, 2024
1 parent d87634e commit c5e7079
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/scripts/set-changelog-date.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $ } from "bun";
import { replaceTokens } from '@qetza/replacetokens';
import * as fs from 'fs';
import changelog from "../../sudokuru/Changelog.json";

function getDaySuffix(day) {
if (day >= 11 && day <= 13) {
Expand All @@ -27,7 +27,6 @@ const suffix = getDaySuffix(day);
const formattedDate = `${monthNames[date.getMonth()]} ${day}${suffix}, ${date.getFullYear()}`;
console.log(formattedDate);

const changelog = JSON.parse(fs.readFileSync('sudokuru/Changelog.json', 'utf8'));
const firstDate = Object.keys(changelog)[0];
const isFirstDateReplaced = firstDate === "#{date}#";

Expand Down

0 comments on commit c5e7079

Please sign in to comment.