Skip to content

Commit f7e58fa

Browse files
wraithgarnlf
authored andcommitted
fix: remove "bug the author" message from package 404
1 parent f0c6e86 commit f7e58fa

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

lib/utils/error-message.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,7 @@ module.exports = (er, npm) => {
199199

200200
const valResult = nameValidator(pkg)
201201

202-
if (valResult.validForNewPackages) {
203-
detail.push([
204-
'404',
205-
'You should bug the author to publish it (or use the name yourself!)',
206-
])
207-
} else {
202+
if (!valResult.validForNewPackages) {
208203
detail.push(['404', 'This package name is not valid, because', ''])
209204

210205
const errorsArray = [...(valResult.errors || []), ...(valResult.warnings || [])]

tap-snapshots/test/lib/utils/error-message.js.test.cjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,6 @@ Object {
155155
"",
156156
"'yolo' is not in this registry.",
157157
],
158-
Array [
159-
"404",
160-
"You should bug the author to publish it (or use the name yourself!)",
161-
],
162158
Array [
163159
"404",
164160
String(

0 commit comments

Comments
 (0)