fix: Normalize terminology in sample updates#1397
Conversation
There was a problem hiding this comment.
Pull request overview
This PR centralizes terminology normalization (e.g., replacing “.NET Aspire” and “app host”) into a shared helper and applies it during data generation to keep samples.json and integration metadata consistent going forward, addressing the regression noted in #1393.
Changes:
- Introduces
normalizeAspireTerminology()and reuses it across generators. - Normalizes sample titles/descriptions/README text/AppHost code during
update-samplesgeneration and makes the script safe to import in tests by guarding themain()entrypoint. - Updates integration description normalization to use the shared helper and adds unit coverage (including asserting existing
samples.jsonhas no deprecated terms).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/tests/unit/update-samples.vitest.test.ts | Adds unit tests for sample terminology normalization and validates generated samples.json is clean. |
| src/frontend/src/utils/samples.ts | Updates documentation comment to reflect that readmeRaw is terminology-normalized upstream content. |
| src/frontend/scripts/update-samples.ts | Centralizes sample field normalization and guards main() so the module can be imported safely. |
| src/frontend/scripts/update-integrations.ts | Replaces ad-hoc regex normalization with the shared terminology helper. |
| src/frontend/scripts/aspire-terminology.ts | Adds a shared terminology normalizer used by generator scripts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: febf329c-97d8-41aa-bd42-43273bc57fe7
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: febf329c-97d8-41aa-bd42-43273bc57fe7
9bbb307 to
ec1ec43
Compare
Summary
samples.json.NET Aspireorapp hostThis fixes the sample-update regression visible in #1393.
Tests
pnpm --dir ./src/frontend exec vitest run --config vitest.config.ts tests/unit/update-samples.vitest.test.ts tests/unit/update-integrations.vitest.test.tssamples.jsoncontent from chore: Update integration data and GitHub stats (7/23/26) #1393 through the normalizer (8 deprecated occurrences reduced to 0)