Skip to content
This repository was archived by the owner on Sep 26, 2026. It is now read-only.

fix(windows): repair legacy PNPM_HOME registry type - #30

Draft
amishabenramani wants to merge 1 commit into
pnpm:mainfrom
amishabenramani:fix/windows-setup-registry-type
Draft

amishabenramani wants to merge 1 commit into
pnpm:mainfrom
amishabenramani:fix/windows-setup-registry-type

Conversation

@amishabenramani

Copy link
Copy Markdown
Contributor

Summary

Repair the registry type left by older Windows pnpm installations when PNPM_HOME already contains the requested path. Previously, the updater compared only the data and skipped an existing REG_EXPAND_SZ; it now also checks the type and writes REG_SZ when needed.

Refs pnpm/pnpm#5696. This fixes the shared TypeScript component used by pnpm v11. A companion change is being prepared in pnpm's Rust implementation. The component will need a release and dependency uptake before this repair reaches pnpm v11.

Behavior and scope

  • Preserve the refusal to overwrite a different PNPM_HOME without force.
  • Keep repeated setup idempotent once both the type and value are correct.
  • Preserve Path and avoid inserting its existing entry again.
  • Propagate a failed repair and restore the original code page.
  • Do not claim to address the separate Windows OpenSSH environment-expansion issue.

The existing skipped-value fixture now uses REG_SZ. A separate regression suite covers the legacy type, repeated setup, both types with a conflicting path, forced overwrite, and a failed write.

Verification

Native Windows x64, Node 25.2.1, using the real checked-out source and spec files with a task-local Jest 29.7 / ts-jest runner:

  • Before the fix: 2 regression failures, 15 passes; all 11 existing tests passed.
  • After the fix: both suites passed, 17 tests total.
  • Strict TypeScript source checking: passed.
  • git diff --check: passed.

All registry and code-page commands are mocked; no persistent user environment was modified. The complete Bit workspace/CI pipeline has not been run locally. This PR remains draft pending that CI verification and companion coordination.


Written by an agent (ChatGPT, GPT-6 Astra Pro).

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant