Skip to content

Commit

Permalink
fix: Auto-fix prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Nov 12, 2019
1 parent fea10aa commit 5344820
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 10 deletions.
13 changes: 10 additions & 3 deletions commands/__mocks__/@lerna/prompt.js
Expand Up @@ -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) => {
Expand Down
5 changes: 4 additions & 1 deletion commands/bootstrap/index.js
Expand Up @@ -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()
);
}

/**
Expand Down
5 changes: 4 additions & 1 deletion commands/changed/index.js
Expand Up @@ -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");
Expand Down
5 changes: 4 additions & 1 deletion commands/publish/command.js
Expand Up @@ -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:");
Expand Down
5 changes: 4 additions & 1 deletion commands/version/__tests__/version-create-release.test.js
Expand Up @@ -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");

Expand Down
5 changes: 4 additions & 1 deletion core/package-graph/index.js
Expand Up @@ -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];
}
Expand Down
5 changes: 4 additions & 1 deletion core/prompt/index.js
Expand Up @@ -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 => {
Expand Down
5 changes: 4 additions & 1 deletion utils/npm-dist-tag/__tests__/npm-dist-tag.test.js
Expand Up @@ -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({}));
Expand Down

0 comments on commit 5344820

Please sign in to comment.