Skip to content

Commit

Permalink
Merge pull request #9 from qiwi/pr
Browse files Browse the repository at this point in the history
Update execa to be compatible with sem-rel upper than 15.13.27
  • Loading branch information
dhoulb authored Nov 4, 2019
2 parents 1e3ece5 + aa24f1b commit dc85293
Show file tree
Hide file tree
Showing 8 changed files with 1,665 additions and 1,512 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"valid-jsdoc": 2,
"global-require": 0,
"no-console": 0,
"no-unused-vars": 0
"no-unused-vars": 0,
"require-atomic-updates": 0,
"no-prototype-builtins": 0
}
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/coverage/
/coverage/
*.log
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

// Execa hook.
if (require("yargs").argv.execasync) {
if (process.argv.includes("--execasync")) {
require("../lib/execaHook").hook();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/execaHook.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// NOTE this workaround forces execa calls to be always sync
// Discussion: https://github.com/semantic-release/semantic-release/issues/193#issuecomment-462063871

const execa = require("execa");
const ritm = require("require-in-the-middle");
const execa = require("execa");

let interceptor;

Expand Down
4 changes: 2 additions & 2 deletions lib/getCommitsFiltered.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { relative } = require("path");
const { relative, resolve } = require("path");
const { check, ValueError } = require("./blork");
const gitLogParser = require("git-log-parser");
const getStream = require("get-stream");
Expand Down Expand Up @@ -30,7 +30,7 @@ async function getCommitsFiltered(cwd, dir, lastHead = undefined) {
if (dir === cwd) throw new ValueError("dir: Must not be equal to cwd", dir);

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

// Add correct fields to gitLogParser.
Object.assign(gitLogParser.fields, {
Expand Down
37 changes: 18 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,27 @@
},
"dependencies": {
"bash-glob": "^2.0.0",
"blork": "^9.1.1",
"cosmiconfig": "^5.1.0",
"execa": "^1.0.0",
"get-stream": "^4.1.0",
"blork": "^9.2.1",
"cosmiconfig": "^5.2.1",
"execa": "^3.2.0",
"get-stream": "^5.1.0",
"git-log-parser": "^1.2.0",
"require-in-the-middle": "^4.0.0",
"semantic-release": "^15.12.4",
"semver": "^5.6.0",
"signale": "^1.2.0",
"require-in-the-middle": "^5.0.0",
"semantic-release": "^15.13.28",
"semver": "^6.3.0",
"signale": "^1.4.0",
"stream-buffers": "^3.0.2",
"tempy": "^0.2.1",
"yargs": "^13.2.2"
"tempy": "^0.3.0"
},
"devDependencies": {
"@commitlint/config-conventional": "^7.3.1",
"commitlint": "^7.2.1",
"eslint": "^5.10.0",
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-prettier": "^3.0.0",
"file-url": "^2.0.2",
"husky": "^1.2.0",
"jest": "^23.6.0",
"prettier": "^1.15.3"
"@commitlint/config-conventional": "^8.2.0",
"commitlint": "^8.2.0",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-prettier": "^3.1.1",
"file-url": "^3.0.0",
"husky": "^3.0.9",
"jest": "^24.9.0",
"prettier": "^1.18.2"
}
}
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.stdout("node", [filepath], { cwd });
const out = (await execa("node", [filepath], { cwd })).stdout;
expect(out).toMatch("Started multirelease! Loading 4 packages...");
expect(out).toMatch("Released 4 of 4 packages, semantically!");
});
Expand Down
Loading

0 comments on commit dc85293

Please sign in to comment.