[PR #4464] [MERGED] fix: normalize workspace lockfile line endings #6389

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

📋 Pull Request Information

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

Base: staging ← Head: fix/4460-windows-lockfile-validation


📝 Commits (2)

  • e9e853a fix: normalize workspace lockfile line endings
  • b2ed0a9 test: cover lone carriage return lockfiles

📊 Changes

2 files changed (+11 additions, -3 deletions)

View changed files

📝 scripts/check-workspace-install.mjs (+5 -3)
📝 scripts/regressions/launcher-update.regression.mjs (+6 -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 #4460

Why this change

On Windows, Git may check out pnpm-lock.yaml with CRLF while pnpm writes node_modules/.pnpm/lock.yaml with LF. The byte-for-byte validator then reports a healthy install as stale, causing pnpm dev and the launchers to reinstall dependencies unnecessarily.

What changed

  • Read both lockfiles as UTF-8 and normalize CRLF or lone CR to LF before comparing.
  • Add a regression covering CRLF/LF equivalence while preserving real lockfile content mismatch detection.

Validation

  • 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

The focused regression passed locally with pnpm exec node scripts/regressions/launcher-update.regression.mjs. pnpm dev --host reached the healthy server at http://127.0.0.1:7860 and Vite at http://localhost:5173/ without a dependency validation warning or reinstall. Windows-specific manual verification remains for the contributor.

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 (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable; this is a CLI dependency-validation fix.

Summary by CodeRabbit

  • Bug Fixes

    • Improved lockfile matching across different line-ending formats, preventing false mismatches when files use Windows or legacy Mac line endings.
  • Tests

    • Added regression coverage for matching lockfiles with CRLF and CR-only line endings.

🔄 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/4464 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 8/2/2026 **Status:** ✅ Merged **Merged:** 8/2/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/4460-windows-lockfile-validation` --- ### 📝 Commits (2) - [`e9e853a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e9e853a10607b181126fb298e2db63ccfc1913ce) fix: normalize workspace lockfile line endings - [`b2ed0a9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b2ed0a936f80afa667174b67b85b4b87a863c38b) test: cover lone carriage return lockfiles ### 📊 Changes **2 files changed** (+11 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `scripts/check-workspace-install.mjs` (+5 -3) 📝 `scripts/regressions/launcher-update.regression.mjs` (+6 -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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #4460 ## Why this change On Windows, Git may check out `pnpm-lock.yaml` with CRLF while pnpm writes `node_modules/.pnpm/lock.yaml` with LF. The byte-for-byte validator then reports a healthy install as stale, causing `pnpm dev` and the launchers to reinstall dependencies unnecessarily. ## What changed - Read both lockfiles as UTF-8 and normalize CRLF or lone CR to LF before comparing. - Add a regression covering CRLF/LF equivalence while preserving real lockfile content mismatch detection. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes The focused regression passed locally with `pnpm exec node scripts/regressions/launcher-update.regression.mjs`. `pnpm dev --host` reached the healthy server at `http://127.0.0.1:7860` and Vite at `http://localhost:5173/` without a dependency validation warning or reinstall. Windows-specific manual verification remains for the contributor. ## Docs and release impact - [x] 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 (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable; this is a CLI dependency-validation fix. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved lockfile matching across different line-ending formats, preventing false mismatches when files use Windows or legacy Mac line endings. - **Tests** - Added regression coverage for matching lockfiles with CRLF and CR-only line endings. <!-- 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:09:58 +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#6389
No description provided.