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
aaronpowell added a commit that referenced this pull request Nov 6, 2025
* baseline branch for the next major release

* Updating nightly

* Remove deprecated IDistributedApplicationLifecycleHook interface (#915)

* Initial plan

* Replace IDistributedApplicationLifecycleHook with event-based patterns

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

* Add tests for installer resources and update Dapr tests

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

* Refactor Dapr to use IDistributedApplicationEventingSubscriber

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

* Fixing build issue

* Updating the endpoint port

* Disabling some tests so we can move forward in other parts of the Aspire 13 update

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: Aaron Powell <me@aaron-powell.com>

* Adjusting the version of keycloak

* Updating aspire nightly

* New nightly

* Remove npm functionality moved to Aspire 13 (#928)

* Initial plan

* Remove AddViteApp and npm-specific functionality (moved to Aspire 13)

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

* Update comments and tests to reflect npm removal

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

* Update MONOREPO.md to remove npm references

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

* Adding missing types

* Bad copilot code

* Fixing missing namespace

* Handling port forwarding

* removing more stuff that has been migrated to aspire core

* Reworking how package installing is handled

* daily update

* Adding back the annotation that is no longer moving to core

* Forgot to install packages

* adding a bunch more annotations to provide enough metadata

* Removing old demo apps

* Disabling python tests

* Removing a testing change

* Updating to the latest nightly and dealing with type name changes

* Removing type that was can repurpose from aspire core

* breaking the tests down so they are easier to read

* Removing legacy docs

* Fixing failing tests

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: Aaron Powell <me@aaron-powell.com>

* Fixing failing test

* Remove deprecated EventStore integrations (#946)

* Initial plan

* Remove EventStore integrations and all associated files

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

* Remove EventStore project references from solution file

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: Aaron Powell <me@aaron-powell.com>
Co-authored-by: Fredi Machado <fredisoft@gmail.com>

* Creating a new agent for generating hosting integrations

* Creating a new agent for generating client integrations

* Expanded the hosting agent a bit

* Removing the legacy approach to checking resource health and updated the last usages of it

* Bumping go and removing pnpm setup

* maybe we need an explicit health check

* Using the new JavaScriptAppResource so we can leverage the new methods on inspector

Getting rid of some custom code but making it so we run from local by default

* Disabling tests on Windows due to modelcontextprotocol/inspector#893

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: Fredi Machado <fredisoft@gmail.com>
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