microsoft / FluidFramework

Library for building distributed, real-time collaborative web applications
https://fluidframework.com
MIT License
4.74k stars 535 forks source link

[dds/tree] `UndoRedoHandler` is not exported from `experimental/dds/tree/src/index.ts` #23028

Closed TheLarkInn closed 1 day ago

TheLarkInn commented 2 weeks ago

Describe the bug

UndoRedoHandler is not exported from experimental/dds/tree/src/index.ts. This is problematic because when you are using typescripts "moduleResolution": "Bundler", it becomes impossible to override or work around this bug by using deep imports.

Discovered this in version 2.4, but looking at 2.10/GitHub Source it appears this is still a problem  

To Reproduce

Steps to reproduce the behavior:

  1. Consume this API in a typescript file with moduleResolution: 'bundler':

    import type { SharedTreeUndoRedoHandler } from '@fluid-experimental/tree';
  2. See the typescript error that this package cannot be found.

Expected behavior

UndoRedoHandler should either have a proper package export entry in the package.json OR UndoRedoHandler should be exported from index.ts

tylerbutler commented 1 week ago

@microsoft/fluid-cr-tree - Is this on your radar?

Abe27342 commented 1 day ago

Thanks for the report! You're correct these were intended to be exported from @fluid-experimental/tree. This should be resolved in the next release (2.11). In the meantime if you're blocked, feel free to copy-paste the implementation for now.