diff --git a/utility/generate-release-note/change-log.js b/utility/generate-release-note/change-log.js index 53c593adc..39418ec79 100644 --- a/utility/generate-release-note/change-log.js +++ b/utility/generate-release-note/change-log.js @@ -13,7 +13,7 @@ const ModifiedSinceVersion = "2.x"; module.exports = async function main(argv) { const out = new Output(); await GenerateChangeList(argv, out); - await fs.writeFile(argv.outputPath, out.buffer); + await fs.promises.writeFile(argv.outputPath, out.buffer); }; async function GenerateChangeList(argv, out) { diff --git a/utility/generate-release-note/package-list.js b/utility/generate-release-note/package-list.js index 7ddaea9e9..a41b26481 100644 --- a/utility/generate-release-note/package-list.js +++ b/utility/generate-release-note/package-list.js @@ -43,7 +43,7 @@ const DownloadLinkPrefixNoVersion = `https://github.com/be5invis/Iosevka/release async function GeneratePackageList(argv, out) { const imagePrefix = `${ImagePrefixNoVersion}/v${argv.version}/images`; - const pkgShapesData = await fs.promises.readJson(argv.releasePackagesJsonPath); + const pkgShapesData = JSON.parse(await fs.promises.readFile(argv.releasePackagesJsonPath)); const DownloadLinkPrefix = `${DownloadLinkPrefixNoVersion}/v${argv.version}`; out.log(``); diff --git a/utility/update-package-json-version/index.js b/utility/update-package-json-version/index.js index f6d65ce2d..0ccad77e2 100644 --- a/utility/update-package-json-version/index.js +++ b/utility/update-package-json-version/index.js @@ -20,9 +20,9 @@ setTimeout( async function main() { const version = await GetLatestVersion(); - const packageJson = await fs.readJson(PackageJsonPath); + const packageJson = JSON.parse(await fs.promises.readFile(PackageJsonPath)); packageJson.version = version; - await fs.writeJson(PackageJsonPath, packageJson, { spaces: 2 }); + await fs.promises.writeFile(PackageJsonPath, JSON.stringify(packageJson, null, " ") + "\n"); } async function GetLatestVersion() {