mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 21:11:55 -04:00
Replace node-fetch with native undici for HTTP requests throughout pnpm. Key changes: - Replace node-fetch with undici's fetch() and dispatcher system - Replace @pnpm/network.agent with a new dispatcher module in @pnpm/network.fetch - Cache dispatchers via LRU cache keyed by connection parameters - Handle proxies via undici ProxyAgent instead of http/https-proxy-agent - Convert test mocking from nock to undici MockAgent where applicable - Add minimatch@9 override to fix ESM incompatibility with brace-expansion
7 lines
197 B
JavaScript
7 lines
197 B
JavaScript
module.exports = jest.createMockFromModule('@pnpm/network.fetch')
|
|
|
|
// default implementation
|
|
module.exports.fetchWithDispatcher.mockImplementation(async (_url, _opts) => {
|
|
return { ok: true }
|
|
})
|