Repository navigation
Graduate Next.js hosting and JavaScript publishing APIs to stable - #22164
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22164Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22164" |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the changes stabilizing Next.js hosting and JavaScript publishing APIs.
No open issues 🎉
What changed in this PR
Graduates Next.js hosting and existing JavaScript publishing APIs in Aspire.Hosting.JavaScript to stable, preserving signatures, runtime behavior, and build validation. Deno-specific APIs remain experimental; workspace support and SPA fallback remain outside this PR.
Changes:
- Removes
ASPIREJAVASCRIPT001experimental markers from Next.js resources and publishing APIs. - Removes corresponding warning suppressions from existing tests and playground consumers.
- Documents stable publishing options and Next.js standalone-output prerequisites.
| File | Description |
|---|---|
tests/Aspire.Hosting.JavaScript.Tests/NodeJsPublicApiTests.cs |
Removes the JavaScript experimental-warning suppression. |
tests/Aspire.Hosting.JavaScript.Tests/AddViteAppTests.cs |
Exercises existing Vite publishing tests without the suppression. |
tests/Aspire.Hosting.JavaScript.Tests/AddNodeAppTests.cs |
Removes the scoped JavaScript warning suppression. |
tests/Aspire.Hosting.JavaScript.Tests/AddJavaScriptAppTests.cs |
Exercises existing JavaScript tests without the suppression. |
tests/Aspire.Hosting.JavaScript.Tests/AddDenoAppTests.cs |
Removes the JavaScript suppression while retaining Deno’s. |
tests/Aspire.Hosting.Azure.Tests/JavaScriptPublishValidationTests.cs |
Removes the suppression from deployment-validation tests. |
src/Aspire.Hosting.JavaScript/README.md |
Documents publishing shapes and Next.js prerequisites. |
src/Aspire.Hosting.JavaScript/PublishAsStaticWebsiteOptions.cs |
Makes static-website publishing options stable. |
src/Aspire.Hosting.JavaScript/NextJsAppResource.cs |
Makes the Next.js resource stable. |
src/Aspire.Hosting.JavaScript/JavaScriptHostingExtensions.cs |
Removes experimental markers from publishing, Next.js, and validation opt-out methods. |
playground/AspireWithNode/AspireWithNode.AppHost/AppHost.cs |
Removes suppressions around package-script publishing. |
playground/AspireWithJavaScript/AspireJavaScript.AppHost/AppHost.cs |
Removes suppressions around static-website publishing. |
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
c1b09a6 to
df1fb3c
Compare
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Preserve the release branch's Deno graduation alongside stable Next.js and publishing APIs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Reviewed the dogfood instructions, test-selector report, retry notifications, and both approval-recommended review summaries handed back by the PR finisher. They are informational and request no code changes. The original API scope and attribution remain intact. Resolved the release-target conflicts in 95b0e0d by preserving both publishing and Deno documentation and removing obsolete suppressions. The focused JavaScript project built and passed all 338 tests. The target-relative diff remains 11 files. The earlier Final Results failure only aggregates dependent-job failures; the native finisher also reports it on the target, so no unrelated workaround was added. New CI will validate the conflict-resolution commit. 🤖 AI-authored reply via Agency Finish PR. |
Tests selector10 / 101 PR test projects · 4 PR jobs, from 10 changed files. Selected PR test projects (10 / 101)
Selected PR jobs (4)
How these were chosen — grouped by what changed
🔧 📦 affected project 📄 📄 🔧 🔧 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
|
Reviewed the selector report for 95b0e0d: JavaScript hosting and its downstream projects/jobs are selected. This is informational and requests no code change; the focused release validation remains 338 passing tests, with CI gates left intact. 🤖 AI-authored reply via Agency Finish PR. |
|
The latest review summary reports no open issues. No further code changes are needed for that review; required CI and approval gates remain enforced before merge. 🤖 AI-authored reply via Agency Finish PR. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
The automation has already started attempt 2 for the failed CI jobs. This notice requests no code change; I will leave the existing rerun and required gates intact rather than launch duplicate retries or change unrelated code. 🤖 AI-authored reply via Agency Finish PR. |
7143d83
into
release/17.0
|
Pull request created: #2169
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#2169 targeting Removed the experimental callouts and Note This draft PR needs human review before merging. |
Description
Graduate Next.js hosting and the existing JavaScript publishing APIs from
ASPIREJAVASCRIPT001, so consumers no longer need experimental-warning suppressions for these scenarios. Retain all APIs, signatures, generated artifacts, runtime behavior, and the existing release/17.0 build-validation behavior.AddNextJsApp,NextJsAppResource,DisableBuildValidation, bothPublishAsStaticWebsiteoverloads and their internal adapter/core,PublishAsStaticWebsiteOptions,PublishAsNodeServer, andPublishAsPackageScript.api/*.csbaselines remain untouched.ASPIREJAVASCRIPT001. Deno was independently graduated on the release target; the merge preserves that change.Fixes # (issue)
User-facing usage
Existing calls remain unchanged; C# callers can remove their
ASPIREJAVASCRIPT001suppressions:The existing exported TypeScript API names remain unchanged:
Publishing contract evaluation
This PR proposes graduation of the current contracts, not a new framework-wide support guarantee or a claim of prior maintainer approval:
distby default), copy it to YARP's static-file root, and preserve optional API proxying, prefix stripping, and endpoint selection. Unmatched-path behavior is unchanged.public/,.next/standalone/, and.next/static/, withnode server.jsin the runtime image. Apublic/directory remains required.Next.js configuration inspection remains a static heuristic, not execution of
next.config.*.DisableBuildValidation()still supports dynamically supplied configuration without changing the required output. Existing user Dockerfiles and explicit entrypoint overrides retain their current treatment.Release-specific boundary: release/17.0 has the older resource-annotation validation pipeline, not main's container
AddPublishValidationintegration. This PR does not port that integration or its Azure graph tests, and does not claim release verification of validation-before-image-build behavior across Azure Container Apps/App Service or excluded-resource handling. The README omits those main-specific guarantees. Validation behavior on the release branch is unchanged by this PR.The workspace proposal #16839 and SPA-fallback proposal #21871 are not duplicate graduation PRs and are not included here. In particular, this PR does not approve their new APIs or change the current static-site fallback default. Any later change to these now-stable contracts still needs its own compatibility review.
Release branch repair
Replayed only the original stabilization commit
c1b09a678919c92a682ce7bf48dd8d299bf0abd0, using its verified original-main fork point793dfe6e254fe050af24cb7bcfba214066dcaab8, onto release/17.0 at9a97ab889bfb731de74ead0280be279ffdd000bf. No release-to-head history range was cherry-picked.The sole conflict was a suppression removal in
JavaScriptPublishValidationTests.cs, a test file absent from release. Kept it absent instead of importing main features/tests. A second documentation-only commit removes unsupported release validation guarantees. The replay initially contained 2 scoped commits and 11 files, rather than unrelated main history.On November 15, merged the release target at
a509f094e0ee87d17dc0e1cc9bca84f7ca2623dato resolve reported conflicts. Kept both the Next.js/publishing documentation and the target's independently graduated Deno documentation; removed both obsolete suppressions from the conflicted Deno test file. The target-relative diff remains 11 scoped files. No history rewrite or additional API/runtime behavior changes.Introduction attribution
David Fowler (@davidfowl) introduced the Next.js resource, validation opt-out, static-website options/helpers, Node-server helper, and original package-script helper in #15736 (introducing commit). The package-script helper was subsequently renamed from
PublishAsNpmScripttoPublishAsPackageScriptin #17382 (rename commit), also by David Fowler (@davidfowl). Attribution was checked against introducing code history and the GitHub commit/PR author identities, not the merge committer or latest editor. No attribution uncertainty identified; these are mentions, not reviewer assignments.Validation
Current release/17.0-based branch:
git diff --cached --check origin/release/17.0before committing the merge. The earlier CIFinal Resultsfailure was an aggregate dependent-job failure also reported on the target by the native PR finisher; it is not worked around in this PR.git diff --check origin/release/17.0...HEAD. No generated snapshot or API baseline changes.JavaScriptPublishValidationTests(absent), successful live framework image builds, CLI multi-framework deployment E2E, live Azure deployment, or a full repository suite. The passing release tests do not establish end-to-end deployment success for every framework or main's stronger validation-graph guarantees.Historical main-based validation only; not release validation:
Checklist
<remarks />and<code />elements on your triple slash comments?