Skip to content

Commit

Permalink
improve messages related to new files and dependencies (#702)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
slhck and sindresorhus authored Jun 20, 2023
1 parent 0a7abf4 commit ad7b09e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ const checkNewFilesAndDependencies = async (pkg, rootDir) => {

const messages = [];
if (newFiles.unpublished.length > 0) {
messages.push(`The following new files will not be part of your published package:\n${util.joinList(newFiles.unpublished)}`);
messages.push(`The following new files will not be part of your published package:\n${util.joinList(newFiles.unpublished)}\n\nIf you intended to publish them, add them to the \`files\` field in package.json.`);
}

if (newFiles.firstTime.length > 0) {
messages.push(`The following new files will be published for the first time:\n${util.joinList(newFiles.firstTime)}`);
messages.push(`The following new files will be published for the first time:\n${util.joinList(newFiles.firstTime)}\n\nPlease make sure only the intended files are listed.`);
}

if (newDependencies.length > 0) {
messages.push(`The following new dependencies will be part of your published package:\n${util.joinList(newDependencies)}`);
messages.push(`The following new dependencies will be part of your published package:\n${util.joinList(newDependencies)}\n\nPlease make sure these new dependencies are intentional.`);
}

if (!isInteractive()) {
Expand Down

0 comments on commit ad7b09e

Please sign in to comment.