From c56c6d9bbe9b63d5f409ac40b8e6a994488ce5c0 Mon Sep 17 00:00:00 2001
From: Renovate Bot <renovate-bot@redgc.com>
Date: Wed, 3 May 2017 06:42:24 +0200
Subject: [PATCH] Update dependency prettier to version 1.3.0 (#198)

* Update dependency prettier to version 1.3.0

* Run eslint-fix
---
 bin/update-configuration-table.js |  4 +---
 lib/api/github.js                 | 21 ++++++---------------
 lib/api/gitlab.js                 |  8 ++------
 lib/index.js                      |  4 +---
 lib/worker.js                     |  8 ++------
 lib/workers/branch.js             |  4 +---
 lib/workers/pr.js                 |  4 +---
 package.json                      |  2 +-
 yarn.lock                         | 14 +++++++-------
 9 files changed, 22 insertions(+), 47 deletions(-)

diff --git a/bin/update-configuration-table.js b/bin/update-configuration-table.js
index a1b342392a..a39f187333 100644
--- a/bin/update-configuration-table.js
+++ b/bin/update-configuration-table.js
@@ -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 */
diff --git a/lib/api/github.js b/lib/api/github.js
index abcdf7a4f8..8c4bb63032 100644
--- a/lib/api/github.js
+++ b/lib/api/github.js
@@ -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 = [];
diff --git a/lib/api/gitlab.js b/lib/api/gitlab.js
index 859f5f1fe8..48bf5a0bd8 100644
--- a/lib/api/gitlab.js
+++ b/lib/api/gitlab.js
@@ -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) {
diff --git a/lib/index.js b/lib/index.js
index 5bc1228e7a..b4892bb14e 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -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)}`);
diff --git a/lib/worker.js b/lib/worker.js
index 78bb6a5fd0..839d1ab939 100644
--- a/lib/worker.js
+++ b/lib/worker.js
@@ -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);
diff --git a/lib/workers/branch.js b/lib/workers/branch.js
index 509074048b..104cc63b1d 100644
--- a/lib/workers/branch.js
+++ b/lib/workers/branch.js
@@ -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({
diff --git a/lib/workers/pr.js b/lib/workers/pr.js
index b381106def..3f60f35faa 100644
--- a/lib/workers/pr.js
+++ b/lib/workers/pr.js
@@ -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;
diff --git a/package.json b/package.json
index f9a52df2d7..57de27ff7a 100644
--- a/package.json
+++ b/package.json
@@ -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": {
diff --git a/yarn.lock b/yarn.lock
index a2a351f509..549ccfee81 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -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"
-- 
GitLab