Skip to content

Commit 98b1189

Browse files
committed
deps: @npmcli/agent@2.2.1
1 parent dafa903 commit 98b1189

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = class Agent extends AgentBase {
6262

6363
let ProxyAgent = this.#ProxyAgent
6464
if (Array.isArray(ProxyAgent)) {
65-
ProxyAgent = options.secureEndpoint ? ProxyAgent[1] : ProxyAgent[0]
65+
ProxyAgent = this.isSecureEndpoint(options) ? ProxyAgent[1] : ProxyAgent[0]
6666
}
6767

6868
const proxyAgent = new ProxyAgent(proxy, this.#options)
@@ -106,6 +106,7 @@ module.exports = class Agent extends AgentBase {
106106

107107
let socket
108108
let timeout = this.#timeouts.connection
109+
const isSecureEndpoint = this.isSecureEndpoint(options)
109110

110111
const proxy = this.#getProxy(options)
111112
if (proxy) {
@@ -124,7 +125,7 @@ module.exports = class Agent extends AgentBase {
124125
timeout = timeout - (Date.now() - start)
125126
}
126127
} else {
127-
socket = (options.secureEndpoint ? tls : net).connect(options)
128+
socket = (isSecureEndpoint ? tls : net).connect(options)
128129
}
129130

130131
socket.setKeepAlive(this.keepAlive, this.keepAliveMsecs)
@@ -133,8 +134,8 @@ module.exports = class Agent extends AgentBase {
133134
const abortController = new AbortController()
134135
const { signal } = abortController
135136

136-
const connectPromise = socket[options.secureEndpoint ? 'secureConnecting' : 'connecting']
137-
? once(socket, options.secureEndpoint ? 'secureConnect' : 'connect', { signal })
137+
const connectPromise = socket[isSecureEndpoint ? 'secureConnecting' : 'connecting']
138+
? once(socket, isSecureEndpoint ? 'secureConnect' : 'connect', { signal })
138139
: Promise.resolve()
139140

140141
await this.#timeoutConnection({

node_modules/@npmcli/agent/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@npmcli/agent",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "the http/https agent used by the npm cli",
55
"main": "lib/index.js",
66
"scripts": {
77
"gencerts": "bash scripts/create-cert.sh",
88
"test": "tap",
9-
"lint": "eslint \"**/*.js\"",
9+
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
1010
"postlint": "template-oss-check",
1111
"template-oss-apply": "template-oss-apply --force",
1212
"lintfix": "npm run lint -- --fix",
@@ -28,7 +28,7 @@
2828
},
2929
"templateOSS": {
3030
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
31-
"version": "4.19.0",
31+
"version": "4.21.3",
3232
"publish": "true"
3333
},
3434
"dependencies": {
@@ -40,7 +40,7 @@
4040
},
4141
"devDependencies": {
4242
"@npmcli/eslint-config": "^4.0.0",
43-
"@npmcli/template-oss": "4.19.0",
43+
"@npmcli/template-oss": "4.21.3",
4444
"minipass-fetch": "^3.0.3",
4545
"nock": "^13.2.7",
4646
"semver": "^7.5.4",

package-lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,9 +1685,9 @@
16851685
}
16861686
},
16871687
"node_modules/@npmcli/agent": {
1688-
"version": "2.2.0",
1689-
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.0.tgz",
1690-
"integrity": "sha512-2yThA1Es98orMkpSLVqlDZAMPK3jHJhifP2gnNUdk1754uZ8yI5c+ulCoVG+WlntQA6MzhrURMXjSd9Z7dJ2/Q==",
1688+
"version": "2.2.1",
1689+
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.1.tgz",
1690+
"integrity": "sha512-H4FrOVtNyWC8MUwL3UfjOsAihHvT1Pe8POj3JvjXhSTJipsZMtgUALCT4mGyYZNxymkUfOw3PUj6dE4QPp6osQ==",
16911691
"inBundle": true,
16921692
"dependencies": {
16931693
"agent-base": "^7.1.0",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy