Update dependency prettier to version 1.3.0 (#198)

* Update dependency prettier to version 1.3.0

* Run eslint-fix
This commit is contained in:
Renovate Bot 2017-05-03 06:42:24 +02:00 committed by Rhys Arkins
parent 2747b1e172
commit c56c6d9bbe
9 changed files with 22 additions and 47 deletions

View file

@ -31,8 +31,6 @@ options.forEach(option => {
if (cliName.length) {
cliName = `\`${cliName}\``;
}
console.log(
`| \`${option.name}\` | ${option.description} | ${option.type} | ${optionDefault} | ${envName} | ${cliName} |`
);
console.log(`| \`${option.name}\` | ${option.description} | ${option.type} | ${optionDefault} | ${envName} | ${cliName} |`);
});
/* eslint-enable no-console */

View file

@ -88,9 +88,7 @@ async function initRepo(repoName, token, endpoint) {
// Returns an array of file paths in current repo matching the fileName
async function findFilePaths(fileName) {
const res = await ghGot(
`search/code?q=repo:${config.repoName}+filename:${fileName}`
);
const res = await ghGot(`search/code?q=repo:${config.repoName}+filename:${fileName}`);
const exactMatches = res.body.items.filter(item => item.name === fileName);
// GitHub seems to return files in the root with a leading `/`
@ -104,9 +102,7 @@ async function findFilePaths(fileName) {
async function branchExists(branchName) {
logger.debug(`Checking if branch exists: ${branchName}`);
try {
const res = await ghGot(
`repos/${config.repoName}/git/refs/heads/${branchName}`
);
const res = await ghGot(`repos/${config.repoName}/git/refs/heads/${branchName}`);
if (res.statusCode === 200) {
logger.debug(JSON.stringify(res.body));
if (Array.isArray(res.body)) {
@ -257,9 +253,8 @@ async function getPr(prNo) {
} else {
// Check if only one author of all commits
logger.debug('Checking all commits');
const prCommits = (await ghGot(
`repos/${config.repoName}/pulls/${prNo}/commits`
)).body;
const prCommits = (await ghGot(`repos/${config.repoName}/pulls/${prNo}/commits`))
.body;
const authors = prCommits.reduce((arr, commit) => {
const author = commit.author.login;
if (arr.indexOf(author) === -1) {
@ -298,9 +293,7 @@ async function mergePr(pr) {
// Generic File operations
async function getFile(filePath, branchName = config.defaultBranch) {
const res = await ghGot(
`repos/${config.repoName}/contents/${filePath}?ref=${branchName}`
);
const res = await ghGot(`repos/${config.repoName}/contents/${filePath}?ref=${branchName}`);
return res.body.content;
}
@ -329,9 +322,7 @@ async function commitFilesToBranch(
message,
parentBranch = config.defaultBranch
) {
logger.debug(
`commitFilesToBranch('${branchName}', files, message, '${parentBranch})'`
);
logger.debug(`commitFilesToBranch('${branchName}', files, message, '${parentBranch})'`);
const parentCommit = await getBranchCommit(parentBranch);
const parentTree = await getCommitTree(parentCommit);
const fileBlobs = [];

View file

@ -275,9 +275,7 @@ async function mergePr(pr) {
// Generic File operations
async function getFile(filePath, branchName = config.defaultBranch) {
const res = await glGot(
`projects/${config.repoName}/repository/files?file_path=${filePath}&ref=${branchName}`
);
const res = await glGot(`projects/${config.repoName}/repository/files?file_path=${filePath}&ref=${branchName}`);
return res.body.content;
}
@ -340,9 +338,7 @@ async function commitFilesToBranch(
message,
parentBranch = config.defaultBranch
) {
logger.debug(
`commitFilesToBranch('${branchName}', files, message, '${parentBranch})'`
);
logger.debug(`commitFilesToBranch('${branchName}', files, message, '${parentBranch})'`);
if (branchName !== parentBranch) {
const isBranchExisting = await branchExists(branchName);
if (isBranchExisting) {

View file

@ -39,9 +39,7 @@ async function processRepo(repo) {
} else if (config.platform === 'gitlab') {
api = gitlabApi;
} else {
logger.error(
`Unknown platform ${config.platform} for repository ${repo.repository}`
);
logger.error(`Unknown platform ${config.platform} for repository ${repo.repository}`);
return;
}
logger.debug(`Processing repository: ${stringify(config)}`);

View file

@ -29,9 +29,7 @@ async function processPackageFile(repoName, packageFile, packageConfig) {
const packageContent = await config.api.getFileJson(packageFile);
// Check for renovate config inside the package.json
if (packageContent.renovate) {
logger.debug(
`package.json>renovate config: ${stringify(packageContent.renovate)}`
);
logger.debug(`package.json>renovate config: ${stringify(packageContent.renovate)}`);
Object.assign(config, packageContent.renovate, { repoConfigured: true });
}
// Now check if config is disabled
@ -212,9 +210,7 @@ async function updateBranch(upgrades) {
!upgrade0.recreateClosed &&
(await upgrade0.api.checkForClosedPr(branchName, prTitle))
) {
logger.verbose(
`Skipping ${branchName} upgrade as matching closed PR already existed`
);
logger.verbose(`Skipping ${branchName} upgrade as matching closed PR already existed`);
return;
}
const branchCreated = await branchWorker.ensureBranch(upgrades);

View file

@ -97,9 +97,7 @@ async function ensureBranch(upgrades) {
}
}
if (Object.keys(packageFiles).length > 0) {
logger.debug(
`${Object.keys(packageFiles).length} package file(s) need updating.`
);
logger.debug(`${Object.keys(packageFiles).length} package file(s) need updating.`);
for (const packageFile of Object.keys(packageFiles)) {
logger.debug(`Adding ${packageFile}`);
commitFiles.push({

View file

@ -72,9 +72,7 @@ async function ensurePr(upgradeConfig) {
await config.api.addReviewers(pr.number, config.reviewers);
}
} else {
logger.debug(
`Skipping assignees and reviewers as automerge=${config.automerge}`
);
logger.debug(`Skipping assignees and reviewers as automerge=${config.automerge}`);
}
logger.info(`Created ${pr.displayNumber}`);
return pr;

View file

@ -69,7 +69,7 @@
"eslint-plugin-promise": "3.5.0",
"mkdirp": "0.5.1",
"np": "2.14.1",
"prettier": "1.2.2",
"prettier": "1.3.0",
"rimraf": "2.6.1"
},
"babel": {

View file

@ -1290,9 +1290,9 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"
flow-parser@0.43.0:
version "0.43.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.43.0.tgz#e2b8eb1ac83dd53f7b6b04a7c35b6a52c33479b7"
flow-parser@0.45.0:
version "0.45.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.45.0.tgz#aa29d4ae27f06aa02817772bba0fcbefef7e62f0"
for-in@^1.0.1:
version "1.0.2"
@ -2780,16 +2780,16 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.2.2.tgz#22d17c1132faaaea1f1d4faea31f19f7a1959f3e"
prettier@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.3.0.tgz#cb02314f1ae2a99e951c17acb77a4096a1060ac2"
dependencies:
ast-types "0.9.8"
babel-code-frame "6.22.0"
babylon "7.0.0-beta.8"
chalk "1.1.3"
esutils "2.0.2"
flow-parser "0.43.0"
flow-parser "0.45.0"
get-stdin "5.0.1"
glob "7.1.1"
jest-validate "19.0.0"