Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 28, 2025

The documentation in the NodeJS Extensions README was showing outdated examples for passing additional arguments to package managers during installation. The examples were using the old array-based API that was changed to a callback-based API in PR #740.

Before (incorrect):

builder.AddNpmApp("npm-app", "./path/to/app")
    .WithNpmPackageInstallation(useCI: false, args: ["--legacy-peer-deps"])
    .WithExternalHttpEndpoints();

After (correct):

builder.AddNpmApp("npm-app", "./path/to/app")
    .WithNpmPackageInstallation(useCI: false, configureInstaller =>
    {
        configureInstaller.WithArgs("--legacy-peer-deps");
    })
    .WithExternalHttpEndpoints();

Updated all three package manager examples (npm, yarn, and pnpm) in the "Package installation with custom flags" section to use the current callback-based configuration API that matches the actual implementation and test examples.

Fixes #807.

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 (dns block)
    • Triggering command: dotnet test --no-build --verbosity normal (dns block)

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


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…ation examples to use callback API instead of array API

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Copilot AI changed the title [WIP] Outdated doc, passing additional args to npm/yarn/Pnpm is no longer an array but an callback instead Fix outdated NodeJS Extensions documentation - update package installation examples to use callback API Aug 28, 2025
Copilot finished work on behalf of aaronpowell August 28, 2025 00:57
Copilot AI requested a review from aaronpowell August 28, 2025 00:57
@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.EventStore 100% 100% 46
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 66% 50% 832
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 97% 88% 36
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 22
CommunityToolkit.Aspire.Hosting.Bun 82% 71% 54
CommunityToolkit.Aspire.Hosting.Dapr 62% 51% 728
CommunityToolkit.Aspire.Hosting.DbGate 94% 50% 18
CommunityToolkit.Aspire.Hosting.Deno 84% 75% 72
CommunityToolkit.Aspire.Hosting.EventStore 94% 100% 18
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 93% 50% 18
CommunityToolkit.Aspire.Hosting.Golang 87% 70% 28
CommunityToolkit.Aspire.Hosting.Java 69% 72% 120
CommunityToolkit.Aspire.Hosting.k6 58% 12% 20
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% 54% 130
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 47% 52% 136
CommunityToolkit.Aspire.Hosting.Ollama 67% 70% 174
CommunityToolkit.Aspire.Hosting.PapercutSmtp 92% 50% 10
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 99% 89% 84
CommunityToolkit.Aspire.Hosting.Python.Extensions 68% 55% 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.SqlDatabaseProjects 76% 64% 154
CommunityToolkit.Aspire.Hosting.Sqlite 99% 89% 42
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 100% 87% 78
CommunityToolkit.Aspire.Hosting.SurrealDb 53% 35% 234
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 50% 50% 88
CommunityToolkit.Aspire.Minio.Client 73% 59% 88
CommunityToolkit.Aspire.OllamaSharp 74% 69% 120
CommunityToolkit.Aspire.RavenDB.Client 60% 53% 237
CommunityToolkit.Aspire.SurrealDb 79% 63% 78
Summary 71% (7372 / 10451) 59% (2269 / 3878) 4653

Minimum allowed line rate is 60%

Copilot AI temporarily deployed to azure-artifacts August 28, 2025 01:12 Inactive
@aaronpowell aaronpowell marked this pull request as ready for review August 28, 2025 01:54
Copilot AI review requested due to automatic review settings August 28, 2025 01:54
@aaronpowell aaronpowell merged commit c6e9368 into main Aug 28, 2025
99 checks passed
Copy link
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 fixes outdated documentation examples in the NodeJS Extensions README by updating package installation code snippets to use the current callback-based API instead of the deprecated array-based API that was changed in PR #740.

  • Updates three package manager examples (npm, yarn, pnpm) to use callback-based configuration
  • Replaces old args: ["..."] syntax with new configureInstaller => { configureInstaller.WithArgs("..."); } pattern
  • Ensures documentation matches the actual implementation and test examples

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.

Outdated doc, passing additional args to npm/yarn/Pnpm is no longer an array but an callback instead

2 participants