diff --git a/.github/workflows/cmd-publish-pr-on-npm.yml b/.github/workflows/cmd-publish-pr-on-npm.yml index 98f6f5dcc1..5a4b0f9e46 100644 --- a/.github/workflows/cmd-publish-pr-on-npm.yml +++ b/.github/workflows/cmd-publish-pr-on-npm.yml @@ -88,11 +88,7 @@ jobs: 'No scripts allowed for security reasons!', ); - fs.writeFileSync( - packageJSONPath, - JSON.stringify(packageJSON, null, 2), - 'utf-8', - ); + fs.writeFileSync(packageJSONPath, JSON.stringify(packageJSON, null, 2)); const replyMessage = ` The latest changes of this PR are available on NPM as @@ -102,7 +98,7 @@ jobs: Also you can depend on latest version built from this PR: \`npm install --save graphql@${packageJSON.publishConfig.tag}\` `; - fs.writeFileSync('./replyMessage.txt', replyMessage.trim(), 'utf-8'); + fs.writeFileSync('./replyMessage.txt', replyMessage.trim()); - name: Publish NPM package run: npm publish --ignore-scripts ./npmDist diff --git a/.github/workflows/github-actions-bot.yml b/.github/workflows/github-actions-bot.yml index 6d130a1296..df5f166dff 100644 --- a/.github/workflows/github-actions-bot.yml +++ b/.github/workflows/github-actions-bot.yml @@ -125,7 +125,7 @@ jobs: ? 'Unknown command 😕\n\n' + process.env.SUPPORTED_COMMANDS : `Something went wrong, [please check log](${process.env.RUN_URL}).`; - fs.writeFileSync('./replyMessage.txt', replyMessage, 'utf-8'); + fs.writeFileSync('./replyMessage.txt', replyMessage); env: NEEDS: ${{ toJSON(needs) }} RUN_URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}} diff --git a/resources/diff-npm-package.ts b/resources/diff-npm-package.ts index 2ad16e6988..5ae2790f03 100644 --- a/resources/diff-npm-package.ts +++ b/resources/diff-npm-package.ts @@ -34,7 +34,7 @@ if (diff === '') { console.log('No changes found!'); } else { const reportPath = path.join(localRepoDir, 'npm-dist-diff.html'); - fs.writeFileSync(reportPath, generateReport(diff), 'utf-8'); + fs.writeFileSync(reportPath, generateReport(diff)); console.log('Report saved to: ', reportPath); }