[release/13.3] Fix Python starter TypeScript health check build#16647
[release/13.3] Fix Python starter TypeScript health check build#16647joperezr merged 6 commits intorelease/13.3from
Conversation
Update the Python starter TypeScript AppHost to use the supported withHttpHealthCheck options object and align its root build script with AppHost-only type checking. Add E2E coverage that verifies the generated starter builds successfully. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the Python React template E2E build verification to use the existing fail-fast command helper so npm build failures are surfaced immediately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 -- 16647Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16647" |
There was a problem hiding this comment.
This is outside your change - but why is this file named tsconfig.json when the TypeScript template names it tsconfig.apphost.json?
| languageOptions: { | ||
| parserOptions: { | ||
| projectService: true, | ||
| project: './tsconfig.apphost.json', |
There was a problem hiding this comment.
This is different than the python template. Is that intentional?
There was a problem hiding this comment.
It feels like python and ts should drop the exact same apphost files, unless there is a specific reason not to.
There was a problem hiding this comment.
Instead of adapting I should have aligned the two, doing it now, but on the main branch first
There was a problem hiding this comment.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Backports fixes to the release/13.3 branch to ensure TypeScript AppHost projects generated by templates (notably the Python starter) build and lint correctly with the current TypeScript SDK and ESLint configuration.
Changes:
- Updates TypeScript AppHost scaffolding and template ESLint configuration to explicitly target
tsconfig.apphost.json(avoids traversing unrelated TS sources). - Adds “wrapper” root npm scripts (
build,lint,dev, etc.) for greenfield TypeScript AppHost projects to makenpm run build/npm run lintbehave as expected. - Strengthens CLI E2E coverage by verifying
npm run buildsucceeds for TypeScript-based AppHost templates, and fixes the Python starter’s TypeScript health check callsite.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/TypeScriptLanguageSupportTests.cs | Updates expectations for newly scaffolded package.json scripts and validates ESLint config targets tsconfig.apphost.json. |
| tests/Aspire.Cli.EndToEnd.Tests/TypeScriptStarterTemplateTests.cs | Adds npm run build verification for the TypeScript starter template before starting the app. |
| tests/Aspire.Cli.EndToEnd.Tests/TypeScriptEmptyAppHostTemplateTests.cs | Adds npm run build verification for the empty TypeScript AppHost template. |
| tests/Aspire.Cli.EndToEnd.Tests/PythonReactTemplateTests.cs | Adds npm run build verification for the Python/React (TypeScript AppHost) template. |
| src/Aspire.Hosting.CodeGeneration.TypeScript/TypeScriptLanguageSupport.cs | Switches ESLint parser options to a dedicated AppHost tsconfig and adds greenfield-friendly root npm script aliases. |
| src/Aspire.Cli/Templating/Templates/ts-starter/eslint.config.mjs | Aligns ESLint config to lint using tsconfig.apphost.json and an explicit root dir. |
| src/Aspire.Cli/Templating/Templates/py-starter/tsconfig.json | Removes the old root tsconfig.json that no longer matches the intended AppHost compilation flow. |
| src/Aspire.Cli/Templating/Templates/py-starter/tsconfig.apphost.json | Adds a dedicated AppHost tsconfig matching the CLI scaffolding approach. |
| src/Aspire.Cli/Templating/Templates/py-starter/package.json | Renames AppHost scripts under aspire:* and adds root wrappers so npm run build/npm run lint work. |
| src/Aspire.Cli/Templating/Templates/py-starter/eslint.config.mjs | Aligns ESLint config to lint using tsconfig.apphost.json and an explicit root dir. |
| src/Aspire.Cli/Templating/Templates/py-starter/apphost.ts | Updates to the supported withHttpHealthCheck({ path }) call pattern. |
|
🎬 CLI E2E Test Recordings — 66 recordings uploaded (commit View all recordings
📹 Recordings uploaded automatically from CI run #25226700754 |
joperezr
left a comment
There was a problem hiding this comment.
Change is minimal, fixing real customer-facing bugs. Looks good to go.
|
No documentation PR is required for this change. This is a bug fix backport that corrects template build issues (broken TypeScript health check method call and ESLint config) in the Python starter and TypeScript AppHost templates. It restores expected behavior without introducing new APIs, features, or configuration options that would require documentation updates.
|
Backport of #16625 to release/13.3
/cc @sebastienros
Customer Impact
Python starter template doesn't build (uses old health check method).
TypeScript empty AppHost template fails linting when called explicitly.
Testing
Added build verification for all typescript apphost based templates
Risk
Low
Regression?
From previous release