Skip to content

Commit 8799d19

Browse files
Remove 'utf-8' as argument of writeFileSync (graphql#3608)
1 parent 9df43fa commit 8799d19

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.github/workflows/cmd-publish-pr-on-npm.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,7 @@ jobs:
8888
'No scripts allowed for security reasons!',
8989
);
9090
91-
fs.writeFileSync(
92-
packageJSONPath,
93-
JSON.stringify(packageJSON, null, 2),
94-
'utf-8',
95-
);
91+
fs.writeFileSync(packageJSONPath, JSON.stringify(packageJSON, null, 2));
9692
9793
const replyMessage = `
9894
The latest changes of this PR are available on NPM as
@@ -102,7 +98,7 @@ jobs:
10298
Also you can depend on latest version built from this PR:
10399
\`npm install --save graphql@${packageJSON.publishConfig.tag}\`
104100
`;
105-
fs.writeFileSync('./replyMessage.txt', replyMessage.trim(), 'utf-8');
101+
fs.writeFileSync('./replyMessage.txt', replyMessage.trim());
106102
107103
- name: Publish NPM package
108104
run: npm publish --ignore-scripts ./npmDist

.github/workflows/github-actions-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
? 'Unknown command 😕\n\n' + process.env.SUPPORTED_COMMANDS
126126
: `Something went wrong, [please check log](${process.env.RUN_URL}).`;
127127
128-
fs.writeFileSync('./replyMessage.txt', replyMessage, 'utf-8');
128+
fs.writeFileSync('./replyMessage.txt', replyMessage);
129129
env:
130130
NEEDS: ${{ toJSON(needs) }}
131131
RUN_URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}

resources/diff-npm-package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if (diff === '') {
3434
console.log('No changes found!');
3535
} else {
3636
const reportPath = path.join(localRepoDir, 'npm-dist-diff.html');
37-
fs.writeFileSync(reportPath, generateReport(diff), 'utf-8');
37+
fs.writeFileSync(reportPath, generateReport(diff));
3838
console.log('Report saved to: ', reportPath);
3939
}
4040

0 commit comments

Comments
 (0)