Skip to content

Commit

Permalink
fix: remove "bug the author" message from package 404
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar authored and nlf committed Mar 17, 2022
1 parent f0c6e86 commit f7e58fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
7 changes: 1 addition & 6 deletions lib/utils/error-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,7 @@ module.exports = (er, npm) => {

const valResult = nameValidator(pkg)

if (valResult.validForNewPackages) {
detail.push([
'404',
'You should bug the author to publish it (or use the name yourself!)',
])
} else {
if (!valResult.validForNewPackages) {
detail.push(['404', 'This package name is not valid, because', ''])

const errorsArray = [...(valResult.errors || []), ...(valResult.warnings || [])]
Expand Down
4 changes: 0 additions & 4 deletions tap-snapshots/test/lib/utils/error-message.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ Object {
"",
"'yolo' is not in this registry.",
],
Array [
"404",
"You should bug the author to publish it (or use the name yourself!)",
],
Array [
"404",
String(
Expand Down

0 comments on commit f7e58fa

Please sign in to comment.