Skip to content

docs: revert canonical examples to npx (blocked on bundling #4760 + npm v12 GA) #4761

Description

@mrgrain

Summary

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 allowScripts off 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.

Blocked on (do not action until both are true)

Scope

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions