Skip to content

Reorder npm diagnostic checks: project-specific before environment#140

Merged
dermatz merged 2 commits intofeature-magento-default-checksfrom
copilot/sub-pr-139
Feb 16, 2026
Merged

Reorder npm diagnostic checks: project-specific before environment#140
dermatz merged 2 commits intofeature-magento-default-checksfrom
copilot/sub-pr-139

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Addresses feedback from PR #139 to improve diagnostic check ordering in NodePackageManager::diagnoseAndReportNpmFailure().

Changes

  • Reordered diagnostic checks to run package.json validation first, before npm/node availability checks
  • Updated check numbering in comments to reflect new order

Rationale

Sequential early-return diagnostics should check project-specific issues before environment issues:

Before:

  1. npm availability
  2. node availability
  3. package.json validity

After:

  1. package.json validity (quickest, most specific)
  2. npm availability
  3. node availability

This prevents the inefficient troubleshooting loop where users fix npm installation → re-run → then discover invalid package.json.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 16, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/magento/magento-coding-standard/zipball/f24dd98f46a98cd7081e4648b19299c27db35264
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/5HkWVT /usr/bin/composer create-project magento/magento-coding-standard --stability=dev /tmp/magento-coding-standard (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Address feedback on npm failure diagnostics improvement PR Reorder npm diagnostic checks: project-specific before environment Feb 16, 2026
Copilot AI requested a review from dermatz February 16, 2026 21:31
@dermatz dermatz marked this pull request as ready for review February 16, 2026 21:32
Copilot AI review requested due to automatic review settings February 16, 2026 21:32
@dermatz dermatz enabled auto-merge (squash) February 16, 2026 21:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates MageForge’s npm-install failure diagnostics to prioritize project-specific validation before environment checks, improving troubleshooting flow in NodePackageManager::diagnoseAndReportNpmFailure().

Changes:

  • Moved package.json validity checking to the top of the diagnostic sequence (early return).
  • Shifted npm/node availability checks to run after package.json validation.
  • Renumbered the “Check N:” comments to match the new order.

@dermatz dermatz disabled auto-merge February 16, 2026 21:36
@dermatz dermatz merged commit cbe15cc into feature-magento-default-checks Feb 16, 2026
9 checks passed
@dermatz dermatz deleted the copilot/sub-pr-139 branch February 16, 2026 21:38
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

Comments