Skip to content

Rename Aspire.Hosting.NodeJs to Aspire.Hosting.JavaScript#12681

Merged
eerhardt merged 3 commits intodotnet:mainfrom
eerhardt:RenameNodeJs
Nov 5, 2025
Merged

Rename Aspire.Hosting.NodeJs to Aspire.Hosting.JavaScript#12681
eerhardt merged 3 commits intodotnet:mainfrom
eerhardt:RenameNodeJs

Conversation

@eerhardt
Copy link
Member

@eerhardt eerhardt commented Nov 4, 2025

Description

This makes the library consistent to use language naming, and not a single technology. It allows for more JS features in the future that aren't tied to Node.js.

Since the library is being renamed, I also removed the Obsolete APIs since there is no reason to ship them in the new library.

Contributes to #12058

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • Yes
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?

@eerhardt eerhardt requested a review from mitchdenny as a code owner November 4, 2025 22:31
Copilot AI review requested due to automatic review settings November 4, 2025 22:31
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

🚀 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12681

Or

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

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 renames the Aspire.Hosting.NodeJs package to Aspire.Hosting.JavaScript to better reflect its broader support for JavaScript applications beyond just Node.js. The refactoring includes removing obsolete APIs (AddNpmApp and an older AddNodeApp overload), updating namespaces from Aspire.Hosting.NodeJs to Aspire.Hosting.JavaScript, and renaming the main extension class from NodeAppHostingExtension to JavaScriptHostingExtensions.

Key changes:

  • Namespace migration from Aspire.Hosting.NodeJs to Aspire.Hosting.JavaScript
  • Removal of obsolete AddNpmApp method in favor of AddJavaScriptApp
  • Removal of unused imports and overload resolution priority attributes
  • Updates to all project references, test code, and documentation

Reviewed Changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Aspire.Playground.Tests/Infrastructure/DistributedApplicationExtensions.cs Updates using statement to reference Aspire.Hosting.JavaScript
tests/Aspire.Playground.Tests/Aspire.Playground.Tests.csproj Changes package reference from NodeJs to JavaScript
tests/Aspire.Hosting.Tests/PublishAsDockerfileTests.cs Replaces AddNpmApp calls with AddJavaScriptApp
tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj Updates project reference to JavaScript package
tests/Aspire.Hosting.JavaScript.Tests/*.cs Updates all test file namespaces to use JavaScript instead of NodeJs
tests/Aspire.Hosting.JavaScript.Tests/NodeJsPublicApiTests.cs Replaces obsolete AddNpmApp tests with AddJavaScriptApp tests
tests/Aspire.Hosting.JavaScript.Tests/NodeAppFixture.cs Updates to use AddJavaScriptApp and changes return type for NpmAppBuilder
tests/Aspire.Hosting.JavaScript.Tests/AddNodeAppTests.cs Updates test assertions for new default script name
src/Aspire.Hosting.NodeJs/api/Aspire.Hosting.NodeJs.cs Removes obsolete API surface file
src/Aspire.Hosting.JavaScript/*.cs Updates all source file namespaces from NodeJs to JavaScript
src/Aspire.Hosting.JavaScript/JavaScriptHostingExtensions.cs Removes obsolete methods, unused imports, and renames class
src/Aspire.Hosting.JavaScript/Aspire.Hosting.JavaScript.csproj Updates description and disables package validation
src/Aspire.Hosting.JavaScript/README.md Updates package name and documentation
playground/AspireWithNode/AspireWithNode.AppHost/*.csproj Updates to reference JavaScript package
playground/AspireWithJavaScript/AspireJavaScript.AppHost/*.csproj Updates to reference JavaScript package
*.slnx Updates solution files to reference JavaScript project paths
src/Aspire.ProjectTemplates/templates/aspire-py-starter/13.0/apphost.cs Updates template to reference JavaScript package
tests/Aspire.Cli.Tests/Projects/FallbackProjectParserTests.cs Adds missing closing brace
Comments suppressed due to low confidence (3)

src/Aspire.Hosting.JavaScript/README.md:17

  • The text contains a grammatical error. 'add a Or resource' should be 'add a JavaScript resource' or similar descriptive text. This appears to be leftover template text.
    src/Aspire.Hosting.JavaScript/README.md:22
  • The example code is incorrect. According to the API, AddJavaScriptApp requires a runScriptName parameter (not a script path like 'app.js'). Based on the test in AddNodeAppTests.cs line 64, the correct default should be 'dev'. The example should either use AddNodeApp for running a script file, or use AddJavaScriptApp with a script name like 'start' or 'dev'.
    tests/Aspire.Hosting.JavaScript.Tests/NodeAppFixture.cs:36
  • The script name parameter passed to AddJavaScriptApp is 'start', but based on the changes in AddNodeAppTests.cs at line 64, the default script name for the generated manifest should be 'dev'. This inconsistency could cause test failures or unexpected behavior.

This makes the library consistent to use language naming, and not a single technology. It allows for more JS features in the future that aren't tied to Node.js.

Since the library is being renamed, I also removed the Obsolete APIs since there is no reason to ship them in the new library.

Contributes to dotnet#12058
@eerhardt eerhardt requested a review from radical as a code owner November 4, 2025 23:46
@eerhardt eerhardt merged commit 0010884 into dotnet:main Nov 5, 2025
296 checks passed
@eerhardt eerhardt deleted the RenameNodeJs branch November 5, 2025 00:24
@eerhardt
Copy link
Member Author

eerhardt commented Nov 5, 2025

/backport to release/13.0

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19087109876

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

@eerhardt backporting to "release/13.0" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Rename Aspire.Hosting.NodeJs to Aspire.Hosting.JavaScript
Using index info to reconstruct a base tree...
M	src/Aspire.Hosting.NodeJs/JavaScriptAppResource.cs
M	src/Aspire.Hosting.NodeJs/NodeAppResource.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Hosting.JavaScript/JavaScriptAppResource.cs
CONFLICT (content): Merge conflict in src/Aspire.Hosting.JavaScript/JavaScriptAppResource.cs
Auto-merging src/Aspire.Hosting.JavaScript/NodeAppResource.cs
CONFLICT (content): Merge conflict in src/Aspire.Hosting.JavaScript/NodeAppResource.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Rename Aspire.Hosting.NodeJs to Aspire.Hosting.JavaScript
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Nov 5, 2025
eerhardt added a commit to eerhardt/aspire that referenced this pull request Nov 5, 2025
* Rename Aspire.Hosting.NodeJs to Aspire.Hosting.JavaScript

This makes the library consistent to use language naming, and not a single technology. It allows for more JS features in the future that aren't tied to Node.js.

Since the library is being renamed, I also removed the Obsolete APIs since there is no reason to ship them in the new library.

Contributes to dotnet#12058

* Fix build

* Fix Helix tests
davidfowl pushed a commit that referenced this pull request Nov 5, 2025
…12687)

* Rename Aspire.Hosting.NodeJs to Aspire.Hosting.JavaScript

This makes the library consistent to use language naming, and not a single technology. It allows for more JS features in the future that aren't tied to Node.js.

Since the library is being renamed, I also removed the Obsolete APIs since there is no reason to ship them in the new library.

Contributes to #12058

* Fix build

* Fix Helix tests
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants