Skip to content

Commit 0dd0341

Browse files
aluneedwraithgar
authored andcommitted
fix(ping): make "npm ping" echo a right time
There is no need to make the time divided by 1000 because of the time unit 'ms'. Currently a typical command and response: PS C:\projects> npm ping npm notice PING http://registry.npmjs.org/ npm notice PONG 0.752ms PR-URL: #3474 Credit: @aluneed Close: #3474 Reviewed-by: @wraithgar
1 parent 013f026 commit 0dd0341

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ping.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Ping extends BaseCommand {
2727
const start = Date.now()
2828
const details = await pingUtil(this.npm.flatOptions)
2929
const time = Date.now() - start
30-
log.notice('PONG', `${time / 1000}ms`)
30+
log.notice('PONG', `${time}ms`)
3131
if (this.npm.config.get('json')) {
3232
this.npm.output(JSON.stringify({
3333
registry: this.npm.config.get('registry'),

0 commit comments

Comments
 (0)