What / Why
The maxsockets configuration have changed from 50 -> 'Infitinity' during the refactoring of the config defaults in #2878
This change reverts to the behavior before this option was added, where npm tries to fetch all dependencies in parallell, potentially opening 1000+ connections, which causes all sorts of problems for users network environments (firewalls, proxies etc.).
When
The regression happend in #2878 and was released in v7.7.0
I can't find any discussion as to why this default should be changed, so I conclude that is clearly a regression.
Where
How
Current Behavior
as of v7.7.0 the default is 'Infinity'
define('maxsockets', {
default: Infinity,
type: Number,
description: `
The maximum number of connections to use per origin (protocol/host/port
combination).
`,
flatten (key, obj, flatOptions) {
flatOptions.maxSockets = obj[key]
},
})
https://github.com/npm/cli/blob/latest/lib/utils/config/definitions.js#L1156
Steps to Reproduce
Expected Behavior
The old, pre v7.7.0 default:
https://github.com/npm/cli/pull/2878/files#diff-f3564a1ffcb1f2144f5fac275184e907dd8310250b6e83becfb45b70ae75be43L130
Who
@isaacs (merged @2878)
References
What / Why
The
maxsocketsconfiguration have changed from 50 -> 'Infitinity' during the refactoring of the config defaults in #2878This change reverts to the behavior before this option was added, where npm tries to fetch all dependencies in parallell, potentially opening 1000+ connections, which causes all sorts of problems for users network environments (firewalls, proxies etc.).
When
The regression happend in #2878 and was released in v7.7.0
I can't find any discussion as to why this default should be changed, so I conclude that is clearly a regression.
Where
How
Current Behavior
as of v7.7.0 the default is 'Infinity'
https://github.com/npm/cli/blob/latest/lib/utils/config/definitions.js#L1156
Steps to Reproduce
Expected Behavior
The old, pre v7.7.0 default:
https://github.com/npm/cli/pull/2878/files#diff-f3564a1ffcb1f2144f5fac275184e907dd8310250b6e83becfb45b70ae75be43L130
Who
@isaacs (merged @2878)
References