File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class Owner extends BaseCommand {
120120 this . npm . output ( maintainers . map ( m => `${ m . name } <${ m . email } >` ) . join ( '\n' ) )
121121 }
122122 } catch ( err ) {
123- log . error ( 'owner ls' , "Couldn't get owner data" , pkg )
123+ log . error ( 'owner ls' , "Couldn't get owner data" , npmFetch . cleanUrl ( pkg ) )
124124 throw err
125125 }
126126 }
Original file line number Diff line number Diff line change 1+ const { cleanUrl } = require ( 'npm-registry-fetch' )
12const log = require ( '../utils/log-shim' )
23const pingUtil = require ( '../utils/ping.js' )
34const BaseCommand = require ( '../base-command.js' )
@@ -8,14 +9,15 @@ class Ping extends BaseCommand {
89 static name = 'ping'
910
1011 async exec ( args ) {
11- log . notice ( 'PING' , this . npm . config . get ( 'registry' ) )
12+ const cleanRegistry = cleanUrl ( this . npm . config . get ( 'registry' ) )
13+ log . notice ( 'PING' , cleanRegistry )
1214 const start = Date . now ( )
1315 const details = await pingUtil ( { ...this . npm . flatOptions } )
1416 const time = Date . now ( ) - start
1517 log . notice ( 'PONG' , `${ time } ms` )
1618 if ( this . npm . config . get ( 'json' ) ) {
1719 this . npm . output ( JSON . stringify ( {
18- registry : this . npm . config . get ( 'registry' ) ,
20+ registry : cleanRegistry ,
1921 time,
2022 details,
2123 } , null , 2 ) )
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const { readdirScoped } = require('@npmcli/fs')
1212const { lstat, readlink } = require ( 'fs/promises' )
1313const { depth } = require ( 'treeverse' )
1414const log = require ( 'proc-log' )
15+ const { cleanUrl } = require ( 'npm-registry-fetch' )
1516
1617const {
1718 OK ,
@@ -1210,7 +1211,8 @@ This is a one-time fix-up, please be patient...
12101211 if ( this [ _manifests ] . has ( spec . raw ) ) {
12111212 return this [ _manifests ] . get ( spec . raw )
12121213 } else {
1213- log . silly ( 'fetch manifest' , spec . raw )
1214+ const cleanRawSpec = cleanUrl ( spec . rawSpec )
1215+ log . silly ( 'fetch manifest' , spec . raw . replace ( spec . rawSpec , cleanRawSpec ) )
12141216 const p = pacote . manifest ( spec , options )
12151217 . then ( mani => {
12161218 this [ _manifests ] . set ( spec . raw , mani )
Original file line number Diff line number Diff line change 99
1010const localeCompare = require ( '@isaacs/string-locale-compare' ) ( 'en' )
1111const log = require ( 'proc-log' )
12+ const { cleanUrl } = require ( 'npm-registry-fetch' )
1213const deepestNestingTarget = require ( './deepest-nesting-target.js' )
1314const CanPlaceDep = require ( './can-place-dep.js' )
1415const {
@@ -187,7 +188,7 @@ class PlaceDep {
187188 `${ this . dep . name } @${ this . dep . version } ` ,
188189 this . canPlace . description ,
189190 `for: ${ this . edge . from . package . _id || this . edge . from . location } ` ,
190- `want: ${ this . edge . spec || '*' } `
191+ `want: ${ cleanUrl ( this . edge . spec || '*' ) } `
191192 )
192193
193194 const placementType = this . canPlace . canPlace === CONFLICT
You can’t perform that action at this time.
0 commit comments