mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 04:52:04 -04:00
7
.changeset/early-boxes-applaud.md
Normal file
7
.changeset/early-boxes-applaud.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
"@pnpm/fetch": major
|
||||||
|
"@pnpm/npm-registry-agent": major
|
||||||
|
"@pnpm/client": major
|
||||||
|
---
|
||||||
|
|
||||||
|
strictSSL option renamed to strictSsl.
|
||||||
@@ -34,7 +34,7 @@ export default function (
|
|||||||
const agent = npmRegistryAgent(urlObject.href, {
|
const agent = npmRegistryAgent(urlObject.href, {
|
||||||
...defaultOpts,
|
...defaultOpts,
|
||||||
...opts,
|
...opts,
|
||||||
strictSSL: defaultOpts.strictSSL ?? true,
|
strictSsl: defaultOpts.strictSsl ?? true,
|
||||||
} as any) // eslint-disable-line
|
} as any) // eslint-disable-line
|
||||||
headers['connection'] = agent ? 'keep-alive' : 'close'
|
headers['connection'] = agent ? 'keep-alive' : 'close'
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export interface AgentOptions {
|
|||||||
localAddress?: string
|
localAddress?: string
|
||||||
maxSockets?: number
|
maxSockets?: number
|
||||||
noProxy?: boolean | string
|
noProxy?: boolean | string
|
||||||
strictSSL?: boolean
|
strictSsl?: boolean
|
||||||
timeout?: number
|
timeout?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ export default function getAgent (uri: string, opts: AgentOptions) {
|
|||||||
? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}`
|
? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}`
|
||||||
: '>no-proxy<',
|
: '>no-proxy<',
|
||||||
`local-address:${opts.localAddress ?? '>no-local-address<'}`,
|
`local-address:${opts.localAddress ?? '>no-local-address<'}`,
|
||||||
`strict-ssl:${isHttps ? Boolean(opts.strictSSL).toString() : '>no-strict-ssl<'}`,
|
`strict-ssl:${isHttps ? Boolean(opts.strictSsl).toString() : '>no-strict-ssl<'}`,
|
||||||
`ca:${(isHttps && opts.ca) || '>no-ca<'}`,
|
`ca:${(isHttps && opts.ca) || '>no-ca<'}`,
|
||||||
`cert:${(isHttps && opts.cert) || '>no-cert<'}`,
|
`cert:${(isHttps && opts.cert) || '>no-cert<'}`,
|
||||||
`key:${(isHttps && opts.key) || '>no-key<'}`,
|
`key:${(isHttps && opts.key) || '>no-key<'}`,
|
||||||
@@ -67,7 +67,7 @@ export default function getAgent (uri: string, opts: AgentOptions) {
|
|||||||
key: opts.key,
|
key: opts.key,
|
||||||
localAddress: opts.localAddress,
|
localAddress: opts.localAddress,
|
||||||
maxSockets: opts.maxSockets ?? DEFAULT_MAX_SOCKETS,
|
maxSockets: opts.maxSockets ?? DEFAULT_MAX_SOCKETS,
|
||||||
rejectUnauthorized: opts.strictSSL,
|
rejectUnauthorized: opts.strictSsl,
|
||||||
timeout: agentTimeout,
|
timeout: agentTimeout,
|
||||||
} as any) // eslint-disable-line @typescript-eslint/no-explicit-any
|
} as any) // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||||
: new HttpAgent({
|
: new HttpAgent({
|
||||||
@@ -143,7 +143,7 @@ function getProxy (
|
|||||||
timeout?: number
|
timeout?: number
|
||||||
localAddress?: string
|
localAddress?: string
|
||||||
maxSockets?: number
|
maxSockets?: number
|
||||||
strictSSL?: boolean
|
strictSsl?: boolean
|
||||||
},
|
},
|
||||||
isHttps: boolean
|
isHttps: boolean
|
||||||
) {
|
) {
|
||||||
@@ -158,7 +158,7 @@ function getProxy (
|
|||||||
path: proxyUrl.pathname,
|
path: proxyUrl.pathname,
|
||||||
port: proxyUrl.port,
|
port: proxyUrl.port,
|
||||||
protocol: proxyUrl.protocol,
|
protocol: proxyUrl.protocol,
|
||||||
rejectUnauthorized: opts.strictSSL,
|
rejectUnauthorized: opts.strictSsl,
|
||||||
timeout: typeof opts.timeout !== 'number' || opts.timeout === 0 ? 0 : opts.timeout + 1,
|
timeout: typeof opts.timeout !== 'number' || opts.timeout === 0 ? 0 : opts.timeout + 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const OPTS = {
|
|||||||
key: 'key',
|
key: 'key',
|
||||||
localAddress: 'localAddress',
|
localAddress: 'localAddress',
|
||||||
maxSockets: 5,
|
maxSockets: 5,
|
||||||
strictSSL: true,
|
strictSsl: true,
|
||||||
timeout: 5,
|
timeout: 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default async (
|
|||||||
retries: opts.fetchRetries,
|
retries: opts.fetchRetries,
|
||||||
},
|
},
|
||||||
storeDir: opts.storeDir,
|
storeDir: opts.storeDir,
|
||||||
strictSSL: opts.strictSsl ?? true,
|
strictSsl: opts.strictSsl ?? true,
|
||||||
timeout: opts.fetchTimeout,
|
timeout: opts.fetchTimeout,
|
||||||
userAgent: opts.userAgent,
|
userAgent: opts.userAgent,
|
||||||
maxSockets: opts.networkConcurrency != null
|
maxSockets: opts.networkConcurrency != null
|
||||||
|
|||||||
Reference in New Issue
Block a user