Skip to content

Add asAlpha to tree package#25512

Merged
noencke merged 2 commits intomicrosoft:mainfrom
noencke:asAlpha
Sep 23, 2025
Merged

Add asAlpha to tree package#25512
noencke merged 2 commits intomicrosoft:mainfrom
noencke:asAlpha

Conversation

@noencke
Copy link
Copy Markdown
Contributor

@noencke noencke commented Sep 22, 2025

This will allow future APIs that follow the same pattern to share the same common asAlpha API.
This also aligns the tree API with the recently introduced container-runtime API.

@noencke noencke requested review from a team as code owners September 22, 2025 21:32
Copilot AI review requested due to automatic review settings September 22, 2025 21:32
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct changeset-present public api change Changes to a public API labels Sep 22, 2025
Copy link
Copy Markdown
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 asTreeViewAlpha function to asAlpha to allow future APIs that follow the same pattern to share a common API for accessing alpha functionality. This aligns the tree API with a recently introduced container-runtime API pattern.

  • Replaces all imports and usages of asTreeViewAlpha with asAlpha
  • Moves the function implementation from simple-tree/api/tree.ts to a new api.ts file at the package root
  • Updates API documentation and exports to reflect the rename

Reviewed Changes

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

Show a summary per file
File Description
packages/service-clients/end-to-end-tests/azure-client/src/test/tree.spec.ts Updates import and usage of asTreeViewAlpha to asAlpha
packages/framework/tree-agent/src/test/utils.ts Updates import and usage of asTreeViewAlpha to asAlpha
packages/framework/tree-agent/src/test/systemPrompt.spec.ts Updates import and usage of asTreeViewAlpha to asAlpha
packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md Updates API documentation to reflect function name change
packages/dds/tree/src/test/shared-tree/undo.spec.ts Updates import and usage of asTreeViewAlpha to asAlpha
packages/dds/tree/src/test/shared-tree/treeCheckout.spec.ts Updates import and usage of asTreeViewAlpha to asAlpha
packages/dds/tree/src/test/shared-tree/tree.spec.ts Updates import and usage of asTreeViewAlpha to asAlpha
packages/dds/tree/src/test/shared-tree/sharedTree.spec.ts Updates import and usage of asTreeViewAlpha to asAlpha
packages/dds/tree/src/test/shared-tree/fuzz/fuzzEditGenerators.ts Updates import and usage of asTreeViewAlpha to asAlpha
packages/dds/tree/src/simple-tree/index.ts Removes export of asTreeViewAlpha
packages/dds/tree/src/simple-tree/api/tree.ts Removes asTreeViewAlpha function implementation and updates documentation
packages/dds/tree/src/simple-tree/api/index.ts Removes export of asTreeViewAlpha
packages/dds/tree/src/index.ts Removes export of asTreeViewAlpha and adds export of asAlpha
packages/dds/tree/src/api.ts New file containing asAlpha function implementation
packages/dds/tree/api-report/tree.alpha.api.md Updates API documentation to reflect function name change
.changeset/lazy-comics-cheat.md Documents the breaking change

@github-actions github-actions bot added the base: main PRs targeted against main branch label Sep 22, 2025
@noencke noencke force-pushed the asAlpha branch 2 times, most recently from 4348b37 to e33aeed Compare September 23, 2025 16:29
@noencke noencke changed the title Rename asTreeViewAlpha to asAlpha Add asAlpha to tree package Sep 23, 2025
/**
* Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.
* @alpha
* @deprecated Use {@link asAlpha} instead.
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.

Nit: should we maybe leave a @privateRemarks block noting that package-internal usage is not deprecated, just external?

---
`asTreeViewAlpha` has been deprecated in favor of `asAlpha`.

Please replace usages with of `asTreeViewAlpha` with `asAlpha` - the function signature remains the same.
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.

Do we have any usages elsewhere in the repo that we should migrate in this PR?

@github-actions
Copy link
Copy Markdown
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  235713 links
    1720 destination URLs
    1953 URLs ignored
       0 warnings
       0 errors


@noencke noencke merged commit 7f1cb91 into microsoft:main Sep 23, 2025
38 checks passed
"@fluidframework/tree-agent": minor
"__section": breaking
---
`asTreeViewAlpha` has been deprecated in favor of `asAlpha`.
Copy link
Copy Markdown
Contributor

@alexvy86 alexvy86 Oct 1, 2025

Choose a reason for hiding this comment

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

Coming back just for future reference, with a new (to me, at least) reason why we avoid inline code blocks in changeset headings (we missed it this time, oops): it breaks ToC links in the final release notes (probably only if the heading starts with a code block like in this case). All links work except that one.

FYI docs crew @Josmithr @jzaffiro @tylerbutler @CraigMacomber

anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
This will allow future APIs that follow the same pattern to share the
same common `asAlpha` API.
This also aligns the tree API with the [recently introduced
container-runtime
API](microsoft#25509).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds: tree area: dds Issues related to distributed data structures area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch changeset-present public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants