Skip to content

fix: retry npm peer resolution conflicts - #4

Merged
amanthanvi merged 1 commit into
mainfrom
fix/npm-eresolve-fallback
Jun 17, 2026
Merged

amanthanvi merged 1 commit into
mainfrom
fix/npm-eresolve-fallback

Conversation

@amanthanvi

@amanthanvi amanthanvi commented Jun 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • retry global npm upgrades with --legacy-peer-deps only after npm fails with ERESOLVE
  • keep normal npm failures strict
  • bump release metadata to 2.0.1 and document the patch release
  • add regression coverage for the ERESOLVE fallback

Validation

  • ./scripts/test.sh
  • ./scripts/lint.sh
  • bash ./scripts/release-build.sh 2.0.1 /tmp/updates-release-2.0.1-51353
  • bash ./scripts/release-verify-dist.sh 2.0.1 /tmp/updates-release-2.0.1-51353
  • UPDATES_SELF_UPDATE=0 updates --only node --no-emoji --no-color
  • updates --only node --no-emoji --no-color

Release Plan

After review/CI is clean:

  1. Squash merge this PR.
  2. Pull main.
  3. Run bash ./scripts/release.sh 2.0.1.
  4. Push main and v2.0.1 tag.
  5. Publish GitHub Release assets from dist/.

Summary by Sourcery

Implement stricter handling of global npm upgrade failures while adding a targeted fallback for peer resolution conflicts and preparing the 2.0.1 patch release.

Bug Fixes:

  • Retry global npm upgrades with --legacy-peer-deps only when npm fails with ERESOLVE, allowing updates to proceed despite upstream peer metadata conflicts while keeping other npm failures strict.

Enhancements:

  • Update self-update fixtures, version metadata, and Windows install script to target the 2.0.1/2.0.x release line.

Documentation:

  • Document the 2.0.1 patch release in the changelog and refresh README references to the current 2.0.x contract and 2.0.1 artifacts.

Tests:

  • Add regression coverage to verify npm ERESOLVE failures are retried with --legacy-peer-deps and that self-update behavior remains correct with the new version metadata.

Summary by CodeRabbit

  • Bug Fixes
    • npm global upgrades now automatically retry with --legacy-peer-deps flag when peer dependency resolution fails, improving success rates while maintaining strict error detection for other npm issues.

Copilot AI review requested due to automatic review settings June 17, 2026 05:27
@sourcery-ai

sourcery-ai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implements an npm upgrade fallback that retries global installs with --legacy-peer-deps only on ERESOLVE failures, adds regression test coverage for this behavior, and bumps the project to version 2.0.1 with corresponding README and changelog updates, including aligning self-update tests and fixtures with the new version.

Sequence diagram for npm global upgrade retry with legacy peer deps

sequenceDiagram
    actor User
    participant UpdatesCLI
    participant npm

    User->>UpdatesCLI: run node updates
    UpdatesCLI->>npm: npm install -g global_packages
    npm-->>UpdatesCLI: error ERESOLVE
    alt ERESOLVE failure
        UpdatesCLI->>npm: npm install -g global_packages --legacy-peer-deps
        npm-->>UpdatesCLI: success
    else other npm failure
        UpdatesCLI-->>User: propagate npm error
    end
Loading

File-Level Changes

Change Details Files
Add npm ERESOLVE-aware retry behavior for global Node package upgrades.
  • Update the main updates CLI script to detect npm ERESOLVE failures during global package installs and automatically retry the same install command with --legacy-peer-deps.
  • Ensure that only ERESOLVE failures trigger the fallback so that other npm errors remain strict and still cause the node step to fail.
updates
Add regression test to validate npm ERESOLVE fallback behavior.
  • Extend the node update tests to stub ncu to report a specific package and stub npm so that the first install attempt fails with an ERESOLVE-like error and the second is available for retry.
  • Assert that the script logs both the original npm install and the retry with --legacy-peer-deps, preserves the node step as successful, and emits clear stderr messaging about the retry and original error.
tests/test_cli.sh
Bump release metadata and documentation from 2.0.0 to 2.0.1 and adjust self-update fixtures to track the new latest version.
  • Update PowerShell entrypoint version constant and README Windows install snippet, including release contract wording and references to official self-update artifacts, from 2.0.0 to 2.0.1 / 2.0.x as appropriate.
  • Add a 2.0.1 entry to the changelog describing the npm ERESOLVE retry fix.
  • Adjust self-update tests and fixtures to treat 2.0.2 as the latest available version while verifying that unsupported digest/manifest conditions leave the installed version at 2.0.1, and that shell/node self-update paths install 2.0.2 as expected.
updates-main.ps1
README.md
CHANGELOG.md
tests/test_cli.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The new npm ERESOLVE test stubs npm by matching the full $* string exactly; consider making the match a bit more flexible (e.g., checking for the subcommand and flags with a pattern) so the test won’t become fragile if the argument order or extra flags change in the implementation.
  • Version strings (e.g., 2.0.1 / 2.0.2) are repeated across tests and docs; introducing a single source of truth or helper in the test harness for the current and next release versions would make future bumps less error-prone.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new npm ERESOLVE test stubs `npm` by matching the full `$*` string exactly; consider making the match a bit more flexible (e.g., checking for the subcommand and flags with a pattern) so the test won’t become fragile if the argument order or extra flags change in the implementation.
- Version strings (e.g., `2.0.1` / `2.0.2`) are repeated across tests and docs; introducing a single source of truth or helper in the test harness for the current and next release versions would make future bumps less error-prone.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@amanthanvi

Copy link
Copy Markdown
Owner Author

@coderabbitai review
@greptileai review
@sourcery-ai review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Not ready to approve

The new mktemp usage in run_npm_global_install is not reliably portable across Linux environments (e.g., BusyBox), which can silently skip the intended ERESOLVE fallback behavior.

Pull request overview

This PR tightens the node module’s global npm upgrade behavior by retrying only peer-resolution failures (ERESOLVE) with --legacy-peer-deps, while keeping other npm failures strict, and prepares the 2.0.1 patch release across version metadata, docs, and tests.

Changes:

  • Add a dedicated run_npm_global_install wrapper that detects ERESOLVE and retries with --legacy-peer-deps.
  • Bump release/version references to 2.0.1 (Bash + PowerShell entrypoints, docs, changelog).
  • Add regression coverage for the ERESOLVE retry behavior and adjust self-update fixtures accordingly.
File summaries
File Description
updates-main.ps1 Bumps Windows PowerShell entrypoint version to 2.0.1.
updates Bumps UPDATES_VERSION and adds npm ERESOLVE retry wrapper used by the node module.
tests/test_cli.sh Adds ERESOLVE retry regression test; updates self-update fixture versions for new baseline.
README.md Updates contract/version references and Windows install snippet to 2.0.1 / 2.0.x.
CHANGELOG.md Documents the 2.0.1 patch release and the ERESOLVE retry fix.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 1

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread updates Outdated
@greptile-apps

greptile-apps Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Greptile Summary

This patch introduces targeted ERESOLVE fallback handling for global npm upgrades on both the Bash and PowerShell sides, and advances the release to 2.0.1. All other npm failures remain strict; only ERESOLVE on the first attempt triggers a --legacy-peer-deps retry.

  • Shell (updates): new run_npm_global_install captures npm stderr to a temp file, checks for ERESOLVE, emits a warning, replays the error output, then retries via the standard run wrapper with --legacy-peer-deps; dry-run and JSON-mode redirections are handled correctly.
  • PowerShell (updates-main.ps1): new Invoke-NpmGlobalInstall mirrors the same logic using Invoke-LoggedProcess (which buffers stdout+stderr in Output) for ERESOLVE detection, keeping parity with the shell implementation.
  • Tests: two CLI regression tests cover the success-with-retry and retry-also-fails paths; a matching Windows native test validates the cmd-stub flow; self-update fixtures are re-parameterised with symbolic version constants (SELF_UPDATE_CURRENT_TEST_VERSION / $previousReleaseVersion) to make future bumps a one-line change.

Confidence Score: 5/5

Safe to merge; the change is narrowly scoped to npm global installs and falls back to the existing strict failure path for anything other than ERESOLVE.

The ERESOLVE detection path is well-isolated: stderr is captured to a temp file, inspected, and replayed so nothing is silently swallowed. Dry-run and JSON-mode redirections are handled correctly. Both the Bash and PowerShell implementations follow the same logical structure, and the regression test suite covers the success-with-retry, retry-also-fails, and no-ERESOLVE paths on both platforms. Version metadata updates are consistent across all affected files.

No files require special attention.

Important Files Changed

Filename Overview
updates Adds run_npm_global_install helper that captures npm stderr, detects ERESOLVE, and retries with --legacy-peer-deps; version bumped to 2.0.1. Logic is correct across JSON and non-JSON modes.
updates-main.ps1 Adds Invoke-NpmGlobalInstall that mirrors the shell-side ERESOLVE detection using $installResult.Output -match 'ERESOLVE' (which covers both stdout+stderr); version bumped to 2.0.1.
tests/test_cli.sh Adds two ERESOLVE regression tests (success-with-retry and retry-also-fails) and converts self-update version literals to symbolic constants for maintainability.
tests/test_windows_native.ps1 Adds Windows ERESOLVE retry test, introduces $currentReleaseVersion/$previousReleaseVersion constants, and threads $script:UpdatesVersion = $previousReleaseVersion into self-update tests so they correctly simulate upgrading from 2.0.0 to 2.0.1.
tests/helpers/windows_test_lib.ps1 Default $Version parameter for Install-RepoWindowsRuntime bumped from 2.0.0 to 2.0.1 to track the current release.
install-windows.ps1 Default $Version parameter bumped to 2.0.1; no functional change to installer logic.
CHANGELOG.md Adds 2.0.1 release entry documenting the ERESOLVE fallback fix.
README.md Updates version references from 2.0.0 to 2.0.1 and relaxes contract language from pinned version to v2.0.x family.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[module_node / Invoke-ModuleNode] --> B{DRY_RUN?}
    B -- yes --> C[log DRY RUN and return 0]
    B -- no --> D[run ncu to get outdated packages]
    D --> E{packages empty?}
    E -- yes --> F[log up-to-date and return 0]
    E -- no --> G[run_npm_global_install / Invoke-NpmGlobalInstall]
    G --> H["npm install -g -- pkgs\n(stderr captured to temp log)"]
    H --> I{exit code 0?}
    I -- yes --> J[replay any captured warnings to stderr\nclean up temp file\nreturn 0]
    I -- no --> K{ERESOLVE in captured stderr?}
    K -- no --> L[replay stderr\nclean up temp file\nreturn npm exit code FAIL]
    K -- yes --> M["warn: retrying with --legacy-peer-deps\nreplay captured stderr\nclean up temp file"]
    M --> N["npm install -g --legacy-peer-deps -- pkgs\n(via run wrapper)"]
    N --> O{exit code 0?}
    O -- yes --> P[return 0 OK]
    O -- no --> Q[return exit code FAIL]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[module_node / Invoke-ModuleNode] --> B{DRY_RUN?}
    B -- yes --> C[log DRY RUN and return 0]
    B -- no --> D[run ncu to get outdated packages]
    D --> E{packages empty?}
    E -- yes --> F[log up-to-date and return 0]
    E -- no --> G[run_npm_global_install / Invoke-NpmGlobalInstall]
    G --> H["npm install -g -- pkgs\n(stderr captured to temp log)"]
    H --> I{exit code 0?}
    I -- yes --> J[replay any captured warnings to stderr\nclean up temp file\nreturn 0]
    I -- no --> K{ERESOLVE in captured stderr?}
    K -- no --> L[replay stderr\nclean up temp file\nreturn npm exit code FAIL]
    K -- yes --> M["warn: retrying with --legacy-peer-deps\nreplay captured stderr\nclean up temp file"]
    M --> N["npm install -g --legacy-peer-deps -- pkgs\n(via run wrapper)"]
    N --> O{exit code 0?}
    O -- yes --> P[return 0 OK]
    O -- no --> Q[return exit code FAIL]
Loading

Reviews (9): Last reviewed commit: "fix: retry npm peer resolution conflicts" | Re-trigger Greptile

Comment thread updates
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@amanthanvi, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 25 minutes and 14 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ec0097f1-8e14-4bbd-89fb-31ab603ad293

📥 Commits

Reviewing files that changed from the base of the PR and between f89da4e and a1fbd4e.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • README.md
  • install-windows.ps1
  • tests/helpers/windows_test_lib.ps1
  • tests/test_cli.sh
  • tests/test_windows_native.ps1
  • updates
  • updates-main.ps1
📝 Walkthrough

Walkthrough

Releases version 2.0.1 with a targeted fix: a new run_npm_global_install helper in the updates shell script captures npm stderr, detects ERESOLVE peer-dependency conflicts, and retries the global install with --legacy-peer-deps only in that case. The version is bumped in both updates and updates-main.ps1. Tests and documentation are updated to match.

Changes

npm ERESOLVE Retry Fix — v2.0.1

Layer / File(s) Summary
run_npm_global_install helper, call site, and version bumps
updates, updates-main.ps1
UPDATES_VERSION and $script:UpdatesVersion incremented to 2.0.1. New run_npm_global_install function added: redirects npm stderr to a temp file, replays it on failure, and retries with --legacy-peer-deps only when ERESOLVE is present. Direct npm install -g call in module_node replaced with this helper.
ERESOLVE retry test and updated self-update fixtures
tests/test_cli.sh
New test stubs npm to emit ERESOLVE on first call, then asserts the CLI retries with --legacy-peer-deps and that stderr contains the retry indicator. Five existing self-update scenario fixtures are bumped from earlier versions to 2.0.2 with aligned assertions.
Changelog and README version references
CHANGELOG.md, README.md
CHANGELOG.md gains a [2.0.1] Fixed entry describing the ERESOLVE-gated retry. README.md updates the release-contract statement to v2.0.x, bumps the Native Windows install example and self-update artifacts reference to v2.0.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 When npm throws a peer-dep fit,
I don't give up — not one little bit!
I peek at the error, spy ERESOLVE,
Then try again — now with --legacy, please!
Version bumped, tests green, docs aligned too,
This bunny keeps packages running for you. 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main technical change: implementing a retry mechanism for npm peer resolution conflicts.
Description check ✅ Passed The PR description comprehensively covers the summary, validation steps, and release plan, exceeding the template requirements with detailed technical context and thorough testing documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/npm-eresolve-fallback

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 and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f89da4e30b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread updates-main.ps1
Comment thread README.md
@amanthanvi
amanthanvi force-pushed the fix/npm-eresolve-fallback branch from f89da4e to 43d2e6d Compare June 17, 2026 05:31
@amanthanvi

Copy link
Copy Markdown
Owner Author

Addressed Sourcery feedback:

  • made the npm ERESOLVE regression stub tolerant of argument changes while still requiring the target package and excluding --legacy-peer-deps
  • added current/next self-update fixture constants for the Unix self-update tests

@coderabbitai review
@greptileai review
@sourcery-ai review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

@amanthanvi Thanks for addressing the Sourcery feedback! I'll kick off a fresh review of the updated changes now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== PR Details ==="
gh pr view 4 --repo amanthanvi/updates --json title,body,files,additions,deletions,commits

echo ""
echo "=== PR Diff ==="
gh pr diff 4 --repo amanthanvi/updates

Length of output: 16085



CodeRabbit Review — PR #4: fix: retry npm peer resolution conflicts

The approach is clean and targeted. A few items worth addressing:


🔴 Bug: Dry-run mode bypassed for the first npm install attempt

In run_npm_global_install(), the initial install is invoked directly rather than through run():

# Direct call — does NOT respect --dry-run
if [ "$JSON" -eq 1 ]; then
    npm install -g -- "$@" 1>&2 2>"$npm_err_log"
else
    npm install -g -- "$@" 2>"$npm_err_log"
fi

The retry path correctly uses run npm install -g --legacy-peer-deps -- "$@" (which goes through run() and honours --dry-run), but the first attempt will execute even when the user passes --dry-run. The function needs to check $DRY_RUN (or however run() signals it) before calling npm directly, or restructure so stderr can be captured through run().


🟡 Missing test: failed --legacy-peer-deps retry

The new regression test covers the happy path (ERESOLVE → retry succeeds). There is no coverage for the case where the retry with --legacy-peer-deps also fails. A test stub that fails on both the bare and --legacy-peer-deps invocations would confirm that the error is still propagated strictly (i.e. node END is not OK).


🟡 Stale v2.0.0 references in README.md

Two bullet points in the README were not updated alongside the rest of the version bump:

  • updates itself is distributed through GitHub Releases only. No third-party package manager channel is supported for updates in v2.0.0.
  • Self-update is fixed to the canonical GitHub repo amanthanvi/updates; UPDATES_SELF_UPDATE_REPO is removed in v2.0.0 and setting it is an error.

These should be v2.0.x (or left as historical notes with a clear "as of" qualifier) for consistency with the rest of the doc.


🟢 Everything else looks good

Item Status
ERESOLVE detection via grep on captured stderr ✅ Correct
Temp-file cleanup in all code paths ✅ Clean
mktemp portability (2>/dev/null || mktemp -t) ✅ Portable (Linux & macOS)
JSON-mode redirect (1>&2 2>"$npm_err_log") ✅ Intentional and correct
Self-update fixture version bumps (2.0.1 → 2.0.2) ✅ Consistent with new current version
Version string consistency (updates, updates-main.ps1, CHANGELOG, README) ✅
New ERESOLVE regression test assertions ✅ Correct
warn message matched by test grep ✅

The dry-run bypass is the only functional bug; the rest are test-coverage and doc hygiene.

✅ Action performed

Full review finished.

@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown

Greptile Summary

This patch introduces a targeted ERESOLVE fallback for npm install -g — the new run_npm_global_install helper captures npm's stderr, checks for ERESOLVE, and retries with --legacy-peer-deps only on that error code, leaving all other failures strict. The rest of the change is version metadata (Bash, PowerShell, README, CHANGELOG) advancing from 2.0.0 → 2.0.1 and test fixture targets advancing to 2.0.2.

  • The core logic in run_npm_global_install correctly implements the capture-and-retry flow; the ERESOLVE regression test covers the happy path.
  • The initial npm call bypasses the established run wrapper, relying on module_node's pre-existing DRY_RUN guard rather than internalising the check — inconsistent with every other module that calls run directly.
  • npm stderr is buffered to the tempfile before ERESOLVE is checked, so the user sees the raw error block before the "retrying" notice; reordering those two steps would improve clarity.

Confidence Score: 4/5

Safe to merge. The ERESOLVE retry logic is well-scoped and the test coverage for the new path is solid. The two noted concerns are style/convention issues, not correctness failures.

The run_npm_global_install function works correctly for all tested paths — the tempfile capture, ERESOLVE detection, retry, and mktemp-fallback are all sound. The bypass of the run wrapper for the initial call is a convention gap that is currently harmless because module_node guards DRY_RUN before the call site, but it creates a maintenance trap if a second caller is added without that guard. The stderr-before-retry ordering is cosmetic. Version metadata changes across all five files are consistent.

The updates shell script — specifically the new run_npm_global_install function — is the only area worth a close read before merging.

Important Files Changed

Filename Overview
updates Adds run_npm_global_install helper that captures npm stderr to a tempfile, detects ERESOLVE, and retries with --legacy-peer-deps; version bumped to 2.0.1. Two minor concerns: initial npm call bypasses the run wrapper (dry-run relies on module_node's guard), and stderr output ordering could be confusing.
tests/test_cli.sh Adds ERESOLVE retry regression test; bumps self-update fixture target versions from 2.0.1 → 2.0.2 to stay ahead of the new installed version (2.0.1). Logic is correct.
CHANGELOG.md Adds 2.0.1 entry documenting the ERESOLVE fallback fix. Correctly dated and formatted.
README.md Updates version references from 2.0.0 to 2.0.1 and switches the release contract line to v2.0.x. Historical 'removed in v2.0.0' notes are intentionally left unchanged.
updates-main.ps1 Single-line version bump from 2.0.0 to 2.0.1 to keep the PowerShell entry-point in sync.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[module_node] -->|DRY_RUN=1| B[log DRY RUN, return 0]
    A -->|DRY_RUN=0| C[ncu_run_json_upgraded]
    C -->|no upgrades| D[log up-to-date, return 0]
    C -->|upgrades found| E[run_npm_global_install packages]
    E --> F{mktemp succeeds?}
    F -->|no| G[run npm install -g via run wrapper]
    F -->|yes| H{JSON=1?}
    H -->|yes| I[npm install -g 1>&2 2>npm_err_log]
    H -->|no| J[npm install -g 2>npm_err_log]
    I --> K{status=0?}
    J --> K
    K -->|yes| L[rm tempfile, return 0]
    K -->|no| M{grep ERESOLVE in log?}
    M -->|no| N[emit stderr, rm tempfile, return status]
    M -->|yes| O[emit stderr, rm tempfile, warn retrying]
    O --> P[run npm install -g --legacy-peer-deps]
    P -->|success| Q[return 0]
    P -->|failure| R[return non-zero]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[module_node] -->|DRY_RUN=1| B[log DRY RUN, return 0]
    A -->|DRY_RUN=0| C[ncu_run_json_upgraded]
    C -->|no upgrades| D[log up-to-date, return 0]
    C -->|upgrades found| E[run_npm_global_install packages]
    E --> F{mktemp succeeds?}
    F -->|no| G[run npm install -g via run wrapper]
    F -->|yes| H{JSON=1?}
    H -->|yes| I[npm install -g 1>&2 2>npm_err_log]
    H -->|no| J[npm install -g 2>npm_err_log]
    I --> K{status=0?}
    J --> K
    K -->|yes| L[rm tempfile, return 0]
    K -->|no| M{grep ERESOLVE in log?}
    M -->|no| N[emit stderr, rm tempfile, return status]
    M -->|yes| O[emit stderr, rm tempfile, warn retrying]
    O --> P[run npm install -g --legacy-peer-deps]
    P -->|success| Q[return 0]
    P -->|failure| R[return non-zero]
Loading

Fix All in Codex Fix All in Claude Code Fix All in Cursor

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
updates:675-708
**`run_npm_global_install` bypasses the `run` wrapper for its first attempt**

The initial `npm install` call invokes `npm` directly instead of going through `run`, breaking the pattern every other module uses. `run` handles three things: debug logging (manually replicated here), `DRY_RUN` gating (currently covered by the guard in `module_node` at line 2630, but not enforced inside this function), and JSON-mode stdout routing (manually replicated). If `run_npm_global_install` is ever called from a second module or utility that doesn't first gate on `DRY_RUN`, real package installs will fire even under `--dry-run`.

### Issue 2 of 2
updates:683-686
**Stderr is silently buffered; ERESOLVE output appears before the retry notice**

Because `npm stderr` is captured to `$npm_err_log` and then replayed via `cat … >&2` before ERESOLVE is detected, the user always sees the raw npm error block first, followed by the "retrying with --legacy-peer-deps" warning. During a long install this also means all npm warnings are delayed until after npm exits. Consider printing the "retrying" notice before re-emitting the error block so the sequence reads: retry notice → buffered error, making it clearer that the failure was already handled.

Reviews (2): Last reviewed commit: "fix: retry npm peer resolution conflicts" | Re-trigger Greptile

Comment thread updates
Comment thread updates

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@updates`:
- Around line 675-708: In the run_npm_global_install function, the npm install
commands at lines 684-687 are called directly without using the run wrapper
function, which bypasses the DRY_RUN check. This causes actual npm installs to
execute even in dry-run mode. Fix this by wrapping the npm install -g commands
with the run function (similar to how line 702 correctly does this with the
legacy-peer-deps retry), ensuring that DRY_RUN mode is properly respected
throughout the function. The conditional logic for JSON output should be
preserved while ensuring the command goes through the run wrapper.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bcd52876-cb91-4941-9a4e-868fe8ea9171

📥 Commits

Reviewing files that changed from the base of the PR and between 4f821a5 and f89da4e.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • README.md
  • tests/test_cli.sh
  • updates
  • updates-main.ps1
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Greptile Review
🧰 Additional context used
📓 Path-based instructions (4)
**/updates

📄 CodeRabbit inference engine (AGENTS.md)

**/updates: Don't print success messages for failed commands in the updates script
Add new functionality as a module function (module_<name>()) and register it in is_module_known(), module_description(), list_modules(), and run_selected_modules()
Modules must be auto-detected and skip gracefully if the backing command is missing, unless --only is used (then missing deps are an error)
For --json contract: stdout must be JSONL-only; route human output to stderr
Keep UPDATES_VERSION in updates aligned with the latest release tag
Use config_set_bool for adding boolean config keys in the updates script

Files:

  • updates
**/CHANGELOG.md

📄 CodeRabbit inference engine (AGENTS.md)

Add a CHANGELOG.md entry for each release

Files:

  • CHANGELOG.md
**/*.sh

📄 CodeRabbit inference engine (AGENTS.md)

**/*.sh: Validate scripts using ./scripts/lint.sh which runs bash -n, shellcheck, and shfmt -d
Assume Bash 3.2 compatibility (macOS system Bash); avoid Bash 4+ features
Prefer --dry-run support for anything that might mutate state
Start every logical section with a triple-hash banner: ### SECTION: <name> — <description>

Files:

  • tests/test_cli.sh
**/tests/**/*.sh

📄 CodeRabbit inference engine (AGENTS.md)

**/tests/**/*.sh: Run tests via ./scripts/test.sh which executes ./tests/test_cli.sh
Keep output stable and easy to parse; prefer --no-emoji in tests

Files:

  • tests/test_cli.sh
🔇 Additional comments (13)
updates (2)

9-9: LGTM!


2666-2666: LGTM!

updates-main.ps1 (1)

22-22: LGTM!

tests/test_cli.sh (6)

748-763: LGTM!


778-789: LGTM!


803-812: LGTM!


829-841: LGTM!


857-866: LGTM!


936-956: LGTM!

CHANGELOG.md (1)

10-14: LGTM!

README.md (3)

5-5: LGTM!


32-35: LGTM!


159-159: LGTM!

Comment thread updates
@amanthanvi
amanthanvi force-pushed the fix/npm-eresolve-fallback branch from 43d2e6d to c4d524c Compare June 17, 2026 05:37
@amanthanvi

Copy link
Copy Markdown
Owner Author

Addressed follow-up review feedback:

  • preserved dry-run semantics before the captured npm install path
  • switched Bash npm stderr capture to an explicit mktemp template with XXXXXX
  • ported the ERESOLVE retry to the Windows payload
  • rebased Windows source-root fixtures to 2.0.1 while pinning self-update tests that intentionally start from 2.0.0
  • added Windows-native regression coverage for the npm ERESOLVE retry path

@codex review
@coderabbitai review
@greptileai review
@sourcery-ai review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Latest PR Diff ==="
gh pr diff 4 --repo amanthanvi/updates

echo ""
echo "=== PR Files Changed ==="
gh pr view 4 --repo amanthanvi/updates --json files

Length of output: 29965



@amanthanvi All the previous feedback has been addressed cleanly. Here's the updated assessment:

✅ Dry-run semantics — Fixed

The DRY_RUN guard is now the first thing in run_npm_global_install(), correctly delegating to run() for the dry-run path and only entering the stderr-capture branch for live runs.

✅ mktemp template — Fixed

mktemp "${tmp_base%/}/updates-npm.XXXXXX" with the explicit suffix template is correct on both Linux and macOS.

✅ Windows parity — Invoke-NpmGlobalInstall added

Clean port: uses Invoke-LoggedProcess consistently with the rest of the payload, and the Output -match 'ERESOLVE' check is validated by the new Windows regression test.

✅ Fixture version constants — Clean

$currentReleaseVersion/$previousReleaseVersion in test_windows_native.ps1 and SELF_UPDATE_CURRENT_TEST_VERSION/SELF_UPDATE_NEXT_TEST_VERSION in test_cli.sh are a clear improvement — self-update tests that intentionally start from 2.0.0 now use $previousReleaseVersion explicitly.

✅ Remaining v2.0.0 README references

The two surviving bullets ("No third-party package manager channel supported in v2.0.0" and "UPDATES_SELF_UPDATE_REPO is removed in v2.0.0") are historical "introduced/removed in" statements — leaving them at v2.0.0 is semantically correct, not stale.


🟡 Still open: no test for when the --legacy-peer-deps retry also fails

This was a yellow item from the last round and is still unaddressed. It's not blocking, but a single additional stub case (both bare and --legacy-peer-deps invocations fail) would confirm the error propagates and the module doesn't exit OK. Happy to leave it for a follow-up if you'd prefer to keep this PR focused.


Everything else looks good. The implementation is correct, portable, and well-tested on both Unix and Windows. The PR is ready to merge once you decide on that last test case.

[approve]

@amanthanvi
amanthanvi force-pushed the fix/npm-eresolve-fallback branch from c4d524c to 5e28607 Compare June 17, 2026 05:39
@amanthanvi

Copy link
Copy Markdown
Owner Author

Follow-up cleanup pushed:

  • added retry-failure coverage for ERESOLVE when --legacy-peer-deps also fails
  • moved the retry warning before the buffered npm ERESOLVE block for clearer output ordering
  • clarified README v2.0.0 references as historical Since v2.0.0 notes and changed current Windows module wording to v2.0.x

@codex review
@coderabbitai review
@greptileai review
@sourcery-ai review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Latest PR Diff ==="
gh pr diff 4 --repo amanthanvi/updates

Length of output: 31429



@amanthanvi All three items from the previous round are fully addressed. Here's the final check:

Item Status
Retry-failure coverage (ERESOLVE when --legacy-peer-deps also fails) ✅ test_cli.sh — stubs npm to always ERESOLVE, asserts non-zero exit and node END (FAIL), both call-log entries verified
Warning before buffered stderr in run_npm_global_install ✅ warn emitted before cat "$npm_err_log" >&2 in ERESOLVE branch
README v2.0.0 historical note cleanup ✅ Both bullets rewritten as Since v2.0.0, …; Windows default-on modules line → v2.0.x
$previousReleaseVersion / $currentReleaseVersion constants in Windows tests ✅ All self-update Windows fixtures that intentionally start from 2.0.0 now use the named constant
SELF_UPDATE_CURRENT_TEST_VERSION / SELF_UPDATE_NEXT_TEST_VERSION in test_cli.sh ✅ All self-update fixture calls and version assertions use the named constants

The implementation is correct, portable, and well-covered on both Unix and Windows. This is ready to merge. 🎉

[approve]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e28607142

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test_windows_native.ps1
@amanthanvi
amanthanvi force-pushed the fix/npm-eresolve-fallback branch from 5e28607 to 85028c2 Compare June 17, 2026 05:46
@amanthanvi

Copy link
Copy Markdown
Owner Author

Addressed Codex Windows self-update test finding:

  • self-update simulations now set $script:UpdatesVersion to $previousReleaseVersion after dot-sourcing the repo payload, so mocked 2.0.1 releases are treated as newer than the running payload
  • reran ./scripts/test.sh, ./scripts/lint.sh, git diff --check, and release artifact build/verify

@codex review
@coderabbitai review
@greptileai review
@sourcery-ai review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Latest PR Diff ==="
gh pr diff 4 --repo amanthanvi/updates

echo ""
echo "=== PR Status ==="
gh pr view 4 --repo amanthanvi/updates --json state,mergeable,reviews,commits

Length of output: 48494



@amanthanvi The Codex Windows self-update fix is clean and complete. Here's the final check:

Item Status
$script:UpdatesVersion = $previousReleaseVersion set after . $payloadSource in all 8 self-update blocks ✅
Install-RepoWindowsRuntime -Version $previousReleaseVersion used for all self-update test setups ✅
$currentReleaseVersion / $previousReleaseVersion constants drive all version references in test_windows_native.ps1 ✅
windows_test_lib.ps1 default version bumped to 2.0.1 (non-self-update installs) ✅
All previously flagged items (dry-run guard, mktemp template, Windows parity, retry-failure coverage, README, warning ordering) ✅ Already resolved

Everything looks correct. The PR is ready to merge. 🎉

[approve]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85028c2e26

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/helpers/windows_test_lib.ps1
@amanthanvi
amanthanvi force-pushed the fix/npm-eresolve-fallback branch from 85028c2 to f1fd791 Compare June 17, 2026 05:55
@amanthanvi

Copy link
Copy Markdown
Owner Author

Addressed the Codex installer-default finding:

  • bumped production install-windows.ps1 default Version to 2.0.1
  • changed the Windows source-root installer test to omit -Version so it exercises the default path
  • reran validation:
    • ./scripts/test.sh
    • ./scripts/lint.sh
    • git diff --check
    • bash ./scripts/release-build.sh 2.0.1
    • bash ./scripts/release-verify-dist.sh 2.0.1

Local pwsh is not installed on this machine, so Windows-native PowerShell tests were not runnable locally.

@codex review
@coderabbitai review
@greptileai review
@sourcery-ai review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Latest PR Diff ==="
gh pr diff 4 --repo amanthanvi/updates

echo ""
echo "=== PR Status ==="
gh pr view 4 --repo amanthanvi/updates --json state,mergeable,reviews,commits

Length of output: 49743



@amanthanvi The Codex installer-default finding is fully addressed. Here's the final check:

Item Status
install-windows.ps1 default $Version bumped to '2.0.1' ✅
windows_test_lib.ps1 Install-RepoWindowsRuntime default $Version bumped to '2.0.1' ✅
Windows source-root installer test omits -Version (exercises the default path) ✅
Installer test assertions switched to $currentReleaseVersion ✅
All previously verified items (dry-run guard, mktemp template, Windows parity, retry-failure coverage, README Since v2.0.0 notes, warning ordering, $previousReleaseVersion in self-update blocks) ✅ Already resolved

The implementation is correct, portable, and well-covered on both Unix and Windows. This PR is ready to merge. 🎉

[approve]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1fd791f63

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread updates-main.ps1
@amanthanvi
amanthanvi force-pushed the fix/npm-eresolve-fallback branch from f1fd791 to a1fbd4e Compare June 17, 2026 06:04
@amanthanvi

Copy link
Copy Markdown
Owner Author

Addressed the late Codex Windows launcher fixture finding:

  • changed the launcher fixture to install the current repo payload under instead of
  • changed the pointer and assertion to use
  • reran validation:
    • ./scripts/test.sh
    • ./scripts/lint.sh
    • git diff --check
    • bash ./scripts/release-build.sh 2.0.1
    • bash ./scripts/release-verify-dist.sh 2.0.1

Local pwsh is not installed on this machine, so Windows-native PowerShell tests were not runnable locally.

@codex review
@coderabbitai review
@greptileai review
@sourcery-ai review

@amanthanvi

Copy link
Copy Markdown
Owner Author

Correction to the previous comment: shell quoting stripped two inline literals before posting.

Addressed the late Codex Windows launcher fixture finding:

  • changed the updates.cmd --version launcher fixture to install the current repo payload under $currentReleaseVersion instead of 2.0.0
  • changed the pointer and assertion to use $currentReleaseVersion
  • reran validation:
    • ./scripts/test.sh
    • ./scripts/lint.sh
    • git diff --check
    • bash ./scripts/release-build.sh 2.0.1
    • bash ./scripts/release-verify-dist.sh 2.0.1

Local pwsh is not installed on this machine, so Windows-native PowerShell tests were not runnable locally.

@codex review
@coderabbitai review
@greptileai review
@sourcery-ai review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Latest PR Diff ==="
gh pr diff 4 --repo amanthanvi/updates

echo ""
echo "=== PR Status ==="
gh pr view 4 --repo amanthanvi/updates --json state,mergeable,reviews,commits

Length of output: 52120



@amanthanvi The Windows launcher fixture fix is clean and complete. Here's the final check:

Item Status
updates.cmd --version launcher test uses $currentReleaseVersion for New-VersionedPayload and Set-VersionPointers ✅
Installer test omits -Version (exercises the '2.0.1' default path), assertions use $currentReleaseVersion ✅
All 8 self-update blocks pass -Version $previousReleaseVersion to Install-RepoWindowsRuntime and set $script:UpdatesVersion = $previousReleaseVersion ✅
windows_test_lib.ps1 Install-RepoWindowsRuntime default $Version → '2.0.1' ✅
All previously verified items (dry-run guard, mktemp template, Windows parity, retry-failure coverage, README Since v2.0.0 notes, warning ordering, Unix self-update constants) ✅ Already resolved

The implementation is correct, portable, and thoroughly covered on both Unix and Windows. This PR is ready to merge. 🎉

[approve]

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Latest PR Diff ==="
gh pr diff 4 --repo amanthanvi/updates

echo ""
echo "=== PR Status ==="
gh pr view 4 --repo amanthanvi/updates --json state,mergeable,reviews,commits

Length of output: 52120



@amanthanvi The Windows launcher fixture fix is clean and complete. Here's the final verification:

Item Status
updates.cmd --version fixture: New-VersionedPayload/Set-VersionPointers use $currentReleaseVersion ✅
updates.cmd --version assertion uses $currentReleaseVersion ✅
Source-root installer test omits -Version (exercises install-windows.ps1 default 2.0.1) ✅
All installer assertions switched to $currentReleaseVersion ✅
All 8 self-update blocks: Install-RepoWindowsRuntime -Version $previousReleaseVersion + $script:UpdatesVersion = $previousReleaseVersion ✅
All previously verified items (dry-run guard, mktemp template, Windows Invoke-NpmGlobalInstall, retry-failure coverage, README Since v2.0.0 notes, warning ordering, Unix SELF_UPDATE_CURRENT/NEXT_TEST_VERSION constants) ✅ Already resolved

Every item from every review round is addressed. The implementation is correct, portable, and thoroughly covered on both Unix and Windows. This PR is ready to merge. 🎉

[approve]

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a1fbd4e85c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@amanthanvi
amanthanvi merged commit eb2e887 into main Jun 17, 2026
4 checks passed
@amanthanvi
amanthanvi deleted the fix/npm-eresolve-fallback branch June 17, 2026 06:19
@coderabbitai coderabbitai Bot mentioned this pull request Jul 12, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 26, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants