Skip to content

Commit f76066a

Browse files
committedSep 8, 2023
deps: @npmcli/agent@2.1.1
1 parent 42bef2c commit f76066a

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed
 

‎node_modules/@npmcli/agent/lib/agents.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const tls = require('tls')
77
const { once } = require('events')
88
const { createTimeout, abortRace, urlify, appendPort, cacheAgent } = require('./util')
99
const { normalizeOptions, cacheOptions } = require('./options')
10-
const { getProxy, getProxyType, isSecureProxy, proxyCache } = require('./proxy.js')
10+
const { getProxy, getProxyType, proxyCache } = require('./proxy.js')
1111
const Errors = require('./errors.js')
1212

1313
const createAgent = (base, name) => {
@@ -43,18 +43,16 @@ const createAgent = (base, name) => {
4343
return
4444
}
4545

46-
const secure = isSecureProxy(proxy)
47-
4846
return cacheAgent({
4947
key: cacheOptions({
5048
...options,
5149
...this.#options,
52-
secure,
50+
secure: SECURE,
5351
timeouts: this.#timeouts,
5452
proxy,
5553
}),
5654
cache: proxyCache,
57-
secure,
55+
secure: SECURE,
5856
proxies: this.#proxy.proxies,
5957
}, proxy, this.#options)
6058
}

‎node_modules/@npmcli/agent/lib/proxy.js

-8
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ const PROXY_ENV = (() => {
2222
})()
2323

2424
const SOCKS_PROTOCOLS = new Set(SocksProxyAgent.protocols)
25-
const SECURE_PROTOCOLS = new Set([...SocksProxyAgent.protocols, 'https'])
26-
27-
const isSecureProxy = (url) => {
28-
url = urlify(url)
29-
const protocol = url.protocol.slice(0, -1)
30-
return SECURE_PROTOCOLS.has(protocol)
31-
}
3225

3326
const getProxyType = (url) => {
3427
url = urlify(url)
@@ -91,6 +84,5 @@ const getProxy = (url, {
9184
module.exports = {
9285
getProxyType,
9386
getProxy,
94-
isSecureProxy,
9587
proxyCache: PROXY_CACHE,
9688
}

‎node_modules/@npmcli/agent/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/agent",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "the http/https agent used by the npm cli",
55
"main": "lib/index.js",
66
"scripts": {
@@ -35,7 +35,8 @@
3535
"16.x",
3636
"18.0.0",
3737
"18.x"
38-
]
38+
],
39+
"npmSpec": "next-9"
3940
},
4041
"dependencies": {
4142
"http-proxy-agent": "^7.0.0",

‎package-lock.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2855,9 +2855,9 @@
28552855
}
28562856
},
28572857
"node_modules/@npmcli/agent": {
2858-
"version": "2.1.0",
2859-
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.1.0.tgz",
2860-
"integrity": "sha512-/HFJP3a/DzgIg+6TWVee3bQmnBcWeKKYE9DKQqS8SWpAV8oYDTn/zkDM8iQ7bWI6kDDgNfHOlEFZZpN/UXMwig==",
2858+
"version": "2.1.1",
2859+
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.1.1.tgz",
2860+
"integrity": "sha512-6RlbiOAi6L6uUYF4/CDEkDZQnKw0XDsFJVrEpnib8rAx2WRMOsUyAdgnvDpX/fdkDWxtqE+NHwF465llI2wR0g==",
28612861
"inBundle": true,
28622862
"dependencies": {
28632863
"http-proxy-agent": "^7.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.