Skip to content

Commit 27e1db7

Browse files
committed
f
1 parent e0dd215 commit 27e1db7

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/core/fetch_factory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ let FetchFactory;
55
let safeFetch;
66
let ssrfFetchFactory;
77

8-
if (mainNodejsVersion >= 18) {
9-
// urllib@4 only works on Node.js >= 18
8+
if (mainNodejsVersion >= 20) {
9+
// urllib@4 only works on Node.js >= 20
1010
try {
1111
const urllib4 = require('urllib4');
1212
FetchFactory = urllib4.FetchFactory;

lib/core/httpclient_next.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const SSRF_HTTPCLIENT = Symbol('SSRF_HTTPCLIENT');
55

66
const mainNodejsVersion = parseInt(process.versions.node.split('.')[0]);
77
let HttpClient;
8-
if (mainNodejsVersion >= 18) {
8+
if (mainNodejsVersion >= 20) {
99
// urllib@4 only works on Node.js >= 18
1010
try {
1111
HttpClient = require('urllib4').HttpClient;

test/lib/core/httpclient.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ describe('test/lib/core/httpclient.test.js', () => {
380380

381381
it('should request http2 success', async () => {
382382
for (let i = 0; i < 10; i++) {
383-
const result = await app.httpclient.curl('https://registry.npmmirror.com', {
383+
const result = await app.httpclient.curl('https://r.cnpmjs.org', {
384384
dataType: 'json',
385385
timeout: 5000,
386386
});

0 commit comments

Comments
 (0)