Skip to content

Commit

Permalink
deps: @npmcli/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Feb 22, 2024
1 parent dafa903 commit 98b1189
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions node_modules/@npmcli/agent/lib/agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module.exports = class Agent extends AgentBase {

let ProxyAgent = this.#ProxyAgent
if (Array.isArray(ProxyAgent)) {
ProxyAgent = options.secureEndpoint ? ProxyAgent[1] : ProxyAgent[0]
ProxyAgent = this.isSecureEndpoint(options) ? ProxyAgent[1] : ProxyAgent[0]
}

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

let socket
let timeout = this.#timeouts.connection
const isSecureEndpoint = this.isSecureEndpoint(options)

const proxy = this.#getProxy(options)
if (proxy) {
Expand All @@ -124,7 +125,7 @@ module.exports = class Agent extends AgentBase {
timeout = timeout - (Date.now() - start)
}
} else {
socket = (options.secureEndpoint ? tls : net).connect(options)
socket = (isSecureEndpoint ? tls : net).connect(options)
}

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

const connectPromise = socket[options.secureEndpoint ? 'secureConnecting' : 'connecting']
? once(socket, options.secureEndpoint ? 'secureConnect' : 'connect', { signal })
const connectPromise = socket[isSecureEndpoint ? 'secureConnecting' : 'connecting']
? once(socket, isSecureEndpoint ? 'secureConnect' : 'connect', { signal })
: Promise.resolve()

await this.#timeoutConnection({
Expand Down
8 changes: 4 additions & 4 deletions node_modules/@npmcli/agent/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@npmcli/agent",
"version": "2.2.0",
"version": "2.2.1",
"description": "the http/https agent used by the npm cli",
"main": "lib/index.js",
"scripts": {
"gencerts": "bash scripts/create-cert.sh",
"test": "tap",
"lint": "eslint \"**/*.js\"",
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
Expand All @@ -28,7 +28,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.19.0",
"version": "4.21.3",
"publish": "true"
},
"dependencies": {
Expand All @@ -40,7 +40,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.19.0",
"@npmcli/template-oss": "4.21.3",
"minipass-fetch": "^3.0.3",
"nock": "^13.2.7",
"semver": "^7.5.4",
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1685,9 +1685,9 @@
}
},
"node_modules/@npmcli/agent": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.0.tgz",
"integrity": "sha512-2yThA1Es98orMkpSLVqlDZAMPK3jHJhifP2gnNUdk1754uZ8yI5c+ulCoVG+WlntQA6MzhrURMXjSd9Z7dJ2/Q==",
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.1.tgz",
"integrity": "sha512-H4FrOVtNyWC8MUwL3UfjOsAihHvT1Pe8POj3JvjXhSTJipsZMtgUALCT4mGyYZNxymkUfOw3PUj6dE4QPp6osQ==",
"inBundle": true,
"dependencies": {
"agent-base": "^7.1.0",
Expand Down

0 comments on commit 98b1189

Please sign in to comment.