Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ async function write (opts, pkg, { log } = {}) {
await fs.mkdirp(path.dirname(pkgPath));

// Write package json
log.info(`Writing package.json\n${pkgPath}`);
log.info(`Writing ${pkgPath}`);
await pkg.save();

// If we dont have workspaceRootPkg then we are
Expand All @@ -460,7 +460,7 @@ async function write (opts, pkg, { log } = {}) {
if (Array.from(ws.values()).includes(opts.cwd)) {
log.debug('Workspaces globs already match the new package path, no update necessary');
} else {
log.info('Adding new package to workspace root package.json');
log.info(`Adding ${workspaceRelativePath} to workspaces in package.json`);
const rootPkg = await load(opts.workspaceRoot);
rootPkg.update({
workspaces: [...(opts.workspaceRootPkg.workspaces || []), workspaceRelativePath]
Expand Down Expand Up @@ -495,7 +495,7 @@ async function write (opts, pkg, { log } = {}) {
workspace: workspaceRelativePath
});
if (out.stderr) {
log.error(out.stderr);
log.warning(out.stderr);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? I assume stderr should go be error normally.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was my initial reason for doing it like this, but in reality it turns out that output is largely unnecessary unless npm exits non-zero, most of what it outputs there is warning text. This will still be output to stderr IIRC, but it will be hidden by default unless you pass --verbose.

Not strongly opinionated on this, but in the place we are using this the output feels out of place.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool sounds good

}
log.debug(out.stdout);
}
Expand Down