Skip to content

Align TypeScript validation with package manager markers#17419

Merged
sebastienros merged 1 commit into
mainfrom
sebastienros/sebros-typescript-package-manager-valida
May 25, 2026
Merged

Align TypeScript validation with package manager markers#17419
sebastienros merged 1 commit into
mainfrom
sebastienros/sebros-typescript-package-manager-valida

Conversation

@sebastienros
Copy link
Copy Markdown
Contributor

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.sh
  • JSON parsing for the dedicated fixture package.json, aspire.config.json, and tsconfig.json files
  • marker-resolution checks for npm, pnpm, Yarn, Bun, and existing npm lock-file fallback fixtures
  • package-manager install checks for all four dedicated fixtures
  • docker build -f .github/workflows/polyglot-validation/Dockerfile.typescript -t polyglot-typescript-validation-test .github/workflows/polyglot-validation

The full local aspire restore pass was blocked by an existing Aspire.Dashboard IDE0200 analyzer error while building the generated AppHost server.

Fixes: #17034

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 22:06
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17419

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17419"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to 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.typescript to 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

@github-actions
Copy link
Copy Markdown
Contributor

CLI E2E Tests unknown — 96 passed, 0 failed, 5 unknown (commit c82c518)

View all recordings
Status Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View recording
AddPackageWhileAppHostRunningDetached ▶️ View recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View recording
AgentInitCommand_DefaultSelection_InstallsDefaultSkills ▶️ View recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View recording
AgentMcpListStructuredLogsFromStarterAppCore ▶️ View recording
AllPublishMethodsBuildDockerImages ▶️ View recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View recording
AspireInitSingleFileAppHostRunsViaDotnetRunAppHost ▶️ View recording
AspireInitWithExistingAppHostDirRecreatesMissingNuGetConfigAndPreservesFiles ▶️ View recording
AspireInitWithSolutionFileGeneratesAppHostThatBuildsAgainstChannelHive ▶️ View recording
AspireStartUpdatesStaleTypeScriptAppHostPath ▶️ View recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View recording
AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent ▶️ View recording
Banner_DisplayedOnFirstRun ▶️ View recording
Banner_DisplayedWithExplicitFlag ▶️ View recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View recording
CertificatesClean_RemovesCertificates ▶️ View recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View recording
CreateAndRunAspireStarterProject ▶️ View recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View recording
CreateAndRunEmptyAppHostProject ▶️ View recording
CreateAndRunJavaEmptyAppHostProject ▶️ View recording
CreateAndRunJsReactProject ▶️ View recording
CreateAndRunPythonReactProject ▶️ View recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View recording
CreateAndRunTypeScriptStarterProject ▶️ View recording
CreateJavaAppHostWithViteApp ▶️ View recording
CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain ▶️ View recording
DashboardRunWithAgentMcpCore ▶️ View recording
DashboardRunWithOtelTracesReturnsNoTracesCore ▶️ View recording
DeployK8sBasicApiService ▶️ View recording
DeployK8sWithExternalHelmChart ▶️ View recording
DeployK8sWithGarnet ▶️ View recording
DeployK8sWithMongoDB ▶️ View recording
DeployK8sWithMySql ▶️ View recording
DeployK8sWithPostgres ▶️ View recording
DeployK8sWithRabbitMQ ▶️ View recording
DeployK8sWithRedis ▶️ View recording
DeployK8sWithSqlServer ▶️ View recording
DeployK8sWithValkey ▶️ View recording
DeployTypeScriptAppToKubernetes ▶️ View recording
DescribeCommandResolvesReplicaNames ▶️ View recording
DescribeCommandShowsRunningResources ▶️ View recording
DetachFormatJsonProducesValidJson ▶️ View recording
DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance ▶️ View recording
DoListStepsShowsPipelineSteps ▶️ View recording
DocsCommand_RendersInteractiveMarkdownFromLocalSource ▶️ View recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View recording
DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain ▶️ View recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View recording
GeneratedAspireDevScript_StartsWatchMode_WithConfiguredToolchain ▶️ View recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View recording
GlobalMigration_PreservesAllValueTypes ▶️ View recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View recording
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View recording
InteractiveCSharpInitCreatesExpectedFiles ▶️ View recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View recording
JavaScriptHostingApisRunFromTypeScriptAppHost ▶️ View recording
LatestCliCanStartStableChannelAppHost ▶️ View recording
LatestCliCanStartStableChannelTypeScriptAppHost ▶️ View recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View recording
LogLevelTrace_ProducesTraceEntriesInCliLogFile ▶️ View recording
LogsCommandShowsResourceLogs ▶️ View recording
OtelLogsReturnsStructuredLogsFromStarterApp ▶️ View recording
OtelLogsReturnsStructuredLogsFromStarterAppIsolated ▶️ View recording
PsCommandListsRunningAppHost ▶️ View recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View recording
PublishJavaScriptPatternsGeneratesExpectedDockerComposeArtifacts ▶️ View recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View recording
PublishWithoutOutputPathUsesAppHostDirectoryDefault ▶️ View recording
ResourceCommand_FailedExecution_DisplaysAppHostLogPathAndLogContainsEntries ▶️ View recording
ResourceCommand_FailsWhenInteractionServiceIsRequired ▶️ View recording
ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput ▶️ View recording
RestoreGeneratesSdkFiles ▶️ View recording
RestoreGeneratesSdkFiles_WithConfiguredToolchain ▶️ View recording
RestoreRefreshesGeneratedSdkAfterAddingIntegration ▶️ View recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View recording
RunPublishFailureScenarioAsync ▶️ View recording
RunReportsSyntaxErrorsForDotNetAppHost ▶️ View recording
RunReportsSyntaxErrorsForTypeScriptAppHost ▶️ View recording
SecretCrudOnDotNetAppHost ▶️ View recording
SecretCrudOnTypeScriptAppHost ▶️ View recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View recording
StartReportsSyntaxErrorsForDotNetAppHost ▶️ View recording
StartReportsSyntaxErrorsForTypeScriptAppHost ▶️ View recording
StopAllAppHostsFromAppHostDirectory ▶️ View recording
StopJavaPolyglotAppHostUsingApphostDirectory ▶️ View recording
StopNonInteractiveSingleAppHost ▶️ View recording
StopTypeScriptPolyglotAppHostUsingApphostDirectory ▶️ View recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View recording
UpdateProjectChannelToStable_TypeScript_PicksUpStablePackages ▶️ View recording

📹 Recordings uploaded automatically from CI run #26344784986

@sebastienros sebastienros merged commit 006edf7 into main May 25, 2026
617 of 621 checks passed
@github-actions github-actions Bot added this to the 13.4 milestone May 25, 2026
@aspire-repo-bot
Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

docs_optional → build_or_ci_only

No triggered signals (signal_count == 0); advisory only_test_or_build_changes is true.

All 23 changed files are under .github/workflows/polyglot-validation/ (CI shell scripts, a Dockerfile.typescript, and TypeScript fixture package.json/tsconfig.json/aspire.config.json files). No source code, public API, CLI commands, dashboard pages, or integration packages were modified. No documentation update is needed.

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.

Align TypeScript polyglot validation with package-manager markers

3 participants