[PR #5468] [MERGED] fix: run standalone Windows pnpm.exe through ComSpec instead of Node #6776

Closed
opened 2026-10-23 04:13:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5468
Author: @Kranael
Created: 8/24/2026
Status: ✅ Merged
Merged: 8/24/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/windows-pnpm-runner


📝 Commits (2)

  • f63b23e fix: run standalone Windows pnpm.exe through ComSpec instead of Node
  • 430ebf7 Merge staging and address pnpm runner review

📊 Changes

3 files changed (+35 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 scripts/pnpm-runner.mjs (+7 -1)
📝 scripts/regressions/pnpm-runner.regression.mjs (+27 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #5473

Why this change

On Windows with standalone pnpm installs such as pnpm setup or @pnpm/exe, npm_execpath can point at the native pnpm.exe binary. The launcher treated it as a JavaScript pnpm CLI and spawned it with Node, which parsed the PE binary as JavaScript and failed with SyntaxError: Invalid or unexpected token before the dev server or Playwright webServer could start.

The companion capability-runtime junction snapshot failure is already fixed on staging; this PR supplies the missing pnpm-runner correction.

What changed

  • Reuse the current Node process for normal pnpm JavaScript CLIs and extensionless POSIX pnpm launchers.
  • On Windows only, detect native or command-shim npm_execpath values and invoke pnpm through ComSpec instead of Node.
  • Cover both the native Windows pnpm.exe case and the extensionless POSIX compatibility case in the focused regression.
  • Preserve all newer staging changelog entries while resolving the branch conflict.

Validation

Automated maintainer follow-up completed on the conflict-resolved branch:

  • node scripts/regressions/pnpm-runner.regression.mjs — passed.
  • pnpm regression:launcher-update — passed.
  • pnpm check — passed.
  • git diff --check — passed.

The original contributor also reports that the focused runner and launcher-update lanes passed on Windows before the review follow-up.

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify a full Windows launcher update with a standalone pnpm install where npm_execpath points to pnpm.exe.
  • No real Windows launcher was available during the maintainer follow-up; platform-specific runner selection is covered deterministically by regression tests.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

The existing [Unreleased] changelog entry remains included. No user-facing documentation or release metadata changed.

UI evidence (if applicable)

Not applicable; this is a launcher process-selection fix.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed Windows startup issues for standalone pnpm installations.
    • Dev servers and Playwright now correctly launch native pnpm.exe commands through the Windows command shell.
  • Tests
    • Added regression coverage for native pnpm executable handling on Windows.
  • Documentation
    • Documented the fix in the unreleased changelog.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5468 **Author:** [@Kranael](https://github.com/Kranael) **Created:** 8/24/2026 **Status:** ✅ Merged **Merged:** 8/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/windows-pnpm-runner` --- ### 📝 Commits (2) - [`f63b23e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f63b23e5903bbea83477258024c5328f94f104d1) fix: run standalone Windows pnpm.exe through ComSpec instead of Node - [`430ebf7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/430ebf735badc3f57162ed8d01ec9465b8649dd7) Merge staging and address pnpm runner review ### 📊 Changes **3 files changed** (+35 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `scripts/pnpm-runner.mjs` (+7 -1) 📝 `scripts/regressions/pnpm-runner.regression.mjs` (+27 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #5473 ## Why this change On Windows with standalone pnpm installs such as `pnpm setup` or `@pnpm/exe`, `npm_execpath` can point at the native `pnpm.exe` binary. The launcher treated it as a JavaScript pnpm CLI and spawned it with Node, which parsed the PE binary as JavaScript and failed with `SyntaxError: Invalid or unexpected token` before the dev server or Playwright webServer could start. The companion capability-runtime junction snapshot failure is already fixed on `staging`; this PR supplies the missing pnpm-runner correction. ## What changed - Reuse the current Node process for normal pnpm JavaScript CLIs and extensionless POSIX pnpm launchers. - On Windows only, detect native or command-shim `npm_execpath` values and invoke pnpm through `ComSpec` instead of Node. - Cover both the native Windows `pnpm.exe` case and the extensionless POSIX compatibility case in the focused regression. - Preserve all newer `staging` changelog entries while resolving the branch conflict. ## Validation Automated maintainer follow-up completed on the conflict-resolved branch: - `node scripts/regressions/pnpm-runner.regression.mjs` — passed. - `pnpm regression:launcher-update` — passed. - `pnpm check` — passed. - `git diff --check` — passed. The original contributor also reports that the focused runner and launcher-update lanes passed on Windows before the review follow-up. - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify a full Windows launcher update with a standalone pnpm install where `npm_execpath` points to `pnpm.exe`. - No real Windows launcher was available during the maintainer follow-up; platform-specific runner selection is covered deterministically by regression tests. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) The existing `[Unreleased]` changelog entry remains included. No user-facing documentation or release metadata changed. ## UI evidence (if applicable) Not applicable; this is a launcher process-selection fix. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed Windows startup issues for standalone pnpm installations. * Dev servers and Playwright now correctly launch native `pnpm.exe` commands through the Windows command shell. * **Tests** * Added regression coverage for native pnpm executable handling on Windows. * **Documentation** * Documented the fix in the unreleased changelog. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:13:37 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6776
No description provided.