Comparing main...auto-no-runtime · pnpm/setup · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pnpm/setup
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: pnpm/setup
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: auto-no-runtime
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on May 11, 2026

  1. feat: auto-pass --no-runtime when the runtime input is set

    When the user pins a runtime via the action's `runtime` input, that
    runtime has already been installed and put on PATH by the time `pnpm
    install` runs. If the project's package.json also declares a different
    `devEngines.runtime` with `onFail: download`, pnpm install would fetch
    that second runtime and silently swap the active one — defeating the
    matrix/explicit pin.
    
    `--no-runtime` (pnpm v11.1.0+) tells pnpm install to skip the runtime
    fetch entirely. Appending it whenever the `runtime` input is set
    matches user intent: "I told the action which runtime I want, don't
    let install second-guess it."
    
    When the input is omitted (runtime fully driven by devEngines.runtime),
    `pnpm install` runs unmodified — the devEngines runtime is the only
    source of truth and install should honor it.
    
    Adds a `runtime-overrides-devengines` test that pins node@22 in the
    action input, declares ^20.0.0 in devEngines.runtime, and asserts node
    22 is still active after install.
    
    Bumps test workflow's pnpm pin to 11.1.0 since `--no-runtime` requires it.
    zkochan committed May 11, 2026
    Configuration menu
    Copy the full SHA
    ef9f6ab View commit details
    Browse the repository at this point in the history
  2. fix: drop patchPnpmEnv and gate --no-runtime on pnpm version

    Two issues caught by the Windows CI failure on #2:
    
    1. `patchPnpmEnv` (in src/utils) prepended `dest/node_modules/.bin` to PATH
       before spawning `pnpm install` and `pnpm store prune`. On Windows in
       always-standalone mode, `.bin/pnpm.cmd` is an npm-created shim pointing
       at the BOOTSTRAP pnpm (e.g. 11.0.4), not the self-updated target. That
       shim won that PATH race and overrode the self-updated pnpm at
       `$PNPM_HOME/bin`, so `pnpm install --no-runtime` ran on the bootstrap
       and bailed with "Unknown option: 'runtime'". POSIX got lucky because
       `.bin` and `$PNPM_HOME` resolve to the same directory there.
    
       Removed `patchPnpmEnv` entirely. `spawnSync` now inherits `process.env`,
       whose PATH is already correctly fronted by `$PNPM_HOME/bin` and
       `$PNPM_HOME` via the `addPath` calls in install-pnpm.
    
    2. `--no-runtime` is a pnpm v11.1.0+ flag — passing it to older pnpm
       errors. Added `pnpmSupportsNoRuntime()` which parses `pnpm --version`
       and only appends `--no-runtime` when major.minor >= 11.1. On older
       pnpm with `runtime` input set, the action emits a warning that
       `devEngines.runtime` with `onFail: download` could still shadow the
       explicit runtime.
    
    The whole `src/utils/` module is now empty and has been deleted.
    zkochan committed May 11, 2026
    Configuration menu
    Copy the full SHA
    3dcff28 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2026

  1. fix: update pnpm to v11.1.1

    zkochan committed May 12, 2026
    Configuration menu
    Copy the full SHA
    2e278a9 View commit details
    Browse the repository at this point in the history
Loading