feat(tree): Promote alpha change event APIs to beta - #27942
feat(tree): Promote alpha change event APIs to beta#27942Joshua Smithrud (Josmithr) wants to merge 13 commits into
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (1117 lines, 22 files), I've queued these reviewers:
How this works
|
There was a problem hiding this comment.
Pull request overview
Promotes the detailed SharedTree change-event payload surface (previously only available via TreeAlpha.on for array nodes) to the beta API, and updates entrypoints, type tests, and generated API reports accordingly.
Changes:
- Adds/exports array delta operation types and delta-carrying event payload types as beta APIs, including
TreeChangeEventsBeta.treeChangedfor array nodes. - Refactors the alpha change-event typings (
TreeChangeEventsAlpha,NodeChangedDataAlpha) into compatibility aliases of the beta event variants. - Updates type-level tests, entrypoints, changeset notes, and API report outputs to reflect the promotion.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/framework/fluid-framework/api-report/fluid-framework.legacy.beta.api.md | Generated API report updates reflecting newly beta-exported change-event payload types. |
| packages/framework/fluid-framework/api-report/fluid-framework.beta.api.md | Generated API report updates reflecting newly beta-exported change-event payload types. |
| packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md | Generated API report updates reflecting promotion of previously-alpha change-event payload types to beta. |
| packages/dds/tree/src/test/simple-tree/api/treeNodeApi.spec.ts | Updates compile-time typing tests and runtime event tests to validate beta event payload availability. |
| packages/dds/tree/src/simple-tree/api/treeNodeApi.ts | Promotes array delta op types to beta and updates docs to reference beta event APIs. |
| packages/dds/tree/src/simple-tree/api/treeBeta.ts | Adds beta event payload typings (including treeChanged payloads for array nodes) and exports related event data types. |
| packages/dds/tree/src/simple-tree/api/treeAlpha.ts | Converts alpha event types into compatibility aliases of the beta event types. |
| packages/dds/tree/src/simple-tree/api/index.ts | Re-exports newly beta-promoted event payload types from the beta API surface. |
| packages/dds/tree/src/shared-tree/treeAlpha.ts | Updates alpha API docs to reflect that the richer event API is now available via TreeBeta. |
| packages/dds/tree/src/entrypoints/legacy.ts | Exports the newly beta-promoted payload and delta-op types from the legacy entrypoint. |
| packages/dds/tree/src/entrypoints/beta.ts | Exports the newly beta-promoted payload and delta-op types from the beta entrypoint. |
| packages/dds/tree/src/entrypoints/alpha.ts | Adjusts alpha entrypoint exports to avoid duplicating types now exported from beta. |
| packages/dds/tree/api-report/tree.legacy.beta.api.md | Generated API report updates reflecting newly beta-exported change-event payload types. |
| packages/dds/tree/api-report/tree.beta.api.md | Generated API report updates reflecting newly beta-exported change-event payload types. |
| packages/dds/tree/api-report/tree.alpha.api.md | Generated API report updates reflecting promotion of previously-alpha change-event payload types to beta. |
| .changeset/promote-tree-change-event-payloads.md | Changeset documenting the beta promotion and providing usage examples. |
Suppressed comments (3)
packages/dds/tree/src/simple-tree/api/treeNodeApi.ts:50
- These array delta op types are now promoted to Beta Kuang (@beta), but their members are still undocumented (API reports show them as "(undocumented)"). Adding brief JSDoc to the exported members will improve the generated reference docs for the newly-beta surface area.
This issue also appears in the following locations of the same file:
- line 87
- line 97
* @sealed @beta
*/
export interface ArrayNodeRetainOp {
readonly type: "retain";
readonly count: number;
packages/dds/tree/src/simple-tree/api/treeNodeApi.ts:91
- These array delta op types are now promoted to Beta Kuang (@beta), but their members are still undocumented (API reports show them as "(undocumented)"). Adding brief JSDoc to the exported members will improve the generated reference docs for the newly-beta surface area.
* @sealed @beta
*/
export interface ArrayNodeInsertOp {
readonly type: "insert";
readonly count: number;
packages/dds/tree/src/simple-tree/api/treeNodeApi.ts:101
- These array delta op types are now promoted to Beta Kuang (@beta), but their members are still undocumented (API reports show them as "(undocumented)"). Adding brief JSDoc to the exported members will improve the generated reference docs for the newly-beta surface area.
* @sealed @beta
*/
export interface ArrayNodeRemoveOp {
readonly type: "remove";
readonly count: number;
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Tests for this file are grouped with those for treeNodeApi.ts as that is where this functionality will eventually land, | ||
| // and where most of the actual implementation is for much of it. | ||
|
|
||
| /** |
There was a problem hiding this comment.
Note for reviewers: to avoid circular module dependencies elsewhere, beta event types were moved to a new module: treeChangeEventsBeta.ts.
| * Data included for {@link TreeChangeEventsAlpha.nodeChanged} when the node is an object, map, or record node. | ||
| * @sealed @alpha | ||
| */ | ||
| export interface NodeChangedDataProperties<TNode extends TreeNode = TreeNode> { |
There was a problem hiding this comment.
Note for reviewers: these types were moved to treeChangeEventsBeta.ts
| * Represents elements that were neither inserted into nor removed from the array. | ||
| * @sealed @alpha | ||
| */ | ||
| export interface ArrayNodeRetainOp { |
There was a problem hiding this comment.
Note for reviewers: these types were moved to treeChangeEventsBeta.ts
| * Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
| * Licensed under the MIT License. | ||
| */ | ||
|
|
There was a problem hiding this comment.
Note for reviewers: all of the below types are existing and were migrated here to prevent circular module dependencies. They are unchanged aside from the promotion of array delta types from alpha to beta.
|
Copilot resolve the merge conflicts in this pull request |
|
🔗 Found some broken links! 💔 Run a link check locally to find them. See Checking for Broken Links for more information. linkcheck output |
Bundle size comparisonBase commit: Notable changesNo bundles changed by ≥ 500 bytes parsed. Per-bundle deltas
|
See changeset for details