Skip to content

Commit

Permalink
feat: enable sequentialPrepare flag by default
Browse files Browse the repository at this point in the history
BREAKING CHANGE: sequentialPrepare is set to true, to disable pass `--no-sequential-prepare` option
  • Loading branch information
antongolub committed Mar 4, 2022
1 parent 8a25c3a commit ad7e81f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const cli = meow(
},
sequentialPrepare: {
type: "boolean",
default: true,
},
firstParent: {
type: "boolean",
Expand Down Expand Up @@ -63,7 +64,16 @@ const cli = meow(

const processFlags = (flags) => {
return toPairs(flags).reduce((m, [k, v]) => {
if (k === "ignorePackages" && v) return set(m, k, v.split(","));
if (k === "ignorePackages" && v) {
return set(m, k, v.split(","));
}

// FIXME Smth wrong with negate parser.
if (flags[`no${k[0].toUpperCase()}${k.slice(1)}`]) {
flags[k] = false;
return set(m, k, false);
}

return set(m, k, v);
}, {});
};
Expand Down
2 changes: 1 addition & 1 deletion test/bin/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("multi-semantic-release CLI", () => {
const filepath = `${__dirname}/../../bin/cli.js`;

// Run via command line.
const out = (await execa("node", [filepath], { cwd })).stdout;
const out = (await execa("node", [filepath, "-- --no-sequential-prepare"], { cwd })).stdout;
expect(out).toMatch("Started multirelease! Loading 4 packages...");
expect(out).toMatch("Released 4 of 4 packages, semantically!");
});
Expand Down

0 comments on commit ad7e81f

Please sign in to comment.