From 5344820fc65da081d17f7fd2adb50ffe7101905b Mon Sep 17 00:00:00 2001 From: Daniel Stockman Date: Tue, 12 Nov 2019 09:08:34 -0800 Subject: [PATCH] fix: Auto-fix prettier formatting --- commands/__mocks__/@lerna/prompt.js | 13 ++++++++++--- commands/bootstrap/index.js | 5 ++++- commands/changed/index.js | 5 ++++- commands/publish/command.js | 5 ++++- .../__tests__/version-create-release.test.js | 5 ++++- core/package-graph/index.js | 5 ++++- core/prompt/index.js | 5 ++++- utils/npm-dist-tag/__tests__/npm-dist-tag.test.js | 5 ++++- 8 files changed, 38 insertions(+), 10 deletions(-) diff --git a/commands/__mocks__/@lerna/prompt.js b/commands/__mocks__/@lerna/prompt.js index 9997dc95c2..ea99c7db0f 100644 --- a/commands/__mocks__/@lerna/prompt.js +++ b/commands/__mocks__/@lerna/prompt.js @@ -20,9 +20,16 @@ exports.select = mockSelect; exports.input = mockInput; const semverIndex = new Map( - ["patch", "minor", "major", "prepatch", "preminor", "premajor", "PRERELEASE", "CUSTOM"].map( - (keyword, idx) => [keyword, idx] - ) + [ + "patch", + "minor", + "major", + "prepatch", + "preminor", + "premajor", + "PRERELEASE", + "CUSTOM", + ].map((keyword, idx) => [keyword, idx]) ); exports.mockChoices = (...keywords) => { diff --git a/commands/bootstrap/index.js b/commands/bootstrap/index.js index cb578d9c2a..0f35cba117 100644 --- a/commands/bootstrap/index.js +++ b/commands/bootstrap/index.js @@ -574,7 +574,10 @@ class BootstrapCommand extends Command { tracker.addWork(actions.length); } - return pFinally(pMap(actions, act => act(), { concurrency: this.concurrency }), () => tracker.finish()); + return pFinally( + pMap(actions, act => act(), { concurrency: this.concurrency }), + () => tracker.finish() + ); } /** diff --git a/commands/changed/index.js b/commands/changed/index.js index 89d860ff20..c4fa14d50a 100644 --- a/commands/changed/index.js +++ b/commands/changed/index.js @@ -34,7 +34,10 @@ class ChangedCommand extends Command { this.options ); - this.result = listable.format(updates.map(node => node.pkg), this.options); + this.result = listable.format( + updates.map(node => node.pkg), + this.options + ); if (this.result.count === 0) { this.logger.info("", "No changed packages found"); diff --git a/commands/publish/command.js b/commands/publish/command.js index 12b112aa30..0c522e602f 100644 --- a/commands/publish/command.js +++ b/commands/publish/command.js @@ -111,7 +111,10 @@ exports.builder = yargs => { const sharedKeys = ["preid", "y", "ignore-scripts"]; for (const sharedKey of sharedKeys) { - hiddenOptions.splice(hiddenOptions.findIndex(k => k === sharedKey), 1); + hiddenOptions.splice( + hiddenOptions.findIndex(k => k === sharedKey), + 1 + ); } yargs.group(Object.keys(opts).concat(sharedKeys), "Command Options:"); diff --git a/commands/version/__tests__/version-create-release.test.js b/commands/version/__tests__/version-create-release.test.js index c9e329564e..67ea66a240 100644 --- a/commands/version/__tests__/version-create-release.test.js +++ b/commands/version/__tests__/version-create-release.test.js @@ -20,7 +20,10 @@ const initFixture = require("@lerna-test/init-fixture")(__dirname); // test command const lernaVersion = require("@lerna-test/command-runner")(require("../command")); -describe.each([["github", githubClient], ["gitlab", gitlabClient]])("--create-release %s", (type, client) => { +describe.each([ + ["github", githubClient], + ["gitlab", gitlabClient], +])("--create-release %s", (type, client) => { it("does not create a release if --no-push is passed", async () => { const cwd = await initFixture("independent"); diff --git a/core/package-graph/index.js b/core/package-graph/index.js index deb58ff493..f860af4d2a 100644 --- a/core/package-graph/index.js +++ b/core/package-graph/index.js @@ -190,7 +190,10 @@ class PackageGraph extends Map { currentNode.localDependents.forEach(visits([currentName])); }); - reportCycles(Array.from(cyclePaths, cycle => cycle.join(" -> ")), rejectCycles); + reportCycles( + Array.from(cyclePaths, cycle => cycle.join(" -> ")), + rejectCycles + ); return [cyclePaths, cycleNodes]; } diff --git a/core/prompt/index.js b/core/prompt/index.js index 549d4a066c..05e4f03251 100644 --- a/core/prompt/index.js +++ b/core/prompt/index.js @@ -17,7 +17,10 @@ function confirm(message) { name: "confirm", message, default: 2, // default to help in order to avoid clicking straight through - choices: [{ key: "y", name: "Yes", value: true }, { key: "n", name: "No", value: false }], + choices: [ + { key: "y", name: "Yes", value: true }, + { key: "n", name: "No", value: false }, + ], }, ]) .then(answers => { diff --git a/utils/npm-dist-tag/__tests__/npm-dist-tag.test.js b/utils/npm-dist-tag/__tests__/npm-dist-tag.test.js index bf19502b03..e07791ed4e 100644 --- a/utils/npm-dist-tag/__tests__/npm-dist-tag.test.js +++ b/utils/npm-dist-tag/__tests__/npm-dist-tag.test.js @@ -16,7 +16,10 @@ const stubLog = { info: jest.fn(), warn: jest.fn(), }; -const baseOptions = new Map([["log", stubLog], ["tag", "latest"]]); +const baseOptions = new Map([ + ["log", stubLog], + ["tag", "latest"], +]); fetch.mockImplementation(() => Promise.resolve()); fetch.json.mockImplementation(() => Promise.resolve({}));