Skip to content

Commit 069bb4e

Browse files
committed
fix(package): update execa to be compatible with sem-rel 15.13.28
closes #7
1 parent 1e3ece5 commit 069bb4e

File tree

7 files changed

+109
-87
lines changed

7 files changed

+109
-87
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/node_modules/
2-
/coverage/
2+
/coverage/
3+
*.log

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

33
// Execa hook.
4-
if (require("yargs").argv.execasync) {
4+
if (process.argv.includes("--execasync")) {
55
require("../lib/execaHook").hook();
66
}
77

lib/execaHook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// NOTE this workaround forces execa calls to be always sync
22
// Discussion: https://github.com/semantic-release/semantic-release/issues/193#issuecomment-462063871
33

4-
const execa = require("execa");
54
const ritm = require("require-in-the-middle");
5+
const execa = require("execa");
66

77
let interceptor;
88

lib/getCommitsFiltered.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { relative } = require("path");
1+
const { relative, resolve } = require("path");
22
const { check, ValueError } = require("./blork");
33
const gitLogParser = require("git-log-parser");
44
const getStream = require("get-stream");
@@ -30,7 +30,7 @@ async function getCommitsFiltered(cwd, dir, lastHead = undefined) {
3030
if (dir === cwd) throw new ValueError("dir: Must not be equal to cwd", dir);
3131

3232
// Get top-level Git directory as it might be higher up the tree than cwd.
33-
const root = await execa.stdout("git", ["rev-parse", "--show-toplevel"], { cwd });
33+
const root = (await execa("git", ["rev-parse", "--show-toplevel"], { cwd })).stdout;
3434

3535
// Add correct fields to gitLogParser.
3636
Object.assign(gitLogParser.fields, {

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,15 @@
4040
"bash-glob": "^2.0.0",
4141
"blork": "^9.1.1",
4242
"cosmiconfig": "^5.1.0",
43-
"execa": "^1.0.0",
43+
"execa": "^3.2.0",
4444
"get-stream": "^4.1.0",
4545
"git-log-parser": "^1.2.0",
4646
"require-in-the-middle": "^4.0.0",
4747
"semantic-release": "^15.12.4",
4848
"semver": "^5.6.0",
4949
"signale": "^1.2.0",
5050
"stream-buffers": "^3.0.2",
51-
"tempy": "^0.2.1",
52-
"yargs": "^13.2.2"
51+
"tempy": "^0.2.1"
5352
},
5453
"devDependencies": {
5554
"@commitlint/config-conventional": "^7.3.1",

test/bin/cli.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("multi-semantic-release CLI", () => {
2525
const filepath = `${__dirname}/../../bin/cli.js`;
2626

2727
// Run via command line.
28-
const out = await execa.stdout("node", [filepath], { cwd });
28+
const out = (await execa("node", [filepath], { cwd })).stdout;
2929
expect(out).toMatch("Started multirelease! Loading 4 packages...");
3030
expect(out).toMatch("Released 4 of 4 packages, semantically!");
3131
});

0 commit comments

Comments
 (0)