Align TypeScript validation with package manager markers#17419
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17419Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17419" |
There was a problem hiding this comment.
Pull request overview
This PR updates the TypeScript polyglot validation workflow to honor per-fixture package manager markers (via packageManager and lock/config marker files) instead of always running npm install/npx tsc. It adds dedicated TypeScript validation fixtures for npm, pnpm, Yarn 4+, and Bun, and updates the TypeScript validation container image to include the necessary package managers.
Changes:
- Update
test-typescript-playground.shto detect the intended package manager per fixture and run the matching install + typecheck commands. - Add dedicated TypeScript validation AppHosts/fixtures for npm, pnpm, Yarn 4+, and Bun (including their lock/config marker files).
- Update
Dockerfile.typescriptto enable Corepack-managed pnpm/Yarn and install Bun so CI can validate all new fixtures.
Reviewed changes
Copilot reviewed 19 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Yarn/TypeScript/yarn.lock | Adds Yarn 4+ lockfile marker for the Yarn validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Yarn/TypeScript/tsconfig.json | TypeScript compiler configuration for the Yarn validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Yarn/TypeScript/package.json | Defines Yarn fixture dependencies and packageManager marker. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Yarn/TypeScript/aspire.config.json | Configures the Yarn TypeScript AppHost for aspire restore. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Yarn/TypeScript/apphost.mts | Minimal Yarn-marked TypeScript AppHost used for validation. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Yarn/TypeScript/.yarnrc.yml | Adds Yarn config marker for the Yarn validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Pnpm/TypeScript/tsconfig.json | TypeScript compiler configuration for the pnpm validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Pnpm/TypeScript/pnpm-lock.yaml | Adds pnpm lockfile marker for the pnpm validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Pnpm/TypeScript/package.json | Defines pnpm fixture dependencies and packageManager marker. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Pnpm/TypeScript/aspire.config.json | Configures the pnpm TypeScript AppHost for aspire restore. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Pnpm/TypeScript/apphost.mts | Minimal pnpm-marked TypeScript AppHost used for validation. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Npm/TypeScript/tsconfig.json | TypeScript compiler configuration for the npm validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Npm/TypeScript/package.json | Defines npm fixture dependencies and packageManager marker. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Npm/TypeScript/package-lock.json | Adds npm lockfile marker for the npm validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Npm/TypeScript/aspire.config.json | Configures the npm TypeScript AppHost for aspire restore. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Npm/TypeScript/apphost.mts | Minimal npm-marked TypeScript AppHost used for validation. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Bun/TypeScript/tsconfig.json | TypeScript compiler configuration for the Bun validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Bun/TypeScript/package.json | Defines Bun fixture dependencies and packageManager marker. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Bun/TypeScript/bun.lock | Adds Bun lockfile marker for the Bun validation fixture. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Bun/TypeScript/aspire.config.json | Configures the Bun TypeScript AppHost for aspire restore. |
| tests/PolyglotAppHosts/TypeScript.PackageManagers.Bun/TypeScript/apphost.mts | Minimal Bun-marked TypeScript AppHost used for validation. |
| .github/workflows/polyglot-validation/test-typescript-playground.sh | Resolves package manager markers per fixture and runs matching install/typecheck commands. |
| .github/workflows/polyglot-validation/Dockerfile.typescript | Ensures pnpm/Yarn (Corepack) and Bun are available in the validation image. |
Files not reviewed (2)
- tests/PolyglotAppHosts/TypeScript.PackageManagers.Npm/TypeScript/package-lock.json: Language not supported
- tests/PolyglotAppHosts/TypeScript.PackageManagers.Pnpm/TypeScript/pnpm-lock.yaml: Language not supported
|
❓ CLI E2E Tests unknown — 96 passed, 0 failed, 5 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26344784986 |
|
✅ No documentation update needed. docs_optional → No triggered signals ( All 23 changed files are under |
Description
TypeScript polyglot validation currently installs and type-checks every checked-in AppHost with npm, which means the package-manager marker behavior used by TypeScript AppHosts is not covered by the validation workflow.
This updates the TypeScript polyglot validation script to resolve the intended package manager from each fixture's markers and run the matching install and type-check commands. It also adds dedicated TypeScript validation AppHosts for npm, pnpm, Yarn 4, and Bun so marker-based behavior is covered without changing the existing integration-specific fixtures.
The TypeScript validation image now enables Corepack-managed pnpm/Yarn and installs Bun so the new dedicated fixtures can run in CI.
Validation:
bash -n .github/workflows/polyglot-validation/test-typescript-playground.shpackage.json,aspire.config.json, andtsconfig.jsonfilesdocker build -f .github/workflows/polyglot-validation/Dockerfile.typescript -t polyglot-typescript-validation-test .github/workflows/polyglot-validationThe full local
aspire restorepass was blocked by an existingAspire.DashboardIDE0200 analyzer error while building the generated AppHost server.Fixes: #17034
Checklist
<remarks />and<code />elements on your triple slash comments?