Skip to content

Document Aspire 13.3 WithEnvironment unification and compatibility shim mappings#1162

Open
IEvangelist with Copilot wants to merge 2 commits into
mainfrom
copilot/document-13-3-withenvironment-api-unification
Open

Document Aspire 13.3 WithEnvironment unification and compatibility shim mappings#1162
IEvangelist with Copilot wants to merge 2 commits into
mainfrom
copilot/document-13-3-withenvironment-api-unification

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Aspire 13.3 unified previously divergent polyglot withEnvironment APIs into a single withEnvironment(name, value) shape while retaining compatibility shims for older call sites. This PR updates AppHost docs and 13.3 release notes to reflect the unified signature, shim mappings, and migration direction.

  • AppHost docs: unified API + migration guidance

    • Updated app-host/executable-resources.mdx with a dedicated Aspire 13.3 section covering:
      • unified withEnvironment(name, value) usage
      • supported value kinds
      • compatibility shim mappings
      • incremental migration guidance for existing code
  • 13.3 changelog: explicit unification entry + before/after

    • Expanded whats-new/aspire-13-3.mdx with:
      • a top-level App model/AppHost note for WithEnvironment unification and shims
      • a concrete before/after comparison
      • explicit shim-to-unified mapping
// Before (older helpers)
await api.withEnvironmentEndpoint('SERVICE_URL', cache.primaryEndpoint);
await api.withEnvironmentParameter('API_KEY', apiKeyParam);
await api.withEnvironmentConnectionString('DB', database);

// After (unified API)
await api.withEnvironment('SERVICE_URL', cache.primaryEndpoint);
await api.withEnvironment('API_KEY', apiKeyParam);
await api.withEnvironment('DB', database);

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Document 13.3 WithEnvironment API unification and compatibility shims Document Aspire 13.3 WithEnvironment unification and compatibility shim mappings Jun 2, 2026
Copilot AI requested a review from IEvangelist June 2, 2026 02:58
@IEvangelist IEvangelist marked this pull request as ready for review June 30, 2026 08:38
Copilot AI review requested due to automatic review settings June 30, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates Aspire 13.3 documentation to reflect the unified polyglot withEnvironment(name, value) API shape and how older per-kind helpers map to it, providing clearer migration direction for existing AppHost code.

Changes:

  • Adds a new Aspire 13.3 section in the AppHost “Executable resources” doc describing the unified withEnvironment signature, accepted value kinds, and shim mappings.
  • Expands the Aspire 13.3 release notes with explicit “before/after” examples and shim-to-unified mapping guidance.
  • Introduces additional release-notes callouts highlighting the WithEnvironment unification at a higher level.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/frontend/src/content/docs/whats-new/aspire-13-3.mdx Adds release-notes entries and examples describing unified withEnvironment and shim mappings.
src/frontend/src/content/docs/app-host/executable-resources.mdx Documents Aspire 13.3 withEnvironment unification and provides migration guidance for older helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +675 to +679
Aspire 13.3 unifies polyglot AppHost environment assignment behind a single `withEnvironment(name, value)` method. Older per-kind helpers are still available as compatibility shims and map directly to the new method:

- `withEnvironmentEndpoint(name, endpoint)` → `withEnvironment(name, endpoint)`
- `withEnvironmentParameter(name, parameter)` → `withEnvironment(name, parameter)`
- `withEnvironmentConnectionString(name, resource)` → `withEnvironment(name, resource)`
Comment on lines +732 to +736
Compatibility shims continue to work for existing call sites and map as follows:

- `withEnvironmentEndpoint(name, endpoint)` → `withEnvironment(name, endpoint)`
- `withEnvironmentParameter(name, parameter)` → `withEnvironment(name, parameter)`
- `withEnvironmentConnectionString(name, resource)` → `withEnvironment(name, resource)`
Comment on lines +304 to +308
Compatibility shims keep older call sites working and map directly to the new pattern:

- `withEnvironmentEndpoint(name, endpoint)` → `withEnvironment(name, endpoint)`
- `withEnvironmentParameter(name, parameter)` → `withEnvironment(name, parameter)`
- `withEnvironmentConnectionString(name, resource)` → `withEnvironment(name, resource)`
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.

Document 13.3 WithEnvironment API unification and compatibility shims

3 participants