node/deps/npm/lib/utils/ping.js
npm CLI robot 1e595994eb
deps: upgrade npm to 11.11.1
PR-URL: https://github.com/nodejs/node/pull/62216
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-03-16 21:59:47 +00:00

6 lines
265 B
JavaScript

// ping the npm registry used by the ping and doctor commands
const npmFetch = require('npm-registry-fetch')
module.exports = async (flatOptions) => {
const res = await npmFetch('/-/ping', { ...flatOptions, cache: false })
return res.json().catch(() => ({}))
}