Skip to content

Commit cf596cb

Browse files
committed
fix: pass stderr and stdout into semantic's getConfig (bug in npm)
1 parent 57e48d5 commit cf596cb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/getConfigSemantic.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ const { Signale } = require("signale");
1212
*
1313
* @internal
1414
*/
15-
async function getConfigSemantic({ cwd, env, logger }, options) {
15+
async function getConfigSemantic({ cwd, env, stdout, stderr, logger }, options) {
1616
try {
1717
// Blackhole logger (so we don't clutter output with "loaded plugin" messages).
1818
const blackhole = new Signale({ stream: new WritableStreamBuffer() });
1919

2020
// Return semantic-release's getConfig script.
21-
return await semanticGetConfig({ cwd, env, logger: blackhole }, options);
21+
return await semanticGetConfig({ cwd, env, stdout, stderr, logger: blackhole }, options);
2222
} catch (error) {
2323
// Log error and rethrow it.
2424
// istanbul ignore next (not important)

lib/multiSemanticRelease.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ module.exports = multiSemanticRelease;
9292
*
9393
* @internal
9494
*/
95-
async function getPackage(path, { options: globalOptions, env, cwd }) {
95+
async function getPackage(path, { options: globalOptions, env, cwd, stdout, stderr }) {
9696
// Make path absolute.
9797
path = cleanPath(path, cwd);
9898
const dir = dirname(path);
@@ -120,7 +120,7 @@ async function getPackage(path, { options: globalOptions, env, cwd }) {
120120

121121
// 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.
122122
// 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.
123-
const { options, plugins } = await getConfigSemantic({ cwd: dir, env, logger }, finalOptions);
123+
const { options, plugins } = await getConfigSemantic({ cwd: dir, env, stdout, stderr, logger }, finalOptions);
124124

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

0 commit comments

Comments
 (0)