From 362bc78c1e7b9b3dcb3cf42c5626dcec84b35aca Mon Sep 17 00:00:00 2001 From: Robbie Wadley Date: Tue, 16 Dec 2025 22:50:09 +0000 Subject: [PATCH] allow wireit scripts to use package runners --- src/analyzer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/analyzer.ts b/src/analyzer.ts index cc599d148..ce6548e29 100644 --- a/src/analyzer.ts +++ b/src/analyzer.ts @@ -132,7 +132,10 @@ function isValidWireitScriptCommand(command: string): boolean { // do not automatically add all parent directory `node_modules/.bin` // folders to PATH. /^(\.\.\/)+node_modules\/\.bin\/wireit$/.test(command) || - (IS_WINDOWS && /^(\.\.\\)+node_modules\\\.bin\\wireit\.cmd$/.test(command)) + (IS_WINDOWS && /^(\.\.\\)+node_modules\\\.bin\\wireit\.cmd$/.test(command)) || + // This form is useful in preinstall scripts where wireit has not yet been + // installed and cannot be invoked directly. + /^(npx|pnpx|pnpm dlx|bunx|dx) wireit$/.test(command) ); }