Skip to content

Commit dc85293

Browse files
authored
Merge pull request #9 from qiwi/pr
Update execa to be compatible with sem-rel upper than 15.13.27
2 parents 1e3ece5 + aa24f1b commit dc85293

File tree

8 files changed

+1665
-1512
lines changed

8 files changed

+1665
-1512
lines changed

.eslintrc.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
"valid-jsdoc": 2,
3535
"global-require": 0,
3636
"no-console": 0,
37-
"no-unused-vars": 0
37+
"no-unused-vars": 0,
38+
"require-atomic-updates": 0,
39+
"no-prototype-builtins": 0
3840
}
39-
}
41+
}

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/node_modules/
2-
/coverage/
2+
/coverage/
3+
*.log

bin/cli.js

+1-1
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

+1-1
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

+2-2
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

+18-19
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,27 @@
3838
},
3939
"dependencies": {
4040
"bash-glob": "^2.0.0",
41-
"blork": "^9.1.1",
42-
"cosmiconfig": "^5.1.0",
43-
"execa": "^1.0.0",
44-
"get-stream": "^4.1.0",
41+
"blork": "^9.2.1",
42+
"cosmiconfig": "^5.2.1",
43+
"execa": "^3.2.0",
44+
"get-stream": "^5.1.0",
4545
"git-log-parser": "^1.2.0",
46-
"require-in-the-middle": "^4.0.0",
47-
"semantic-release": "^15.12.4",
48-
"semver": "^5.6.0",
49-
"signale": "^1.2.0",
46+
"require-in-the-middle": "^5.0.0",
47+
"semantic-release": "^15.13.28",
48+
"semver": "^6.3.0",
49+
"signale": "^1.4.0",
5050
"stream-buffers": "^3.0.2",
51-
"tempy": "^0.2.1",
52-
"yargs": "^13.2.2"
51+
"tempy": "^0.3.0"
5352
},
5453
"devDependencies": {
55-
"@commitlint/config-conventional": "^7.3.1",
56-
"commitlint": "^7.2.1",
57-
"eslint": "^5.10.0",
58-
"eslint-config-prettier": "^3.3.0",
59-
"eslint-plugin-prettier": "^3.0.0",
60-
"file-url": "^2.0.2",
61-
"husky": "^1.2.0",
62-
"jest": "^23.6.0",
63-
"prettier": "^1.15.3"
54+
"@commitlint/config-conventional": "^8.2.0",
55+
"commitlint": "^8.2.0",
56+
"eslint": "^6.6.0",
57+
"eslint-config-prettier": "^6.5.0",
58+
"eslint-plugin-prettier": "^3.1.1",
59+
"file-url": "^3.0.0",
60+
"husky": "^3.0.9",
61+
"jest": "^24.9.0",
62+
"prettier": "^1.18.2"
6463
}
6564
}

test/bin/cli.test.js

+1-1
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)