@fluid-experimental/tree 2.0.0-rc.1.0.3 → 2.0.0-rc.2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{.eslintrc.js → .eslintrc.cjs} +1 -1
- package/{.mocharc.js → .mocharc.cjs} +1 -1
- package/.vscode/settings.json +1 -1
- package/CHANGELOG.md +4 -0
- package/api-report/experimental-tree.api.md +4 -15
- package/dist/ChangeCompression.d.ts +5 -5
- package/dist/ChangeCompression.d.ts.map +1 -1
- package/dist/ChangeCompression.js +24 -24
- package/dist/ChangeCompression.js.map +1 -1
- package/dist/ChangeTypes.d.ts +3 -3
- package/dist/ChangeTypes.d.ts.map +1 -1
- package/dist/ChangeTypes.js +9 -9
- package/dist/ChangeTypes.js.map +1 -1
- package/dist/Checkout.d.ts +7 -7
- package/dist/Checkout.d.ts.map +1 -1
- package/dist/Checkout.js +27 -27
- package/dist/Checkout.js.map +1 -1
- package/dist/Common.d.ts +2 -2
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js.map +1 -1
- package/dist/EagerCheckout.d.ts +3 -3
- package/dist/EagerCheckout.d.ts.map +1 -1
- package/dist/EagerCheckout.js +2 -2
- package/dist/EagerCheckout.js.map +1 -1
- package/dist/EditLog.d.ts +4 -6
- package/dist/EditLog.d.ts.map +1 -1
- package/dist/EditLog.js +9 -9
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.d.ts +6 -6
- package/dist/EditUtilities.d.ts.map +1 -1
- package/dist/EditUtilities.js +28 -28
- package/dist/EditUtilities.js.map +1 -1
- package/dist/Forest.d.ts +2 -2
- package/dist/Forest.d.ts.map +1 -1
- package/dist/Forest.js +13 -13
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.d.ts +3 -3
- package/dist/HistoryEditFactory.d.ts.map +1 -1
- package/dist/HistoryEditFactory.js +36 -36
- package/dist/HistoryEditFactory.js.map +1 -1
- package/dist/IdConversion.d.ts +3 -3
- package/dist/IdConversion.d.ts.map +1 -1
- package/dist/IdConversion.js +23 -23
- package/dist/IdConversion.js.map +1 -1
- package/dist/InitialTree.d.ts +1 -1
- package/dist/InitialTree.d.ts.map +1 -1
- package/dist/InitialTree.js +2 -2
- package/dist/InitialTree.js.map +1 -1
- package/dist/LazyCheckout.d.ts +5 -5
- package/dist/LazyCheckout.d.ts.map +1 -1
- package/dist/LazyCheckout.js +2 -2
- package/dist/LazyCheckout.js.map +1 -1
- package/dist/LogViewer.d.ts +7 -7
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +25 -25
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.d.ts +1 -1
- package/dist/MergeHealth.d.ts.map +1 -1
- package/dist/MergeHealth.js +32 -32
- package/dist/MergeHealth.js.map +1 -1
- package/dist/NodeIdUtilities.d.ts +3 -3
- package/dist/NodeIdUtilities.d.ts.map +1 -1
- package/dist/NodeIdUtilities.js +4 -4
- package/dist/NodeIdUtilities.js.map +1 -1
- package/dist/PayloadUtilities.d.ts +1 -1
- package/dist/PayloadUtilities.d.ts.map +1 -1
- package/dist/PayloadUtilities.js.map +1 -1
- package/dist/ReconciliationPath.d.ts +3 -3
- package/dist/ReconciliationPath.d.ts.map +1 -1
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.js +5 -5
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +5 -5
- package/dist/RevisionView.d.ts.map +1 -1
- package/dist/RevisionView.js +11 -11
- package/dist/RevisionView.js.map +1 -1
- package/dist/SerializationUtilities.d.ts +4 -4
- package/dist/SerializationUtilities.d.ts.map +1 -1
- package/dist/SerializationUtilities.js +5 -5
- package/dist/SerializationUtilities.js.map +1 -1
- package/dist/SharedTree.d.ts +15 -18
- package/dist/SharedTree.d.ts.map +1 -1
- package/dist/SharedTree.js +154 -166
- package/dist/SharedTree.js.map +1 -1
- package/dist/SharedTreeEncoder.d.ts +8 -8
- package/dist/SharedTreeEncoder.d.ts.map +1 -1
- package/dist/SharedTreeEncoder.js +67 -67
- package/dist/SharedTreeEncoder.js.map +1 -1
- package/dist/StringInterner.d.ts +1 -1
- package/dist/StringInterner.d.ts.map +1 -1
- package/dist/StringInterner.js +2 -2
- package/dist/StringInterner.js.map +1 -1
- package/dist/Summary.d.ts +4 -4
- package/dist/Summary.d.ts.map +1 -1
- package/dist/Summary.js +2 -2
- package/dist/Summary.js.map +1 -1
- package/dist/SummaryBackCompatibility.d.ts +3 -3
- package/dist/SummaryBackCompatibility.d.ts.map +1 -1
- package/dist/SummaryBackCompatibility.js +13 -13
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/SummaryTestUtilities.d.ts +2 -2
- package/dist/SummaryTestUtilities.d.ts.map +1 -1
- package/dist/SummaryTestUtilities.js.map +1 -1
- package/dist/Transaction.d.ts +4 -4
- package/dist/Transaction.d.ts.map +1 -1
- package/dist/Transaction.js +10 -10
- package/dist/Transaction.js.map +1 -1
- package/dist/TransactionInternal.d.ts +7 -7
- package/dist/TransactionInternal.d.ts.map +1 -1
- package/dist/TransactionInternal.js +87 -87
- package/dist/TransactionInternal.js.map +1 -1
- package/dist/TreeCompressor.d.ts +4 -4
- package/dist/TreeCompressor.d.ts.map +1 -1
- package/dist/TreeCompressor.js +6 -6
- package/dist/TreeCompressor.js.map +1 -1
- package/dist/TreeNodeHandle.d.ts +3 -3
- package/dist/TreeNodeHandle.d.ts.map +1 -1
- package/dist/TreeNodeHandle.js +5 -5
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.d.ts +3 -3
- package/dist/TreeView.d.ts.map +1 -1
- package/dist/TreeView.js +10 -10
- package/dist/TreeView.js.map +1 -1
- package/dist/TreeViewUtilities.d.ts +2 -2
- package/dist/TreeViewUtilities.d.ts.map +1 -1
- package/dist/TreeViewUtilities.js +3 -3
- package/dist/TreeViewUtilities.js.map +1 -1
- package/dist/UndoRedoHandler.d.ts +2 -2
- package/dist/UndoRedoHandler.d.ts.map +1 -1
- package/dist/UndoRedoHandler.js +5 -5
- package/dist/UndoRedoHandler.js.map +1 -1
- package/dist/UuidUtilities.d.ts +1 -1
- package/dist/UuidUtilities.d.ts.map +1 -1
- package/dist/UuidUtilities.js +3 -3
- package/dist/UuidUtilities.js.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.js +4 -4
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/IdCompressor.d.ts +2 -2
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
- package/dist/id-compressor/IdCompressor.js +78 -78
- package/dist/id-compressor/IdCompressor.js.map +1 -1
- package/dist/id-compressor/IdRange.d.ts +1 -1
- package/dist/id-compressor/IdRange.d.ts.map +1 -1
- package/dist/id-compressor/IdRange.js.map +1 -1
- package/dist/id-compressor/NumericUuid.d.ts +1 -1
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -1
- package/dist/id-compressor/NumericUuid.js +6 -6
- package/dist/id-compressor/NumericUuid.js.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.d.ts +2 -2
- package/dist/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.js +14 -14
- package/dist/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/dist/id-compressor/index.d.ts +4 -4
- package/dist/id-compressor/index.d.ts.map +1 -1
- package/dist/id-compressor/index.js +11 -11
- package/dist/id-compressor/index.js.map +1 -1
- package/dist/id-compressor/persisted-types/0.0.1.d.ts +1 -1
- package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
- package/dist/id-compressor/persisted-types/0.0.1.js.map +1 -1
- package/dist/id-compressor/persisted-types/index.d.ts +1 -1
- package/dist/id-compressor/persisted-types/index.d.ts.map +1 -1
- package/dist/id-compressor/persisted-types/index.js.map +1 -1
- package/dist/index.d.ts +29 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -73
- package/dist/index.js.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.js +5 -8
- package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +1 -1
- package/dist/migration-shim/migrationShim.d.ts.map +1 -1
- package/dist/migration-shim/migrationShim.js +1 -1
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/migrationShimFactory.js.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.js +2 -5
- package/dist/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/dist/migration-shim/types.d.ts +1 -1
- package/dist/migration-shim/types.d.ts.map +1 -1
- package/dist/migration-shim/types.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/persisted-types/0.0.2.d.ts +1 -1
- package/dist/persisted-types/0.0.2.d.ts.map +1 -1
- package/dist/persisted-types/0.0.2.js.map +1 -1
- package/dist/persisted-types/0.1.1.d.ts +4 -4
- package/dist/persisted-types/0.1.1.d.ts.map +1 -1
- package/dist/persisted-types/0.1.1.js +13 -13
- package/dist/persisted-types/0.1.1.js.map +1 -1
- package/dist/persisted-types/index.d.ts +2 -2
- package/dist/persisted-types/index.d.ts.map +1 -1
- package/dist/persisted-types/index.js +13 -13
- package/dist/persisted-types/index.js.map +1 -1
- package/dist/tree-alpha.d.ts +5 -8
- package/dist/tree-beta.d.ts +5 -1
- package/dist/tree-public.d.ts +5 -1
- package/dist/tree-untrimmed.d.ts +5 -8
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/ChangeCompression.d.ts +5 -5
- package/lib/ChangeCompression.d.ts.map +1 -1
- package/lib/ChangeCompression.js +3 -3
- package/lib/ChangeCompression.js.map +1 -1
- package/lib/ChangeTypes.d.ts +3 -3
- package/lib/ChangeTypes.d.ts.map +1 -1
- package/lib/ChangeTypes.js +3 -3
- package/lib/ChangeTypes.js.map +1 -1
- package/lib/Checkout.d.ts +7 -7
- package/lib/Checkout.d.ts.map +1 -1
- package/lib/Checkout.js +6 -6
- package/lib/Checkout.js.map +1 -1
- package/lib/Common.d.ts +2 -2
- package/lib/Common.d.ts.map +1 -1
- package/lib/Common.js.map +1 -1
- package/lib/EagerCheckout.d.ts +3 -3
- package/lib/EagerCheckout.d.ts.map +1 -1
- package/lib/EagerCheckout.js +1 -1
- package/lib/EagerCheckout.js.map +1 -1
- package/lib/EditLog.d.ts +4 -6
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +1 -1
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +6 -6
- package/lib/EditUtilities.d.ts.map +1 -1
- package/lib/EditUtilities.js +7 -7
- package/lib/EditUtilities.js.map +1 -1
- package/lib/Forest.d.ts +2 -2
- package/lib/Forest.d.ts.map +1 -1
- package/lib/Forest.js +2 -2
- package/lib/Forest.js.map +1 -1
- package/lib/HistoryEditFactory.d.ts +3 -3
- package/lib/HistoryEditFactory.d.ts.map +1 -1
- package/lib/HistoryEditFactory.js +7 -7
- package/lib/HistoryEditFactory.js.map +1 -1
- package/lib/IdConversion.d.ts +3 -3
- package/lib/IdConversion.d.ts.map +1 -1
- package/lib/IdConversion.js +4 -4
- package/lib/IdConversion.js.map +1 -1
- package/lib/InitialTree.d.ts +1 -1
- package/lib/InitialTree.d.ts.map +1 -1
- package/lib/InitialTree.js +1 -1
- package/lib/InitialTree.js.map +1 -1
- package/lib/LazyCheckout.d.ts +5 -5
- package/lib/LazyCheckout.d.ts.map +1 -1
- package/lib/LazyCheckout.js +1 -1
- package/lib/LazyCheckout.js.map +1 -1
- package/lib/LogViewer.d.ts +7 -7
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +4 -4
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.d.ts +1 -1
- package/lib/MergeHealth.d.ts.map +1 -1
- package/lib/MergeHealth.js +5 -5
- package/lib/MergeHealth.js.map +1 -1
- package/lib/NodeIdUtilities.d.ts +3 -3
- package/lib/NodeIdUtilities.d.ts.map +1 -1
- package/lib/NodeIdUtilities.js +2 -2
- package/lib/NodeIdUtilities.js.map +1 -1
- package/lib/PayloadUtilities.d.ts +1 -1
- package/lib/PayloadUtilities.d.ts.map +1 -1
- package/lib/PayloadUtilities.js.map +1 -1
- package/lib/ReconciliationPath.d.ts +3 -3
- package/lib/ReconciliationPath.d.ts.map +1 -1
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.js +1 -1
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +5 -5
- package/lib/RevisionView.d.ts.map +1 -1
- package/lib/RevisionView.js +3 -3
- package/lib/RevisionView.js.map +1 -1
- package/lib/SerializationUtilities.d.ts +4 -4
- package/lib/SerializationUtilities.d.ts.map +1 -1
- package/lib/SerializationUtilities.js +1 -1
- package/lib/SerializationUtilities.js.map +1 -1
- package/lib/SharedTree.d.ts +15 -18
- package/lib/SharedTree.d.ts.map +1 -1
- package/lib/SharedTree.js +28 -40
- package/lib/SharedTree.js.map +1 -1
- package/lib/SharedTreeEncoder.d.ts +8 -8
- package/lib/SharedTreeEncoder.d.ts.map +1 -1
- package/lib/SharedTreeEncoder.js +12 -12
- package/lib/SharedTreeEncoder.js.map +1 -1
- package/lib/StringInterner.d.ts +1 -1
- package/lib/StringInterner.d.ts.map +1 -1
- package/lib/StringInterner.js +1 -1
- package/lib/StringInterner.js.map +1 -1
- package/lib/Summary.d.ts +4 -4
- package/lib/Summary.d.ts.map +1 -1
- package/lib/Summary.js +1 -1
- package/lib/Summary.js.map +1 -1
- package/lib/SummaryBackCompatibility.d.ts +3 -3
- package/lib/SummaryBackCompatibility.d.ts.map +1 -1
- package/lib/SummaryBackCompatibility.js +3 -3
- package/lib/SummaryBackCompatibility.js.map +1 -1
- package/lib/SummaryTestUtilities.d.ts +2 -2
- package/lib/SummaryTestUtilities.d.ts.map +1 -1
- package/lib/SummaryTestUtilities.js.map +1 -1
- package/lib/Transaction.d.ts +4 -4
- package/lib/Transaction.d.ts.map +1 -1
- package/lib/Transaction.js +5 -5
- package/lib/Transaction.js.map +1 -1
- package/lib/TransactionInternal.d.ts +7 -7
- package/lib/TransactionInternal.d.ts.map +1 -1
- package/lib/TransactionInternal.js +5 -5
- package/lib/TransactionInternal.js.map +1 -1
- package/lib/TreeCompressor.d.ts +4 -4
- package/lib/TreeCompressor.d.ts.map +1 -1
- package/lib/TreeCompressor.js +2 -2
- package/lib/TreeCompressor.js.map +1 -1
- package/lib/TreeNodeHandle.d.ts +3 -3
- package/lib/TreeNodeHandle.d.ts.map +1 -1
- package/lib/TreeNodeHandle.js +1 -1
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.d.ts +3 -3
- package/lib/TreeView.d.ts.map +1 -1
- package/lib/TreeView.js +3 -3
- package/lib/TreeView.js.map +1 -1
- package/lib/TreeViewUtilities.d.ts +2 -2
- package/lib/TreeViewUtilities.d.ts.map +1 -1
- package/lib/TreeViewUtilities.js +1 -1
- package/lib/TreeViewUtilities.js.map +1 -1
- package/lib/UndoRedoHandler.d.ts +2 -2
- package/lib/UndoRedoHandler.d.ts.map +1 -1
- package/lib/UndoRedoHandler.js +2 -2
- package/lib/UndoRedoHandler.js.map +1 -1
- package/lib/UuidUtilities.d.ts +1 -1
- package/lib/UuidUtilities.d.ts.map +1 -1
- package/lib/UuidUtilities.js +1 -1
- package/lib/UuidUtilities.js.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/IdCompressor.d.ts +2 -2
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
- package/lib/id-compressor/IdCompressor.js +6 -6
- package/lib/id-compressor/IdCompressor.js.map +1 -1
- package/lib/id-compressor/IdRange.d.ts +1 -1
- package/lib/id-compressor/IdRange.d.ts.map +1 -1
- package/lib/id-compressor/IdRange.js.map +1 -1
- package/lib/id-compressor/NumericUuid.d.ts +1 -1
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -1
- package/lib/id-compressor/NumericUuid.js +2 -2
- package/lib/id-compressor/NumericUuid.js.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.d.ts +2 -2
- package/lib/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.js +2 -2
- package/lib/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/lib/id-compressor/index.d.ts +4 -4
- package/lib/id-compressor/index.d.ts.map +1 -1
- package/lib/id-compressor/index.js +3 -3
- package/lib/id-compressor/index.js.map +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.d.ts +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.js.map +1 -1
- package/lib/id-compressor/persisted-types/index.d.ts +1 -1
- package/lib/id-compressor/persisted-types/index.d.ts.map +1 -1
- package/lib/id-compressor/persisted-types/index.js.map +1 -1
- package/lib/index.d.ts +29 -29
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +22 -22
- package/lib/index.js.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js +5 -8
- package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +1 -1
- package/lib/migration-shim/migrationShim.d.ts.map +1 -1
- package/lib/migration-shim/migrationShim.js +1 -1
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/migrationShimFactory.js.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js +2 -5
- package/lib/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/lib/migration-shim/types.d.ts +1 -1
- package/lib/migration-shim/types.d.ts.map +1 -1
- package/lib/migration-shim/types.js.map +1 -1
- package/lib/persisted-types/0.0.2.d.ts +1 -1
- package/lib/persisted-types/0.0.2.d.ts.map +1 -1
- package/lib/persisted-types/0.0.2.js.map +1 -1
- package/lib/persisted-types/0.1.1.d.ts +4 -4
- package/lib/persisted-types/0.1.1.d.ts.map +1 -1
- package/lib/persisted-types/0.1.1.js +2 -2
- package/lib/persisted-types/0.1.1.js.map +1 -1
- package/lib/persisted-types/index.d.ts +2 -2
- package/lib/persisted-types/index.d.ts.map +1 -1
- package/lib/persisted-types/index.js +2 -2
- package/lib/persisted-types/index.js.map +1 -1
- package/lib/test/AppendOnlySortedMap.perf.tests.js +2 -2
- package/lib/test/AppendOnlySortedMap.perf.tests.js.map +1 -1
- package/lib/test/AppendOnlySortedMap.tests.js +2 -2
- package/lib/test/AppendOnlySortedMap.tests.js.map +1 -1
- package/lib/test/ChangeCompression.tests.js +9 -9
- package/lib/test/ChangeCompression.tests.js.map +1 -1
- package/lib/test/Checkout.tests.d.ts +1 -1
- package/lib/test/Checkout.tests.d.ts.map +1 -1
- package/lib/test/Checkout.tests.js +2 -2
- package/lib/test/Checkout.tests.js.map +1 -1
- package/lib/test/Common.tests.js +1 -1
- package/lib/test/Common.tests.js.map +1 -1
- package/lib/test/EagerCheckout.tests.js +4 -4
- package/lib/test/EagerCheckout.tests.js.map +1 -1
- package/lib/test/Edit.tests.js +2 -2
- package/lib/test/Edit.tests.js.map +1 -1
- package/lib/test/EditLog.perf.tests.js +4 -4
- package/lib/test/EditLog.perf.tests.js.map +1 -1
- package/lib/test/EditLog.tests.js +3 -3
- package/lib/test/EditLog.tests.js.map +1 -1
- package/lib/test/EditUtilities.tests.js +6 -6
- package/lib/test/EditUtilities.tests.js.map +1 -1
- package/lib/test/Forest.perf.tests.js +4 -4
- package/lib/test/Forest.perf.tests.js.map +1 -1
- package/lib/test/Forest.tests.js +2 -2
- package/lib/test/Forest.tests.js.map +1 -1
- package/lib/test/GenericTransaction.tests.js +3 -3
- package/lib/test/GenericTransaction.tests.js.map +1 -1
- package/lib/test/HistoryEditFactory.tests.js +4 -4
- package/lib/test/HistoryEditFactory.tests.js.map +1 -1
- package/lib/test/IdCompressor.perf.tests.js +4 -4
- package/lib/test/IdCompressor.perf.tests.js.map +1 -1
- package/lib/test/IdCompressor.tests.js +7 -7
- package/lib/test/IdCompressor.tests.js.map +1 -1
- package/lib/test/IdConversion.tests.js +3 -3
- package/lib/test/IdConversion.tests.js.map +1 -1
- package/lib/test/LazyCheckout.tests.js +4 -4
- package/lib/test/LazyCheckout.tests.js.map +1 -1
- package/lib/test/LogViewer.tests.js +12 -12
- package/lib/test/LogViewer.tests.js.map +1 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +6 -6
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +1 -1
- package/lib/test/NumericUuid.perf.tests.js +3 -3
- package/lib/test/NumericUuid.perf.tests.js.map +1 -1
- package/lib/test/NumericUuid.tests.js +4 -4
- package/lib/test/NumericUuid.tests.js.map +1 -1
- package/lib/test/RevisionValueCache.tests.js +2 -2
- package/lib/test/RevisionValueCache.tests.js.map +1 -1
- package/lib/test/RevisionView.tests.js +6 -6
- package/lib/test/RevisionView.tests.js.map +1 -1
- package/lib/test/SessionIdNormalizer.tests.js +3 -3
- package/lib/test/SessionIdNormalizer.tests.js.map +1 -1
- package/lib/test/SharedTree.fuzz.tests.js +1 -1
- package/lib/test/SharedTree.fuzz.tests.js.map +1 -1
- package/lib/test/SharedTree.perf.tests.js +2 -2
- package/lib/test/SharedTree.perf.tests.js.map +1 -1
- package/lib/test/SharedTree.tests.js +7 -7
- package/lib/test/SharedTree.tests.js.map +1 -1
- package/lib/test/StringInterner.tests.js +1 -1
- package/lib/test/StringInterner.tests.js.map +1 -1
- package/lib/test/Summary.tests.d.ts +2 -2
- package/lib/test/Summary.tests.d.ts.map +1 -1
- package/lib/test/Summary.tests.js +14 -14
- package/lib/test/Summary.tests.js.map +1 -1
- package/lib/test/Transaction.tests.js +5 -5
- package/lib/test/Transaction.tests.js.map +1 -1
- package/lib/test/TransactionInternal.tests.js +7 -7
- package/lib/test/TransactionInternal.tests.js.map +1 -1
- package/lib/test/TreeCompression.tests.js +8 -8
- package/lib/test/TreeCompression.tests.js.map +1 -1
- package/lib/test/TreeView.tests.js +3 -3
- package/lib/test/TreeView.tests.js.map +1 -1
- package/lib/test/UndoRedoHandler.tests.js +2 -2
- package/lib/test/UndoRedoHandler.tests.js.map +1 -1
- package/lib/test/fuzz/Generators.d.ts +1 -1
- package/lib/test/fuzz/Generators.d.ts.map +1 -1
- package/lib/test/fuzz/Generators.js +4 -4
- package/lib/test/fuzz/Generators.js.map +1 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +1 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +1 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.js +5 -5
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +1 -1
- package/lib/test/fuzz/Types.d.ts +6 -6
- package/lib/test/fuzz/Types.d.ts.map +1 -1
- package/lib/test/fuzz/Types.js.map +1 -1
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +6 -6
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/IdCompressorTestUtilities.js +6 -6
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +1 -1
- package/lib/test/utilities/MockTransaction.d.ts +4 -4
- package/lib/test/utilities/MockTransaction.d.ts.map +1 -1
- package/lib/test/utilities/MockTransaction.js +3 -3
- package/lib/test/utilities/MockTransaction.js.map +1 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts +1 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +1 -1
- package/lib/test/utilities/PendingLocalStateTests.js +5 -5
- package/lib/test/utilities/PendingLocalStateTests.js.map +1 -1
- package/lib/test/utilities/SharedTreeTests.d.ts +2 -2
- package/lib/test/utilities/SharedTreeTests.d.ts.map +1 -1
- package/lib/test/utilities/SharedTreeTests.js +22 -22
- package/lib/test/utilities/SharedTreeTests.js.map +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.js +10 -10
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +1 -1
- package/lib/test/utilities/SummaryLoadPerfTests.js +6 -6
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +1 -1
- package/lib/test/utilities/SummarySizeTests.d.ts +1 -1
- package/lib/test/utilities/SummarySizeTests.d.ts.map +1 -1
- package/lib/test/utilities/SummarySizeTests.js +5 -5
- package/lib/test/utilities/SummarySizeTests.js.map +1 -1
- package/lib/test/utilities/TestNode.d.ts +6 -6
- package/lib/test/utilities/TestNode.d.ts.map +1 -1
- package/lib/test/utilities/TestNode.js +5 -5
- package/lib/test/utilities/TestNode.js.map +1 -1
- package/lib/test/utilities/TestUtilities.d.ts +12 -12
- package/lib/test/utilities/TestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/TestUtilities.js +18 -19
- package/lib/test/utilities/TestUtilities.js.map +1 -1
- package/lib/test/utilities/UndoRedoTests.d.ts +2 -2
- package/lib/test/utilities/UndoRedoTests.d.ts.map +1 -1
- package/lib/test/utilities/UndoRedoTests.js +7 -7
- package/lib/test/utilities/UndoRedoTests.js.map +1 -1
- package/package.json +57 -31
- package/src/ChangeCompression.ts +7 -7
- package/src/ChangeTypes.ts +5 -5
- package/src/Checkout.ts +13 -13
- package/src/Common.ts +2 -2
- package/src/EagerCheckout.ts +3 -3
- package/src/EditLog.ts +6 -7
- package/src/EditUtilities.ts +10 -10
- package/src/Forest.ts +4 -4
- package/src/HistoryEditFactory.ts +11 -11
- package/src/IdConversion.ts +4 -4
- package/src/InitialTree.ts +3 -3
- package/src/LazyCheckout.ts +5 -5
- package/src/LogViewer.ts +8 -8
- package/src/MergeHealth.ts +6 -6
- package/src/NodeIdUtilities.ts +4 -4
- package/src/PayloadUtilities.ts +1 -1
- package/src/ReconciliationPath.ts +3 -3
- package/src/RevisionValueCache.ts +1 -1
- package/src/RevisionView.ts +7 -7
- package/src/SerializationUtilities.ts +5 -5
- package/src/SharedTree.ts +34 -54
- package/src/SharedTreeEncoder.ts +15 -15
- package/src/StringInterner.ts +2 -2
- package/src/Summary.ts +5 -5
- package/src/SummaryBackCompatibility.ts +10 -5
- package/src/SummaryTestUtilities.ts +3 -3
- package/src/Transaction.ts +8 -8
- package/src/TransactionInternal.ts +8 -8
- package/src/TreeCompressor.ts +6 -6
- package/src/TreeNodeHandle.ts +4 -4
- package/src/TreeView.ts +4 -4
- package/src/TreeViewUtilities.ts +3 -3
- package/src/UndoRedoHandler.ts +4 -4
- package/src/UuidUtilities.ts +2 -2
- package/src/id-compressor/AppendOnlySortedMap.ts +1 -1
- package/src/id-compressor/IdCompressor.ts +8 -8
- package/src/id-compressor/IdRange.ts +1 -1
- package/src/id-compressor/NumericUuid.ts +3 -3
- package/src/id-compressor/SessionIdNormalizer.ts +4 -4
- package/src/id-compressor/index.ts +4 -4
- package/src/id-compressor/persisted-types/0.0.1.ts +1 -1
- package/src/id-compressor/persisted-types/index.ts +1 -1
- package/src/index.ts +29 -29
- package/src/migration-shim/migrationDeltaHandler.ts +9 -10
- package/src/migration-shim/migrationShim.ts +7 -5
- package/src/migration-shim/migrationShimFactory.ts +4 -1
- package/src/migration-shim/sharedTreeDeltaHandler.ts +7 -6
- package/src/migration-shim/types.ts +1 -1
- package/src/persisted-types/0.0.2.ts +1 -1
- package/src/persisted-types/0.1.1.ts +4 -4
- package/src/persisted-types/index.ts +2 -2
- package/tsconfig.esnext.json +1 -2
- package/tsconfig.json +3 -0
- package/lib/test/Attach.tests.d.ts +0 -6
- package/lib/test/Attach.tests.d.ts.map +0 -1
- package/lib/test/Attach.tests.js +0 -52
- package/lib/test/Attach.tests.js.map +0 -1
package/src/index.ts
CHANGED
|
@@ -29,11 +29,11 @@ export {
|
|
|
29
29
|
SetValue,
|
|
30
30
|
StablePlace,
|
|
31
31
|
StableRange,
|
|
32
|
-
} from './ChangeTypes';
|
|
33
|
-
export { Checkout, CheckoutEvent, ICheckoutEvents, EditValidationResult } from './Checkout';
|
|
34
|
-
export { isSharedTreeEvent, sharedTreeAssertionErrorType, Result } from './Common';
|
|
35
|
-
export { EagerCheckout } from './EagerCheckout';
|
|
36
|
-
export type { OrderedEditSet, EditHandle } from './EditLog';
|
|
32
|
+
} from './ChangeTypes.js';
|
|
33
|
+
export { Checkout, CheckoutEvent, ICheckoutEvents, EditValidationResult } from './Checkout.js';
|
|
34
|
+
export { isSharedTreeEvent, sharedTreeAssertionErrorType, Result } from './Common.js';
|
|
35
|
+
export { EagerCheckout } from './EagerCheckout.js';
|
|
36
|
+
export type { OrderedEditSet, EditHandle } from './EditLog.js';
|
|
37
37
|
export {
|
|
38
38
|
setTrait,
|
|
39
39
|
areRevisionViewsSemanticallyEqual,
|
|
@@ -42,9 +42,9 @@ export {
|
|
|
42
42
|
PlaceValidationResult,
|
|
43
43
|
RangeValidationResult,
|
|
44
44
|
RangeValidationResultKind,
|
|
45
|
-
} from './EditUtilities';
|
|
46
|
-
export { SharedTreeDiagnosticEvent, SharedTreeEvent } from './EventTypes';
|
|
47
|
-
export { Delta, Forest, ForestNode, ParentData } from './Forest';
|
|
45
|
+
} from './EditUtilities.js';
|
|
46
|
+
export { SharedTreeDiagnosticEvent, SharedTreeEvent } from './EventTypes.js';
|
|
47
|
+
export { Delta, Forest, ForestNode, ParentData } from './Forest.js';
|
|
48
48
|
export type {
|
|
49
49
|
CompressedId,
|
|
50
50
|
Definition,
|
|
@@ -61,18 +61,18 @@ export type {
|
|
|
61
61
|
TraitLabel,
|
|
62
62
|
UuidString,
|
|
63
63
|
AttributionId,
|
|
64
|
-
} from './Identifiers';
|
|
65
|
-
export { isDetachedSequenceId } from './Identifiers';
|
|
66
|
-
export { initialTree } from './InitialTree';
|
|
67
|
-
export { LazyCheckout } from './LazyCheckout';
|
|
68
|
-
export { LogViewer } from './LogViewer';
|
|
69
|
-
export { NodeIdContext, NodeIdGenerator, NodeIdConverter } from './NodeIdUtilities';
|
|
64
|
+
} from './Identifiers.js';
|
|
65
|
+
export { isDetachedSequenceId } from './Identifiers.js';
|
|
66
|
+
export { initialTree } from './InitialTree.js';
|
|
67
|
+
export { LazyCheckout } from './LazyCheckout.js';
|
|
68
|
+
export { LogViewer } from './LogViewer.js';
|
|
69
|
+
export { NodeIdContext, NodeIdGenerator, NodeIdConverter } from './NodeIdUtilities.js';
|
|
70
70
|
export {
|
|
71
71
|
MergeHealthStats,
|
|
72
72
|
SharedTreeMergeHealthTelemetryHeartbeat,
|
|
73
73
|
useFailedSequencedEditTelemetry,
|
|
74
|
-
} from './MergeHealth';
|
|
75
|
-
export { comparePayloads } from './PayloadUtilities';
|
|
74
|
+
} from './MergeHealth.js';
|
|
75
|
+
export { comparePayloads } from './PayloadUtilities.js';
|
|
76
76
|
export {
|
|
77
77
|
Side,
|
|
78
78
|
EditStatus,
|
|
@@ -114,12 +114,12 @@ export {
|
|
|
114
114
|
DetachInternal_0_0_2,
|
|
115
115
|
SetValueInternal_0_0_2,
|
|
116
116
|
TraitLocationInternal,
|
|
117
|
-
} from './persisted-types';
|
|
118
|
-
export { ReconciliationChange, ReconciliationEdit, ReconciliationPath } from './ReconciliationPath';
|
|
119
|
-
export { Revision } from './RevisionValueCache';
|
|
120
|
-
export { RevisionView, TransactionView } from './RevisionView';
|
|
121
|
-
export { TreeNodeHandle } from './TreeNodeHandle';
|
|
122
|
-
export { getTraitLocationOfRange, placeFromStablePlace, rangeFromStableRange } from './TreeViewUtilities';
|
|
117
|
+
} from './persisted-types/index.js';
|
|
118
|
+
export { ReconciliationChange, ReconciliationEdit, ReconciliationPath } from './ReconciliationPath.js';
|
|
119
|
+
export { Revision } from './RevisionValueCache.js';
|
|
120
|
+
export { RevisionView, TransactionView } from './RevisionView.js';
|
|
121
|
+
export { TreeNodeHandle } from './TreeNodeHandle.js';
|
|
122
|
+
export { getTraitLocationOfRange, placeFromStablePlace, rangeFromStableRange } from './TreeViewUtilities.js';
|
|
123
123
|
export {
|
|
124
124
|
SharedTreeArgs,
|
|
125
125
|
SharedTreeOptions,
|
|
@@ -135,8 +135,8 @@ export {
|
|
|
135
135
|
EditApplicationOutcome,
|
|
136
136
|
ISharedTreeEvents,
|
|
137
137
|
StashedLocalOpMetadata,
|
|
138
|
-
} from './SharedTree';
|
|
139
|
-
export { StringInterner } from './StringInterner';
|
|
138
|
+
} from './SharedTree.js';
|
|
139
|
+
export { StringInterner } from './StringInterner.js';
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
142
|
* TODO:#61413: Publish test utilities from a separate test package
|
|
@@ -144,9 +144,9 @@ export { StringInterner } from './StringInterner';
|
|
|
144
144
|
export {
|
|
145
145
|
getSerializedUploadedEditChunkContents as getUploadedEditChunkContents,
|
|
146
146
|
getSerializedUploadedEditChunkContents,
|
|
147
|
-
} from './SummaryTestUtilities';
|
|
147
|
+
} from './SummaryTestUtilities.js';
|
|
148
148
|
|
|
149
|
-
export { Transaction, TransactionEvent, TransactionEvents } from './Transaction';
|
|
149
|
+
export { Transaction, TransactionEvent, TransactionEvents } from './Transaction.js';
|
|
150
150
|
export {
|
|
151
151
|
TransactionInternal,
|
|
152
152
|
GenericTransaction,
|
|
@@ -160,7 +160,7 @@ export {
|
|
|
160
160
|
SucceedingTransactionState,
|
|
161
161
|
FailingTransactionState,
|
|
162
162
|
ChangeResult,
|
|
163
|
-
} from './TransactionInternal';
|
|
163
|
+
} from './TransactionInternal.js';
|
|
164
164
|
export {
|
|
165
165
|
NodeInTrait,
|
|
166
166
|
PlaceIndex,
|
|
@@ -170,7 +170,7 @@ export {
|
|
|
170
170
|
TreeViewPlace,
|
|
171
171
|
TreeViewRange,
|
|
172
172
|
TraitLocation,
|
|
173
|
-
} from './TreeView';
|
|
173
|
+
} from './TreeView.js';
|
|
174
174
|
|
|
175
175
|
export {
|
|
176
176
|
type IMigrationEvent,
|
|
@@ -179,4 +179,4 @@ export {
|
|
|
179
179
|
MigrationShimFactory,
|
|
180
180
|
SharedTreeShim,
|
|
181
181
|
SharedTreeShimFactory,
|
|
182
|
-
} from './migration-shim';
|
|
182
|
+
} from './migration-shim/index.js';
|
|
@@ -82,10 +82,7 @@ export class MigrationShimDeltaHandler implements IShimDeltaHandler {
|
|
|
82
82
|
public process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void {
|
|
83
83
|
// This allows us to process the migrate op and prevent the shared object from processing the wrong ops
|
|
84
84
|
assert(!this.isPreAttachState(), 0x82c /* Can't process ops before attaching tree handler */);
|
|
85
|
-
if (
|
|
86
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
87
|
-
message.type !== MessageType.Operation
|
|
88
|
-
) {
|
|
85
|
+
if (message.type !== MessageType.Operation) {
|
|
89
86
|
return;
|
|
90
87
|
}
|
|
91
88
|
|
|
@@ -119,16 +116,18 @@ export class MigrationShimDeltaHandler implements IShimDeltaHandler {
|
|
|
119
116
|
return this.treeDeltaHandler.reSubmit(contents, localOpMetadata);
|
|
120
117
|
}
|
|
121
118
|
|
|
122
|
-
public applyStashedOp(contents: unknown):
|
|
119
|
+
public applyStashedOp(contents: unknown): void {
|
|
123
120
|
const opContents = contents as IOpContents;
|
|
124
121
|
if (this.isInV1StateAndIsBarrierOp(opContents)) {
|
|
125
|
-
|
|
122
|
+
this.submitLocalMessage(opContents);
|
|
123
|
+
return;
|
|
126
124
|
}
|
|
127
125
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
assert(
|
|
127
|
+
!this.shouldDropOp(opContents),
|
|
128
|
+
0x8aa /* MigrationShim should not be able to apply v1 ops as they shouldn't have been created locally. */
|
|
129
|
+
);
|
|
130
|
+
this.treeDeltaHandler.applyStashedOp(contents);
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
public rollback?(contents: unknown, localOpMetadata: unknown): void {
|
|
@@ -15,15 +15,17 @@ import {
|
|
|
15
15
|
type IGarbageCollectionData,
|
|
16
16
|
type ITelemetryContext,
|
|
17
17
|
type ISummaryTreeWithStats,
|
|
18
|
-
IIdCompressorCore,
|
|
19
|
-
SessionId,
|
|
20
18
|
} from '@fluidframework/runtime-definitions';
|
|
21
19
|
import { type ITree } from '@fluidframework/tree';
|
|
22
20
|
import { assert } from '@fluidframework/core-utils';
|
|
23
21
|
import { MessageType, type ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
24
22
|
import { type EventEmitterEventType } from '@fluid-internal/client-utils';
|
|
25
23
|
import { DataProcessingError, EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils';
|
|
26
|
-
import
|
|
24
|
+
import type { SessionId, IIdCompressorCore } from '@fluidframework/id-compressor';
|
|
25
|
+
import {
|
|
26
|
+
type SharedTreeFactory as LegacySharedTreeFactory,
|
|
27
|
+
type SharedTree as LegacySharedTree,
|
|
28
|
+
} from '../SharedTree.js';
|
|
27
29
|
import { type IShimChannelServices, NoDeltasChannelServices } from './shimChannelServices.js';
|
|
28
30
|
import { MigrationShimDeltaHandler } from './migrationDeltaHandler.js';
|
|
29
31
|
import { PreMigrationDeltaConnection, StampDeltaConnection } from './shimDeltaConnection.js';
|
|
@@ -197,12 +199,12 @@ export class MigrationShim extends EventEmitterWithErrorHandling<IMigrationEvent
|
|
|
197
199
|
this.runtime.attachState === AttachState.Detached
|
|
198
200
|
? new NoDeltasChannelServices(services)
|
|
199
201
|
: this.generateShimServicesOnce(services);
|
|
200
|
-
this._legacyTree =
|
|
202
|
+
this._legacyTree = await this.legacyTreeFactory.load(
|
|
201
203
|
this.runtime,
|
|
202
204
|
this.id,
|
|
203
205
|
shimServices,
|
|
204
206
|
this.legacyTreeFactory.attributes
|
|
205
|
-
)
|
|
207
|
+
);
|
|
206
208
|
}
|
|
207
209
|
public create(): void {
|
|
208
210
|
this._legacyTree = this.legacyTreeFactory.create(this.runtime, this.id);
|
|
@@ -11,7 +11,10 @@ import {
|
|
|
11
11
|
type IChannelFactory,
|
|
12
12
|
} from '@fluidframework/datastore-definitions';
|
|
13
13
|
import { type ITree } from '@fluidframework/tree';
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
type SharedTreeFactory as LegacySharedTreeFactory,
|
|
16
|
+
type SharedTree as LegacySharedTree,
|
|
17
|
+
} from '../SharedTree.js';
|
|
15
18
|
import { MigrationShim } from './migrationShim.js';
|
|
16
19
|
import { attributesMatch } from './utils.js';
|
|
17
20
|
|
|
@@ -50,7 +50,7 @@ export class SharedTreeShimDeltaHandler implements IShimDeltaHandler {
|
|
|
50
50
|
// This allows us to process the migrate op and prevent the shared object from processing the wrong ops
|
|
51
51
|
// Drop v1 ops
|
|
52
52
|
assert(this.hasTreeDeltaHandler(), 0x831 /* Can't process ops before attaching tree handler */);
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
if (message.type !== MessageType.Operation) {
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
@@ -76,11 +76,12 @@ export class SharedTreeShimDeltaHandler implements IShimDeltaHandler {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
// We are not capable of applying stashed v1 ops.
|
|
79
|
-
public applyStashedOp(contents: unknown):
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
public applyStashedOp(contents: unknown): void {
|
|
80
|
+
assert(
|
|
81
|
+
!this.shouldDropOp(contents as IOpContents),
|
|
82
|
+
0x8ab /* SharedTreeShim should not be able to apply v1 ops as they shouldn't have been created locally. */
|
|
83
|
+
);
|
|
84
|
+
this.handler.applyStashedOp(contents);
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
/**
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
type IChannelServices,
|
|
11
11
|
type IDeltaHandler,
|
|
12
12
|
} from '@fluidframework/datastore-definitions';
|
|
13
|
-
import { type SharedTree as LegacySharedTree } from '../SharedTree';
|
|
13
|
+
import { type SharedTree as LegacySharedTree } from '../SharedTree.js';
|
|
14
14
|
import { type IMigrationOp } from './migrationShim.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from '@fluidframework/core-utils';
|
|
7
|
-
import { assertNotUndefined, ReplaceRecursive } from '../Common';
|
|
7
|
+
import { assertNotUndefined, ReplaceRecursive } from '../Common.js';
|
|
8
8
|
// These are re-exported from a persisted-types file.
|
|
9
9
|
import type {
|
|
10
10
|
IdCreationRange,
|
|
11
11
|
SerializedIdCompressorWithNoSession,
|
|
12
12
|
SerializedIdCompressorWithOngoingSession,
|
|
13
|
-
} from '../id-compressor';
|
|
13
|
+
} from '../id-compressor/index.js';
|
|
14
14
|
import type {
|
|
15
15
|
Definition,
|
|
16
16
|
DetachedSequenceId,
|
|
@@ -22,7 +22,7 @@ import type {
|
|
|
22
22
|
SessionId,
|
|
23
23
|
TraitLabel,
|
|
24
24
|
UuidString,
|
|
25
|
-
} from '../Identifiers';
|
|
25
|
+
} from '../Identifiers.js';
|
|
26
26
|
import {
|
|
27
27
|
BuildInternal_0_0_2,
|
|
28
28
|
ChangeTypeInternal,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
TreeNodeSequence,
|
|
47
47
|
VersionedOp,
|
|
48
48
|
WriteFormat,
|
|
49
|
-
} from './0.0.2';
|
|
49
|
+
} from './0.0.2.js';
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Specifies the location of a trait (a labeled sequence of nodes) within the tree.
|
|
@@ -40,7 +40,7 @@ export {
|
|
|
40
40
|
TreeNodeSequence,
|
|
41
41
|
VersionedOp,
|
|
42
42
|
WriteFormat,
|
|
43
|
-
} from './0.0.2';
|
|
43
|
+
} from './0.0.2.js';
|
|
44
44
|
export {
|
|
45
45
|
BuildInternal,
|
|
46
46
|
BuildNodeInternal,
|
|
@@ -70,4 +70,4 @@ export {
|
|
|
70
70
|
StablePlaceInternal,
|
|
71
71
|
StableRangeInternal,
|
|
72
72
|
TraitLocationInternal,
|
|
73
|
-
} from './0.1.1';
|
|
73
|
+
} from './0.1.1.js';
|
package/tsconfig.esnext.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
// This config must be used in a "type": "commonjs" environment. (Use `fluid-tsc commonjs`.)
|
|
2
3
|
"extends": "@fluidframework/build-common/ts-common-config.json",
|
|
3
4
|
"exclude": ["dist", "node_modules"],
|
|
4
5
|
"compilerOptions": {
|
|
@@ -6,6 +7,8 @@
|
|
|
6
7
|
"downlevelIteration": true,
|
|
7
8
|
"noUnusedLocals": false,
|
|
8
9
|
"outDir": "./dist",
|
|
10
|
+
"module": "Node16",
|
|
11
|
+
"moduleResolution": "Node16",
|
|
9
12
|
"rootDir": "./src",
|
|
10
13
|
"types": ["mocha"]
|
|
11
14
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Attach.tests.d.ts","sourceRoot":"","sources":["../../src/test/Attach.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
package/lib/test/Attach.tests.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { strict as assert } from 'assert';
|
|
6
|
-
import { TestObjectProvider, TestFluidObjectFactory, createContainerRuntimeFactoryWithDefaultDataStore, } from '@fluidframework/test-utils';
|
|
7
|
-
import { LocalServerTestDriver } from '@fluid-private/test-drivers';
|
|
8
|
-
import { Loader } from '@fluidframework/container-loader';
|
|
9
|
-
import { SharedTree } from '../SharedTree';
|
|
10
|
-
import { Change, StablePlace } from '../ChangeTypes';
|
|
11
|
-
describe('Attach Tests', () => {
|
|
12
|
-
const provideEntryPoint = async (containerRuntime) => {
|
|
13
|
-
const handle = await containerRuntime.getAliasedDataStoreEntryPoint('default');
|
|
14
|
-
if (handle === undefined) {
|
|
15
|
-
throw new Error('Could not get default data store entry point');
|
|
16
|
-
}
|
|
17
|
-
return handle.get();
|
|
18
|
-
};
|
|
19
|
-
const treeFactory = SharedTree.getFactory();
|
|
20
|
-
const dataObjectFactory = new TestFluidObjectFactory([['tree', treeFactory]]);
|
|
21
|
-
const runtimeFactory = createContainerRuntimeFactoryWithDefaultDataStore(undefined, {
|
|
22
|
-
defaultFactory: dataObjectFactory,
|
|
23
|
-
registryEntries: [[dataObjectFactory.type, Promise.resolve(dataObjectFactory)]],
|
|
24
|
-
provideEntryPoint,
|
|
25
|
-
});
|
|
26
|
-
let provider;
|
|
27
|
-
it('Tree can be attached with local changes after the datastore is attached', async () => {
|
|
28
|
-
const driver = new LocalServerTestDriver();
|
|
29
|
-
provider = new TestObjectProvider(Loader, driver, () => runtimeFactory);
|
|
30
|
-
const container = await provider.createContainer(runtimeFactory);
|
|
31
|
-
const testObj = (await container.getEntryPoint());
|
|
32
|
-
const someNodeId = 'someNodeId';
|
|
33
|
-
const tree = testObj.runtime.createChannel('abc', treeFactory.type);
|
|
34
|
-
const inventoryNode = {
|
|
35
|
-
definition: someNodeId,
|
|
36
|
-
traits: {
|
|
37
|
-
quantity: {
|
|
38
|
-
definition: 'quantity',
|
|
39
|
-
payload: 5,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
tree.applyEdit(Change.insertTree(inventoryNode, StablePlace.atStartOf({
|
|
44
|
-
parent: tree.currentView.root,
|
|
45
|
-
label: someNodeId,
|
|
46
|
-
})));
|
|
47
|
-
assert.doesNotThrow(() => testObj.root.set('any', tree.handle), "Can't attach tree");
|
|
48
|
-
await provider.ensureSynchronized();
|
|
49
|
-
provider.reset();
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=Attach.tests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Attach.tests.js","sourceRoot":"","sources":["../../src/test/Attach.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EACN,kBAAkB,EAElB,sBAAsB,EAEtB,iDAAiD,GACjD,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAa,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGhE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC7B,MAAM,iBAAiB,GAAG,KAAK,EAAE,gBAAqB,EAAwB,EAAE;QAC/E,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;QAC/E,IAAI,MAAM,KAAK,SAAS,EAAE;YACzB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;SAChE;QACD,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IAC5C,MAAM,iBAAiB,GAAG,IAAI,sBAAsB,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,MAAM,cAAc,GAAG,iDAAiD,CAAC,SAAS,EAAE;QACnF,cAAc,EAAE,iBAAiB;QACjC,eAAe,EAAE,CAAC,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAC/E,iBAAiB;KACjB,CAAC,CAAC;IAEH,IAAI,QAA6B,CAAC;IAClC,EAAE,CAAC,yEAAyE,EAAE,KAAK,IAAI,EAAE;QACxF,MAAM,MAAM,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAC3C,QAAQ,GAAG,IAAI,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC;QACxE,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;QACjE,MAAM,OAAO,GAAG,CAAC,MAAM,SAAS,CAAC,aAAa,EAAE,CAAqB,CAAC;QACtE,MAAM,UAAU,GAAG,YAA0B,CAAC;QAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAe,CAAC;QAClF,MAAM,aAAa,GAAc;YAChC,UAAU,EAAE,UAAU;YACtB,MAAM,EAAE;gBACP,QAAQ,EAAE;oBACT,UAAU,EAAE,UAAU;oBACtB,OAAO,EAAE,CAAC;iBACV;aACD;SACD,CAAC;QACF,IAAI,CAAC,SAAS,CACb,MAAM,CAAC,UAAU,CAChB,aAAa,EACb,WAAW,CAAC,SAAS,CAAC;YACrB,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YAC7B,KAAK,EAAE,UAAU;SACjB,CAAC,CACF,CACD,CAAC;QACF,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC,CAAC;QACrF,MAAM,QAAQ,CAAC,kBAAkB,EAAE,CAAC;QACpC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from 'assert';\nimport {\n\tTestObjectProvider,\n\ttype ITestObjectProvider,\n\tTestFluidObjectFactory,\n\tITestFluidObject,\n\tcreateContainerRuntimeFactoryWithDefaultDataStore,\n} from '@fluidframework/test-utils';\nimport { LocalServerTestDriver } from '@fluid-private/test-drivers';\nimport { Loader } from '@fluidframework/container-loader';\nimport { FluidObject } from '@fluidframework/core-interfaces';\nimport { SharedTree } from '../SharedTree';\nimport { BuildNode, Change, StablePlace } from '../ChangeTypes';\nimport { TraitLabel } from '../Identifiers';\n\ndescribe('Attach Tests', () => {\n\tconst provideEntryPoint = async (containerRuntime: any): Promise<FluidObject> => {\n\t\tconst handle = await containerRuntime.getAliasedDataStoreEntryPoint('default');\n\t\tif (handle === undefined) {\n\t\t\tthrow new Error('Could not get default data store entry point');\n\t\t}\n\t\treturn handle.get();\n\t};\n\n\tconst treeFactory = SharedTree.getFactory();\n\tconst dataObjectFactory = new TestFluidObjectFactory([['tree', treeFactory]]);\n\tconst runtimeFactory = createContainerRuntimeFactoryWithDefaultDataStore(undefined, {\n\t\tdefaultFactory: dataObjectFactory,\n\t\tregistryEntries: [[dataObjectFactory.type, Promise.resolve(dataObjectFactory)]],\n\t\tprovideEntryPoint,\n\t});\n\n\tlet provider: ITestObjectProvider;\n\tit('Tree can be attached with local changes after the datastore is attached', async () => {\n\t\tconst driver = new LocalServerTestDriver();\n\t\tprovider = new TestObjectProvider(Loader, driver, () => runtimeFactory);\n\t\tconst container = await provider.createContainer(runtimeFactory);\n\t\tconst testObj = (await container.getEntryPoint()) as ITestFluidObject;\n\t\tconst someNodeId = 'someNodeId' as TraitLabel;\n\t\tconst tree = testObj.runtime.createChannel('abc', treeFactory.type) as SharedTree;\n\t\tconst inventoryNode: BuildNode = {\n\t\t\tdefinition: someNodeId,\n\t\t\ttraits: {\n\t\t\t\tquantity: {\n\t\t\t\t\tdefinition: 'quantity',\n\t\t\t\t\tpayload: 5,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t\ttree.applyEdit(\n\t\t\tChange.insertTree(\n\t\t\t\tinventoryNode,\n\t\t\t\tStablePlace.atStartOf({\n\t\t\t\t\tparent: tree.currentView.root,\n\t\t\t\t\tlabel: someNodeId,\n\t\t\t\t})\n\t\t\t)\n\t\t);\n\t\tassert.doesNotThrow(() => testObj.root.set('any', tree.handle), \"Can't attach tree\");\n\t\tawait provider.ensureSynchronized();\n\t\tprovider.reset();\n\t});\n});\n"]}
|