Skip to content

Will pnpm@10.14's built-in runtime installation make actions/setup-node unnecessary? #173

@marcalexiei

Description

@marcalexiei

Context

The recent pnpm 10.14 release introduces a new feature: devEngines.runtime,
allows declaring a JavaScript runtime (Node, Deno, Bun) in package.json.

Current recommended CI setup uses both actions/setup-node and pnpm/action-setup actions:

pnpm documentation

Use cache to reduce installation time

Code reference

on:
  - push
  - pull_request

jobs:
  cache-and-install:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - uses: pnpm/action-setup@v4
        name: Install pnpm
        with:
          version: 10
          run_install: false

      - name: Install Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'pnpm'

      - name: Install dependencies
        run: pnpm install

https://github.com/pnpm/action-setup?tab=readme-ov-file#notes

This action does not setup Node.js for you, use actions/setup-node yourself.


Questions

Given this new capability, I’d like to know whether using actions/setup-node in GitHub Actions workflows remains necessary,
or if pnpm@10.14 can fully handle runtime provisioning for CI environments:

If devEngines.runtime is used for Node.js from pnpm, does actions/setup-node become redundant?

Currently, setup-node offers functionality beyond installing Node, e.g.,
dependency caching (cache: pnpm), and handling authenticated registries.
If I rely solely on pnpm/setup-action I am losing these capabilities
Are there any plans for pnpm/action-setup to support similar features in the future?


Due to the state of devEngines support in actions/setup-node (pr in review: actions/setup-node#1283)
I don't have the chance to test how they behave together.
However, I’m curious how the new devEngines.runtime capability in pnpm
may affect the role pnpm/action-setup in GitHub Actions workflows. 😅

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions