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, {
|
||||
...defaultOpts,
|
||||
...opts,
|
||||
strictSSL: defaultOpts.strictSSL ?? true,
|
||||
strictSsl: defaultOpts.strictSsl ?? true,
|
||||
} as any) // eslint-disable-line
|
||||
headers['connection'] = agent ? 'keep-alive' : 'close'
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface AgentOptions {
|
||||
localAddress?: string
|
||||
maxSockets?: number
|
||||
noProxy?: boolean | string
|
||||
strictSSL?: boolean
|
||||
strictSsl?: boolean
|
||||
timeout?: number
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export default function getAgent (uri: string, opts: AgentOptions) {
|
||||
? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}`
|
||||
: '>no-proxy<',
|
||||
`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<'}`,
|
||||
`cert:${(isHttps && opts.cert) || '>no-cert<'}`,
|
||||
`key:${(isHttps && opts.key) || '>no-key<'}`,
|
||||
@@ -67,7 +67,7 @@ export default function getAgent (uri: string, opts: AgentOptions) {
|
||||
key: opts.key,
|
||||
localAddress: opts.localAddress,
|
||||
maxSockets: opts.maxSockets ?? DEFAULT_MAX_SOCKETS,
|
||||
rejectUnauthorized: opts.strictSSL,
|
||||
rejectUnauthorized: opts.strictSsl,
|
||||
timeout: agentTimeout,
|
||||
} as any) // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
: new HttpAgent({
|
||||
@@ -143,7 +143,7 @@ function getProxy (
|
||||
timeout?: number
|
||||
localAddress?: string
|
||||
maxSockets?: number
|
||||
strictSSL?: boolean
|
||||
strictSsl?: boolean
|
||||
},
|
||||
isHttps: boolean
|
||||
) {
|
||||
@@ -158,7 +158,7 @@ function getProxy (
|
||||
path: proxyUrl.pathname,
|
||||
port: proxyUrl.port,
|
||||
protocol: proxyUrl.protocol,
|
||||
rejectUnauthorized: opts.strictSSL,
|
||||
rejectUnauthorized: opts.strictSsl,
|
||||
timeout: typeof opts.timeout !== 'number' || opts.timeout === 0 ? 0 : opts.timeout + 1,
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ const OPTS = {
|
||||
key: 'key',
|
||||
localAddress: 'localAddress',
|
||||
maxSockets: 5,
|
||||
strictSSL: true,
|
||||
strictSsl: true,
|
||||
timeout: 5,
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export default async (
|
||||
retries: opts.fetchRetries,
|
||||
},
|
||||
storeDir: opts.storeDir,
|
||||
strictSSL: opts.strictSsl ?? true,
|
||||
strictSsl: opts.strictSsl ?? true,
|
||||
timeout: opts.fetchTimeout,
|
||||
userAgent: opts.userAgent,
|
||||
maxSockets: opts.networkConcurrency != null
|
||||
|
||||
Reference in New Issue
Block a user