Skip to content

Commit 8ba1f03

Browse files
author
Brian Vaughn
committed
Prettier
1 parent 4bb3548 commit 8ba1f03

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

scripts/release/publish-commands/download-error-codes-from-ci.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
const http = require('request-promise-json');
66
const {exec} = require('child-process-promise');
7-
const {readdirSync} = require('fs');
87
const {readJsonSync} = require('fs-extra');
98
const {logPromise} = require('../utils');
109
const 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
};

scripts/release/publish-commands/print-follow-up-instructions.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@ const run = async ({cwd, packages, tags}) => {
4949
);
5050
console.log(theme.command` git push origin --tags`);
5151

52-
5352
if (tags.includes('latest')) {
5453
console.log();
5554
console.log(
5655
theme`{header Don't forget to commit the generated }{path scripts/error-codes/codes.json}`
5756
);
58-
if (environment === "ci") {
59-
console.log(`This file has been updated locally. Please review it before committing.`);
57+
if (environment === 'ci') {
58+
console.log(
59+
`This file has been updated locally. Please review it before committing.`
60+
);
6061
} else {
6162
console.log(
6263
`The release that was just published was created locally. ` +

0 commit comments

Comments
 (0)