Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 27, 2025

npm support (AddNpmApp, AddViteApp, WithNpmPackageInstallation) is moving to Aspire.Hosting.NodeJS in Aspire 13 (dotnet/aspire#12283). Yarn and pnpm remain Community Toolkit exclusive.

Removed

  • AddViteApp() - Vite convenience wrapper
  • WithNpmPackageInstallation() - npm package installer for Node apps
  • WithNpmPackageInstaller() - npm installer for Nx/Turborepo monorepos
  • NpmInstallerResource - npm installer resource type
  • JavaScriptPackageManagerAnnotation / JavaScriptPackageInstallerAnnotation - now provided by Aspire

Retained (yarn/pnpm)

  • AddYarnApp() / AddPnpmApp()
  • WithYarnPackageInstallation() / WithPnpmPackageInstallation()
  • WithYarnPackageInstaller() / WithPnpmPackageInstaller() for monorepos
  • YarnInstallerResource / PnpmInstallerResource

Migration

Before:

builder.AddViteApp("vite-demo")
    .WithNpmPackageInstallation();

var nx = builder.AddNxApp("nx")
    .WithNpmPackageInstaller();

After (use Aspire.Hosting.NodeJS):

builder.AddNpmApp("vite-demo", "./vite-demo", "dev")
    .WithNpmPackageInstallation()
    .WithHttpEndpoint(env: "PORT");

// For CT yarn/pnpm:
builder.AddYarnApp("yarn-demo", "./yarn-demo")
    .WithYarnPackageInstallation();

var nx = builder.AddNxApp("nx")
    .WithYarnPackageInstaller();  // Yarn still in CT

Notes

  • Annotation types consumed by yarn/pnpm code now come from Aspire.Hosting.NodeJS
  • WithMappedEndpointPort() preserves npm annotation compatibility for Aspire interop
  • Requires Aspire 13 preview packages to build

Impact: -513 lines (13 files) | npm functionality → Aspire | yarn/pnpm → CT exclusive

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dnceng.pkgs.visualstudio.com
    • Triggering command: dotnet build src/CommunityToolkit.Aspire.Hosting.NodeJS.Extensions/CommunityToolkit.Aspire.Hosting.NodeJS.Extensions.csproj (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Remove AddViteApp and WithNpmPackageInstaller</issue_title>
<issue_description>Some of the Node.js extensions package is going to be part of Aspire 13, dotnet/aspire#12283 is the PR that the changes landed, so we need to remove those from the CT.

The Yarn and pnpm support aren't moving across, but the annotation types have been moved, so we should use the annotations from Aspire and set them up with yarn/pnpm.</issue_description>

Comments on the Issue (you are @copilot in this section)

@aaronpowell Will they move for the Aspire 13 release? If so, we can track them as part of this work, otherwise we'll spin a seperate issue.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits October 27, 2025 05:01
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove AddViteApp and WithNpmPackageInstaller from CT Remove npm functionality moved to Aspire 13 Oct 27, 2025
Copilot AI requested a review from aaronpowell October 27, 2025 05:09
Copilot finished work on behalf of aaronpowell October 27, 2025 05:09
@aaronpowell aaronpowell marked this pull request as ready for review October 27, 2025 05:26
@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 74
CommunityToolkit.Aspire.Hosting.ActiveMQ 79% 40% 100
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.Adminer 73% 50% 20
CommunityToolkit.Aspire.Hosting.Azure.Dapr 29% 7% 124
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 61% 34% 76
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 22
CommunityToolkit.Aspire.Hosting.Bun 96% 83% 28
CommunityToolkit.Aspire.Hosting.Dapr 60% 36% 836
CommunityToolkit.Aspire.Hosting.DbGate 94% 50% 18
CommunityToolkit.Aspire.Hosting.Deno 98% 85% 44
CommunityToolkit.Aspire.Hosting.Flagd 100% 100% 24
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 95% 73% 28
CommunityToolkit.Aspire.Hosting.Golang 87% 70% 28
CommunityToolkit.Aspire.Hosting.Java 70% 75% 130
CommunityToolkit.Aspire.Hosting.k6 58% 12% 20
CommunityToolkit.Aspire.Hosting.Keycloak.Extensions 100% 100% 22
CommunityToolkit.Aspire.Hosting.KurrentDB 94% 100% 18
CommunityToolkit.Aspire.Hosting.LavinMQ 78% 50% 18
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.MailPit 91% 50% 14
CommunityToolkit.Aspire.Hosting.McpInspector 89% 55% 150
CommunityToolkit.Aspire.Hosting.Meilisearch 73% 57% 50
CommunityToolkit.Aspire.Hosting.Minio 93% 75% 48
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 96% 83% 36
CommunityToolkit.Aspire.Hosting.MySql.Extensions 100% 88% 78
CommunityToolkit.Aspire.Hosting.Ngrok 52% 35% 82
CommunityToolkit.Aspire.Hosting.NodeJS.Extensions 97% 85% 180
CommunityToolkit.Aspire.Hosting.Ollama 67% 70% 174
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector 78% 61% 77
CommunityToolkit.Aspire.Hosting.PapercutSmtp 92% 50% 10
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 99% 89% 84
CommunityToolkit.Aspire.Hosting.Python.Extensions 39% 32% 90
CommunityToolkit.Aspire.Hosting.RavenDB 63% 49% 136
CommunityToolkit.Aspire.Hosting.Redis.Extensions 100% 71% 48
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 16
CommunityToolkit.Aspire.Hosting.Solr 96% 100% 14
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 52% 49% 206
CommunityToolkit.Aspire.Hosting.Sqlite 99% 89% 42
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 100% 87% 78
CommunityToolkit.Aspire.Hosting.SurrealDb 55% 40% 244
CommunityToolkit.Aspire.KurrentDB 100% 100% 46
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 30
CommunityToolkit.Aspire.Meilisearch 97% 92% 68
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 89% 85% 52
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 61% 58% 114
CommunityToolkit.Aspire.Minio.Client 73% 59% 88
CommunityToolkit.Aspire.OllamaSharp 77% 71% 132
CommunityToolkit.Aspire.RavenDB.Client 60% 53% 237
CommunityToolkit.Aspire.SurrealDb 79% 63% 78
Summary 70% (6912 / 9922) 56% (1967 / 3518) 4360

Minimum allowed line rate is 60%

/// Indicates that apps in this monorepo workspace should be executed via a package manager wrapper (e.g., npx, yarn, pnpm).
/// </summary>
/// <param name="packageManager">The name of the JavaScript package manager (e.g., "npm", "yarn", "pnpm").</param>
public sealed class JavaScriptPackageManagerExecutionAnnotation(string packageManager) : IResourceAnnotation
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

done


```csharp
builder.AddYarnApp("yarn-demo")
builder.AddYarnApp("yarn-demo", "../yarn-demo")
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to build AddYarnApp on top of AddJavaScriptApp?

Copy link
Member

Choose a reason for hiding this comment

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

that's just legacy docs I have to clean up still, it's meant to be replaced by AddJavaScriptApp().WithYarn()

@aaronpowell aaronpowell merged commit 18787c3 into aspire-13 Nov 3, 2025
105 of 106 checks passed
@aaronpowell aaronpowell deleted the copilot/remove-addviteapp-and-withnpmpackageinstaller branch November 3, 2025 04:52
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.

3 participants