pnpm / pnpm/setup

Support selecting the installed runtime architecture

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
140
Forks
19
Avg merge
13h 19m
Merged PRs (30d)
3

Description

The actions/setup-node action supports an architecture input for selecting the target architecture of the installed Node.js runtime.

It would be super useful if pnpm/setup provided the same capability for runtimes installed through pnpm runtime set.

My use case is testing an x86_64-apple-darwin native addon on macOS. I would like to use a macos-latest runner while installing x64 Node.js and running it through Rosetta, rather than depending on GitHub's Intel macOS runners.

For example:

- uses: pnpm/setup@v2
  with:
    runtime: node@24
    architecture: x64

When omitted, architecture should continue to default to the runner's architecture.
The expected result on an ARM64 macOS runner would be an x64 Node.js runtime:

- run: test "$(node -p process.arch)" = "x64"

I realize pnpm runtime set may also need support for selecting a target architecture before the action can pass this through. If so, guidance on whether this request belongs in pnpm/pnpm instead would be appreciated.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the pnpm/setup action's handling of the runtime input and the related pnpm runtime set behavior in pnpm/pnpm. Check how architecture is represented for Node.js on ARM64 macOS, then verify the example with node -p process.arch; done means an omitted architecture preserves the runner default and x64 selects an x64 runtime.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
ci-cd
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.