Skip to content

feat: add pnpm alias shims - #851

Open
Stanzilla wants to merge 3 commits into
nodejs:mainfrom
Stanzilla:add-pnpm-alias-shims
Open

Stanzilla wants to merge 3 commits into
nodejs:mainfrom
Stanzilla:add-pnpm-alias-shims

Conversation

@Stanzilla

@Stanzilla Stanzilla commented May 21, 2026

Copy link
Copy Markdown

Summary

  • add pn and pnx shims for pnpm >=11
  • include the aliases in publish metadata
  • mark pn init, pn dlx, and pnx as transparent pnpm commands
  • add coverage for enabling alias shims and transparent alias commands

Fixes #833

Tests

  • yarn build
  • yarn test tests/Enable.test.ts tests/main.test.ts --run
  • yarn typecheck
  • yarn lint
  • yarn test --run

Signed-off-by: Benjamin Staneck <staneck@gmail.com>
@MikeMcC399

Copy link
Copy Markdown
Contributor

It looks like this would throw an error if a pnpm 11 alias, such as pn, is used in a pnpm 10 project.

You should probably wait for comment from a maintainer though before investing more effort.

@Stanzilla

Copy link
Copy Markdown
Author

@aduh95 friendly ping!

@MikeMcC399

Copy link
Copy Markdown
Contributor

pnpm >=11 no longer recommends Corepack
See #687 (comment) & #687 (comment)

@Stanzilla

Copy link
Copy Markdown
Author

pnpm >=11 no longer recommends Corepack See #687 (comment) & #687 (comment)

Well yes but since then a few things were fixed and as long as Corepack still supports it, the aliases should be supported as well, imo

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for short pn/pnx commands shipped with pnpm@11

3 participants