Files
fusion/.github/actions/setup-node-pnpm/action.yml
gsxdsm 8b039a543e fix(desktop): advance Pi runtime pin to 0.82.1 for packaging PR lane (#2465)
## Summary
- Advance the matched Pi runtime pin (`pi-ai`, `pi-coding-agent`,
`pi-agent-core`, `pi-tui`) from **0.82.0 → 0.82.1** so
electron-builder's production-dependency walk accepts `pi-agent-core`'s
`pi-ai@^0.82.1` requirement.
- Fixes the Desktop packaging PR-lane failure:
`Production dependency @earendil-works/pi-ai not found for package
@earendil-works/pi-agent-core` (required `^0.82.1`).
- Keep the workspace override guard; update pin-policy fixtures and CLI
package-config expectations.
- Tighten the advisory packaging step-order test so it asserts against
the real `electron-builder --dir` step (not a missing release-only step
name that previously passed via `indexOf === -1`).
- Run `pnpm dedupe` so the packaging lane's lockfile dedupe
early-warning is clean.

## Context
#2439 pinned the full Pi closure at 0.82.0 and made recent main-based
packaging runs green. This advances to the current upstream patch so
deploy + electron-builder stay aligned with `pi-agent-core@0.82.1`'s
declared dependency range.

## Test plan
- [x] `node scripts/check-pi-versions-pinned.mjs`
- [x] `node --test scripts/__tests__/check-pi-versions-pinned.test.mjs`
- [x] `pnpm --filter @runfusion/fusion exec vitest run
src/__tests__/package-config.test.ts`
- [x] `pnpm --filter @fusion/desktop exec vitest run
src/__tests__/release-workflow.test.ts`
- [x] `pnpm dedupe --check`
- [ ] GitHub: Desktop packaging (should run full packaging walk —
lockfile/package.json touched)
- [ ] GitHub: PR Checks (Lint, Typecheck, Build, Gate)
2026-07-26 23:47:49 -07:00

61 lines
2.4 KiB
YAML

name: setup-node-pnpm
description: "Install pnpm, setup Node.js, install dependencies"
inputs:
node-version:
description: Node.js version
required: false
default: "24"
install-args:
description: Arguments passed to pnpm install
required: false
default: "--frozen-lockfile"
registry-url:
description: Optional npm registry URL passed to actions/setup-node
required: false
default: ""
skip-install:
description: Set to 'true' to skip the pnpm install step; caller runs install themselves
required: false
default: "false"
runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4
# Do NOT cache the linked node_modules tree. pnpm builds node_modules from
# symlinks/junctions into the content-addressable store, and actions/cache does
# not preserve Windows junctions across its tar/restore — a restored tree has
# broken peer links (e.g. @vitejs/plugin-react can't resolve its `vite` peer →
# ERR_MODULE_NOT_FOUND), which silently broke the Windows release build. The
# pnpm *store* is already cached by actions/setup-node (`cache: pnpm`), so
# `pnpm install --frozen-lockfile` is fast with a warm store and relinks
# correctly per-OS/arch every time (also fixing the prior arch-key and per-job
# cache-race issues this node_modules cache was patched for).
#
# FNXC:CI 2026-07-26-23:05:
# skip-install callers (agent-browser pack fixture, version.yml) never create a
# pnpm store. setup-node's post-job cache save then fails hard with
# "Path Validation Error: Path(s) specified in the action for caching do(es)
# not exist" and marks an otherwise-successful pack job failed. Only enable
# the pnpm store cache when this composite will actually install.
- name: Setup Node.js
if: ${{ inputs.skip-install != 'true' }}
uses: actions/setup-node@v5
with:
node-version: ${{ inputs.node-version }}
cache: pnpm
registry-url: ${{ inputs.registry-url }}
- name: Setup Node.js (no pnpm store cache)
if: ${{ inputs.skip-install == 'true' }}
uses: actions/setup-node@v5
with:
node-version: ${{ inputs.node-version }}
registry-url: ${{ inputs.registry-url }}
- name: Install dependencies
if: ${{ inputs.skip-install != 'true' }}
shell: bash
run: pnpm install ${{ inputs.install-args }}