Files
node/deps/npm/lib/utils/ping.js
T
npm CLI robot f703652e84 deps: upgrade npm to 10.9.0
PR-URL: https://github.com/nodejs/node/pull/55255
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-10-09 22:57:06 +02:00

8 lines
262 B
JavaScript

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