Skip to content

fix(doctor): resolve Android runtime versions from pnpm catalogs - #6212

Open
aleclarson wants to merge 1 commit into
NativeScript:mainfrom
aleclarson:fix/doctor-android-runtime-catalog
Open

aleclarson wants to merge 1 commit into
NativeScript:mainfrom
aleclarson:fix/doctor-android-runtime-catalog

Conversation

@aleclarson

@aleclarson aleclarson commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

PR Checklist

  • The PR title follows the repository convention.
  • There is a linked issue.
  • CLA status confirmed.
  • Doctor's test suite passes.
  • Regression tests are included.

What is the current behavior?

An app that pins @nativescript/android with catalog: or catalog:mobile can install its runtime successfully, then fail the Android toolchain check. Doctor treats the literal catalog specifier as an npm dist-tag and reports that the Android runtime version is invalid.

What is the new behavior?

Doctor reads the installed runtime version for catalog specifiers using the same lookup as tarball installs. Registry versions and dist-tags use the existing paths.

Validation

npm test in packages/doctor passed all 89 tests. The two new cases create an installed runtime with a fixed version and verify that Doctor selects its supported targets without a dist-tag lookup.

Summary by CodeRabbit

  • Bug Fixes
    • Android projects that specify the runtime dependency using catalog: versions now have their installed runtime version recognized when determining supported Android targets.
    • This also applies to named catalog entries, helping ensure the supported targets reflect the runtime installed in the project.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Android runtime metadata lookup now resolves installed package metadata when the dependency version starts with catalog:. Tests cover catalog: and catalog:mobile specifiers.

Changes: Android Runtime Resolution

Layer / File(s) Summary
Resolve catalog runtime versions
packages/doctor/src/android-tools-info.ts, packages/doctor/test/android-tools-info.ts
The metadata lookup now includes dependency versions starting with catalog:. Tests verify that both catalog specifiers resolve to android-30 and do not query npm dist tags.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: rigor789, edusperoni

Merge Risk: Minimal · up to 7da94

Doctor now reads the installed Android runtime version when the app pins it with a pnpm catalog specifier, so it no longer reports an invalid runtime version. Other version formats take the same paths as before. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the actual change: Doctor's Android runtime version lookup now handles pnpm catalog specifiers. The raw summary says the lookup now resolves installed package metadata when the version…
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.
Full details: Title check

Explanation

The title names the actual change: Doctor's Android runtime version lookup now handles pnpm catalog specifiers. The raw summary says the lookup now resolves installed package metadata when the version starts with catalog:, and the objectives describe the same fix for catalog: and catalog:mobile. The title uses the conventional fix(doctor): prefix and is specific, so it is a clear match for the main change.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the runtime trail,
Catalog tags now help it prevail.
It finds the installed version in place,
Then checks the target with care and grace.
No npm tags cross its way;
The rabbit hops along its day.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b4c4593d-b84e-4dae-96d7-1f98492f7cae
Commits

Reviewing files that changed from the base of the PR and between 8a55b3e and 7da94fd.

Files selected for processing: 2

  • packages/doctor/src/android-tools-info.ts
  • packages/doctor/test/android-tools-info.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

This branch has not been deployed

No deployments
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.

1 participant