Skip to content

Commit

Permalink
Remove 'utf-8' as argument of writeFileSync (graphql#3608)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored May 28, 2022
1 parent 9df43fa commit 8799d19
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/cmd-publish-pr-on-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion resources/diff-npm-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8799d19

Please sign in to comment.