Skip to content

Commit

Permalink
fix: pass stderr and stdout into semantic's getConfig (bug in npm)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoulb committed Jan 16, 2019
1 parent 57e48d5 commit cf596cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/getConfigSemantic.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ const { Signale } = require("signale");
*
* @internal
*/
async function getConfigSemantic({ cwd, env, logger }, options) {
async function getConfigSemantic({ cwd, env, stdout, stderr, logger }, options) {
try {
// Blackhole logger (so we don't clutter output with "loaded plugin" messages).
const blackhole = new Signale({ stream: new WritableStreamBuffer() });

// Return semantic-release's getConfig script.
return await semanticGetConfig({ cwd, env, logger: blackhole }, options);
return await semanticGetConfig({ cwd, env, stdout, stderr, logger: blackhole }, options);
} catch (error) {
// Log error and rethrow it.
// istanbul ignore next (not important)
Expand Down
4 changes: 2 additions & 2 deletions lib/multiSemanticRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module.exports = multiSemanticRelease;
*
* @internal
*/
async function getPackage(path, { options: globalOptions, env, cwd }) {
async function getPackage(path, { options: globalOptions, env, cwd, stdout, stderr }) {
// Make path absolute.
path = cleanPath(path, cwd);
const dir = dirname(path);
Expand Down Expand Up @@ -120,7 +120,7 @@ async function getPackage(path, { options: globalOptions, env, cwd }) {

// Use semantic-release's internal config with the final options (now we have the right `options.plugins` setting) to get the plugins object and the options including defaults.
// We need this so we can call e.g. plugins.analyzeCommit() to be able to affect the input and output of the whole set of plugins.
const { options, plugins } = await getConfigSemantic({ cwd: dir, env, logger }, finalOptions);
const { options, plugins } = await getConfigSemantic({ cwd: dir, env, stdout, stderr, logger }, finalOptions);

// Return package object.
return { path, dir, name, manifest, deps, options, plugins };
Expand Down

0 comments on commit cf596cb

Please sign in to comment.