Skip to content

Commit 5236155

Browse files
committedJan 8, 2020
chore: fix supporter fetching script on node 8
1 parent 282f400 commit 5236155

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎website/fetchSupporters.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* LICENSE file in the root directory of this source tree.
88
*/
99

10-
const fs = require('fs').promises;
10+
const fs = require('fs');
11+
const {promisify} = require('util');
1112
const {request} = require('graphql-request');
1213
const path = require('path');
1314

@@ -34,11 +35,13 @@ const graphqlQuery = `
3435
}
3536
`;
3637

38+
const writeFile = promisify(fs.writeFile);
39+
3740
request('https://api.opencollective.com/graphql/v2', graphqlQuery)
3841
.then(data => {
3942
const backers = data.account.orders.nodes;
4043

41-
return fs.writeFile(
44+
return writeFile(
4245
path.resolve(__dirname, 'backers.json'),
4346
JSON.stringify(backers)
4447
);

0 commit comments

Comments
 (0)
Please sign in to comment.