From f3cd9f7c052e904a8a8c4a4d5edcd7f6f43ca09a Mon Sep 17 00:00:00 2001 From: Maikel van Dort Date: Tue, 27 Jan 2026 01:37:26 +0100 Subject: [PATCH] feat: dlx timeout & retry (#10512) --- .changeset/curly-dryers-cheese.md | 5 +++++ exec/plugin-commands-script-runners/src/dlx.ts | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 .changeset/curly-dryers-cheese.md diff --git a/.changeset/curly-dryers-cheese.md b/.changeset/curly-dryers-cheese.md new file mode 100644 index 0000000000..6ce34b669f --- /dev/null +++ b/.changeset/curly-dryers-cheese.md @@ -0,0 +1,5 @@ +--- +"@pnpm/plugin-commands-script-runners": minor +--- + +Add timeout & retry options to `pnpm dlx` / `pnpx` diff --git a/exec/plugin-commands-script-runners/src/dlx.ts b/exec/plugin-commands-script-runners/src/dlx.ts index f755d84583..d2b6519062 100644 --- a/exec/plugin-commands-script-runners/src/dlx.ts +++ b/exec/plugin-commands-script-runners/src/dlx.ts @@ -101,6 +101,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