microsoft / microsoft/aspire

Add `-InstallMode Npm` to get-aspire-cli-pr scripts

Open
#17,761 1 comment 0 reactions 0 assignees View on GitHub
area-cli triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

**Summary**

`get-aspire-cli-pr.sh` / `get-aspire-cli-pr.ps1` support `-InstallMode Archive | Tool | WinGet | Homebrew` today. With #17297 shipping npm as a first-class production install route, the PR installer scripts should gain `-InstallMode Npm` so contributors can dogfood the npm path from a PR without local builds or manual artifact wrangling.

**Background**

`.github/workflows/build-cli-native-archives.yml` already uploads `microsoft-aspire-cli*.tgz` artifacts for every PR build (lines ~153-160 of the workflow upload step). The install sequence is already specified and tested in `eng/pipelines/templates/prepare-npm-cli-packages.yml`: install the matching RID-specific tarball first, then install the pointer tarball with `--omit=optional --offline` so npm doesn't try to resolve the pre-publish version from the public registry.

**Acceptance criteria**

- `get-aspire-cli-pr.{sh,ps1} -InstallMode Npm` installs the npm pointer + matching RID-specific package for the host platform from the PR's CI artifacts.
- The host's detected RID is the one fetched (or `--Architecture` / `--OS` overrides apply where it makes sense; mirror the existing PR-mode parity rules).
- `aspire --version` after install returns the PR's CLI version.
- Same `--Force` / `--InstallPath` / `--WhatIf` parity as the existing modes.

**Out of scope**

- Changing how the npm tarballs are produced (already covered by #17297).
- Hosted npm dogfood feed (the PR-installer downloads tarballs straight from the GH Actions artifact bundle; no registry involved).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.