feat: dlx timeout & retry (#10512)

This commit is contained in:
Maikel van Dort
2026-01-27 01:37:26 +01:00
committed by Zoltan Kochan
parent 0366516a76
commit 6065d2e196
2 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/plugin-commands-script-runners": minor
---
Add timeout & retry options to `pnpm dlx` / `pnpx`

View File

@@ -102,6 +102,13 @@ export async function handler (
authConfig: opts.rawConfig,
fullMetadata,
filterMetadata: fullMetadata,
retry: {
factor: opts.fetchRetryFactor,
maxTimeout: opts.fetchRetryMaxtimeout,
minTimeout: opts.fetchRetryMintimeout,
retries: opts.fetchRetries,
},
timeout: opts.fetchTimeout,
})
const resolvedPkgAliases: string[] = []
const publishedBy = opts.minimumReleaseAge ? new Date(Date.now() - opts.minimumReleaseAge * 60 * 1000) : undefined