44
55const http = require ( 'request-promise-json' ) ;
66const { exec} = require ( 'child-process-promise' ) ;
7- const { readdirSync} = require ( 'fs' ) ;
87const { readJsonSync} = require ( 'fs-extra' ) ;
98const { logPromise} = require ( '../utils' ) ;
109const theme = require ( '../theme' ) ;
@@ -23,8 +22,9 @@ const run = async ({cwd, tags}) => {
2322
2423 // If this release was created on Circle CI, grab the updated error codes from there.
2524 // Else the user will have to manually regenerate them.
26- if ( environment === "ci" ) {
25+ if ( environment === 'ci' ) {
2726 // https://circleci.com/docs/2.0/artifacts/#downloading-all-artifacts-for-a-build-on-circleci
27+ // eslint-disable-next-line max-len
2828 const metadataURL = `https://circleci.com/api/v1.1/project/github/facebook/react/${ buildNumber } /artifacts?circle-token=${
2929 process . env . CIRCLE_CI_API_TOKEN
3030 } `;
@@ -36,17 +36,16 @@ const run = async ({cwd, tags}) => {
3636 entry => entry . path === 'home/circleci/project/node_modules.tgz'
3737 ) ;
3838 const { url} = metadata . find (
39- entry => entry . node_index === node_index && entry . path === 'home/circleci/project/scripts/error-codes/codes.json'
39+ entry =>
40+ entry . node_index === node_index &&
41+ entry . path === 'home/circleci/project/scripts/error-codes/codes.json'
4042 ) ;
4143
4244 // Download and stage changers
4345 await exec ( `curl ${ url } --output ${ cwd } /scripts/error-codes/codes.json` ) ;
4446 }
4547} ;
4648
47- module . exports = async ( params ) => {
48- return logPromise (
49- run ( params ) ,
50- theme `Retrieving error codes`
51- ) ;
49+ module . exports = async params => {
50+ return logPromise ( run ( params ) , theme `Retrieving error codes` ) ;
5251} ;
0 commit comments