You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revert the canonical documentation examples from pnpm dlx projen back to npx projen (with a brief note pointing at pnpm dlx / yarn dlx / bunx equivalents).
This is the follow-up to item (2) of #4601. It is intentionally blocked on two preconditions — see below.
Rationale
Neutrality. Docs have no "configured package manager"; they're read by npm/yarn/pnpm/bun users alike. npx ships with every Node install and works for everyone. Making pnpm dlx the canonical command silently presumes pnpm and nudges readers toward it — which is item (3) of security: replace npx with pnpm, change default package manager, deprecate NodePackageManager.NPM #4601 (changing the default PM) through the back door, and that was declined.
Security delta closes. The npm v12 changelog defaults allowScriptsoff and applies it to npx and global installs (plus --allow-git=none / --allow-remote=none). The one concrete differentiator that motivated the npx → pnpm dlx change — transitive postinstall running by default — goes away for npx itself.
The residual pnpm-only protections (minimumReleaseAge, trustPolicy) only benefit users already on pnpm, which a doc example can't assume anyway.
npm v12 is GA and has had a few months of adoption. v12 is estimated for July 2026. Its script-blocking defaults only protect users actually on npm ≥ 12, so we should allow a buffer (suggest revisiting ~Q4 2026) before treating npx as the safe default in docs.
Summary
Revert the canonical documentation examples from
pnpm dlx projenback tonpx projen(with a brief note pointing atpnpm dlx/yarn dlx/bunxequivalents).This is the follow-up to item (2) of #4601. It is intentionally blocked on two preconditions — see below.
Rationale
npxships with every Node install and works for everyone. Makingpnpm dlxthe canonical command silently presumes pnpm and nudges readers toward it — which is item (3) of security: replace npx with pnpm, change default package manager, deprecate NodePackageManager.NPM #4601 (changing the default PM) through the back door, and that was declined.allowScriptsoff and applies it tonpxand global installs (plus--allow-git=none/--allow-remote=none). The one concrete differentiator that motivated thenpx → pnpm dlxchange — transitivepostinstallrunning by default — goes away fornpxitself.minimumReleaseAge,trustPolicy) only benefit users already on pnpm, which a doc example can't assume anyway.Blocked on (do not action until both are true)
dependencies, so consumers still install them #4760. The "npx projenis safe because everything is bundled" argument only holds once projen stops listing bundled deps independencies. Until projen lists bundled dependencies independencies, so consumers still install them #4760 lands, reverting docs tonpxwould still expose readers to transitive registry installs.npxas the safe default in docs.Scope
npx → pnpm dlxdoc changes from item (2) of security: replace npx with pnpm, change default package manager, deprecate NodePackageManager.NPM #4601 (bootstrapprojen newexamples and any day-to-day task examples in docs).npxhandling (tracked in remove hardcoded npx from source code in favour of the configured package manager #4759), default PM (security: replace npx with pnpm, change default package manager, deprecate NodePackageManager.NPM #4601 item 3),NodePackageManager.NPMdeprecation (security: replace npx with pnpm, change default package manager, deprecate NodePackageManager.NPM #4601 item 4).Relates to #4601. Blocked by #4760 and by the npm v12 GA + adoption window.
🤖 Filed by an AI agent on behalf of @mrgrain, who reviewed and approved this issue.