@fluidframework/map
Advanced tools
Comparing version 2.0.0-rc.4.0.6 to 2.0.0-rc.5.0.0
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "../../../common/build/build-common/api-extractor-base.esm.primary.json" | ||
"extends": "../../../common/build/build-common/api-extractor-base.esm.current.json" | ||
} |
# @fluidframework/map | ||
## 2.0.0-rc.5.0.0 | ||
### Minor Changes | ||
- Update to TypeScript 5.4 ([#21214](https://github.com/microsoft/FluidFramework/pull/21214)) [0e6256c722](https://github.com/microsoft/FluidFramework/commit/0e6256c722d8bf024f4325bf02547daeeb18bfa6) | ||
Update package implementations to use TypeScript 5.4.5. | ||
## 2.0.0-rc.4.0.0 | ||
@@ -4,0 +12,0 @@ |
@@ -6,7 +6,7 @@ /*! | ||
import { TypedEventEmitter } from "@fluid-internal/client-utils"; | ||
import type { IChannelAttributes, IChannelStorageService, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions"; | ||
import type { IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions/internal"; | ||
import { type ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal"; | ||
import { RedBlackTree } from "@fluidframework/merge-tree/internal"; | ||
import { type ISequencedDocumentMessage } from "@fluidframework/protocol-definitions"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions/internal"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import { SharedObject } from "@fluidframework/shared-object-base/internal"; | ||
@@ -13,0 +13,0 @@ import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal"; |
@@ -5,4 +5,3 @@ /*! | ||
*/ | ||
import type { IChannelAttributes, IChannelFactory, IChannelServices, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions"; | ||
import type { ISharedObjectKind } from "@fluidframework/shared-object-base"; | ||
import type { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChannelServices } from "@fluidframework/datastore-definitions/internal"; | ||
import type { ISharedDirectory } from "./interfaces.js"; | ||
@@ -45,3 +44,3 @@ /** | ||
*/ | ||
export declare const SharedDirectory: ISharedObjectKind<ISharedDirectory>; | ||
export declare const SharedDirectory: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedDirectory> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedDirectory>; | ||
/** | ||
@@ -48,0 +47,0 @@ * Entrypoint for {@link ISharedDirectory} creation. |
@@ -19,4 +19,4 @@ /*! | ||
export { DirectoryFactory, SharedDirectory } from "./directoryFactory.js"; | ||
export type { ICreateInfo, IDirectoryNewStorageFormat, IDirectoryDataObject } from "./directory.js"; | ||
export type { ICreateInfo, IDirectoryNewStorageFormat, IDirectoryDataObject, } from "./directory.js"; | ||
export type { ISerializableValue } from "./internalInterfaces.js"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,3 +6,3 @@ /*! | ||
import type { IDisposable, IEvent, IEventProvider, IEventThisPlaceHolder } from "@fluidframework/core-interfaces"; | ||
import type { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-object-base"; | ||
import type { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-object-base/internal"; | ||
/** | ||
@@ -263,4 +263,6 @@ * Type of "valueChanged" event parameter. | ||
/** | ||
* The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting | ||
* and retrieving values that JavaScript developers are accustomed to with the | ||
* The SharedMap distributed data structure can be used to store key-value pairs. | ||
* | ||
* @remarks | ||
* SharedMap provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the | ||
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object. | ||
@@ -270,2 +272,4 @@ * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a | ||
* | ||
* Note: unlike JavaScript maps, SharedMap does not make any guarantees regarding enumeration order. | ||
* | ||
* For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}. | ||
@@ -272,0 +276,0 @@ * @sealed |
@@ -6,3 +6,3 @@ /*! | ||
import type { IFluidHandle } from "@fluidframework/core-interfaces"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import type { ISerializableValue, ISerializedValue } from "./internalInterfaces.js"; | ||
@@ -9,0 +9,0 @@ /** |
@@ -5,6 +5,6 @@ /*! | ||
*/ | ||
import type { IChannelAttributes, IChannelStorageService, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions"; | ||
import { type ISequencedDocumentMessage } from "@fluidframework/protocol-definitions"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions/internal"; | ||
import { type ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions/internal"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import { SharedObject } from "@fluidframework/shared-object-base/internal"; | ||
@@ -11,0 +11,0 @@ import type { ISharedMap, ISharedMapEvents } from "./interfaces.js"; |
@@ -9,6 +9,6 @@ "use strict"; | ||
exports.SharedMap = void 0; | ||
const internal_1 = require("@fluidframework/driver-utils/internal"); | ||
const protocol_definitions_1 = require("@fluidframework/protocol-definitions"); | ||
const internal_2 = require("@fluidframework/runtime-utils/internal"); | ||
const internal_3 = require("@fluidframework/shared-object-base/internal"); | ||
const internal_1 = require("@fluidframework/driver-definitions/internal"); | ||
const internal_2 = require("@fluidframework/driver-utils/internal"); | ||
const internal_3 = require("@fluidframework/runtime-utils/internal"); | ||
const internal_4 = require("@fluidframework/shared-object-base/internal"); | ||
const mapKernel_js_1 = require("./mapKernel.js"); | ||
@@ -19,3 +19,3 @@ const snapshotFileName = "header"; | ||
*/ | ||
class SharedMap extends internal_3.SharedObject { | ||
class SharedMap extends internal_4.SharedObject { | ||
/** | ||
@@ -131,3 +131,3 @@ * Do not call the constructor. Instead, you should use the {@link SharedMap.create | create method}. | ||
const blobs = []; | ||
const builder = new internal_2.SummaryTreeBuilder(); | ||
const builder = new internal_3.SummaryTreeBuilder(); | ||
const data = this.kernel.getSerializedStorage(serializer); | ||
@@ -178,5 +178,3 @@ // If single property exceeds this size, it goes into its own blob | ||
type: value.type, | ||
value: value.value === undefined | ||
? undefined | ||
: JSON.parse(value.value), | ||
value: value.value === undefined ? undefined : JSON.parse(value.value), | ||
}; | ||
@@ -196,3 +194,3 @@ } | ||
async loadCore(storage) { | ||
const json = await (0, internal_1.readAndParse)(storage, snapshotFileName); | ||
const json = await (0, internal_2.readAndParse)(storage, snapshotFileName); | ||
const newFormat = json; | ||
@@ -202,3 +200,3 @@ if (Array.isArray(newFormat.blobs)) { | ||
await Promise.all(newFormat.blobs.map(async (value) => { | ||
const content = await (0, internal_1.readAndParse)(storage, value); | ||
const content = await (0, internal_2.readAndParse)(storage, value); | ||
this.kernel.populateFromSerializable(content); | ||
@@ -232,3 +230,3 @@ })); | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison | ||
if (message.type === protocol_definitions_1.MessageType.Operation) { | ||
if (message.type === internal_1.MessageType.Operation) { | ||
this.kernel.tryProcessMessage(message.contents, local, localOpMetadata); | ||
@@ -235,0 +233,0 @@ } |
@@ -5,4 +5,3 @@ /*! | ||
*/ | ||
import type { IChannelAttributes, IChannelFactory, IChannelServices, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions"; | ||
import type { ISharedObjectKind } from "@fluidframework/shared-object-base"; | ||
import type { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChannelServices } from "@fluidframework/datastore-definitions/internal"; | ||
import type { ISharedMap } from "./interfaces.js"; | ||
@@ -45,3 +44,3 @@ /** | ||
*/ | ||
export declare const SharedMap: ISharedObjectKind<ISharedMap>; | ||
export declare const SharedMap: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedMap> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedMap>; | ||
/** | ||
@@ -48,0 +47,0 @@ * Entrypoint for {@link ISharedMap} creation. |
@@ -7,3 +7,3 @@ /*! | ||
import type { IFluidHandle } from "@fluidframework/core-interfaces"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import type { ISharedMapEvents } from "./interfaces.js"; | ||
@@ -10,0 +10,0 @@ import type { IMapClearOperation, IMapDeleteOperation, IMapSetOperation, ISerializableValue, ISerializedValue } from "./internalInterfaces.js"; |
@@ -191,6 +191,2 @@ "use strict"; | ||
if (!this.isAttached()) { | ||
// this is necessary to bind the potential handles in the value | ||
// to this DDS, as we do not walk the object normally unless we | ||
// are attached | ||
(0, internal_2.bindHandles)(localValue.value, this.serializer, this.handle); | ||
return; | ||
@@ -197,0 +193,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/map"; | ||
export declare const pkgVersion = "2.0.0-rc.4.0.6"; | ||
export declare const pkgVersion = "2.0.0-rc.5.0.0"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
exports.pkgName = "@fluidframework/map"; | ||
exports.pkgVersion = "2.0.0-rc.4.0.6"; | ||
exports.pkgVersion = "2.0.0-rc.5.0.0"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -6,7 +6,7 @@ /*! | ||
import { TypedEventEmitter } from "@fluid-internal/client-utils"; | ||
import type { IChannelAttributes, IChannelStorageService, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions"; | ||
import type { IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions/internal"; | ||
import { type ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal"; | ||
import { RedBlackTree } from "@fluidframework/merge-tree/internal"; | ||
import { type ISequencedDocumentMessage } from "@fluidframework/protocol-definitions"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions/internal"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import { SharedObject } from "@fluidframework/shared-object-base/internal"; | ||
@@ -13,0 +13,0 @@ import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal"; |
@@ -5,4 +5,3 @@ /*! | ||
*/ | ||
import type { IChannelAttributes, IChannelFactory, IChannelServices, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions"; | ||
import type { ISharedObjectKind } from "@fluidframework/shared-object-base"; | ||
import type { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChannelServices } from "@fluidframework/datastore-definitions/internal"; | ||
import type { ISharedDirectory } from "./interfaces.js"; | ||
@@ -45,3 +44,3 @@ /** | ||
*/ | ||
export declare const SharedDirectory: ISharedObjectKind<ISharedDirectory>; | ||
export declare const SharedDirectory: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedDirectory> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedDirectory>; | ||
/** | ||
@@ -48,0 +47,0 @@ * Entrypoint for {@link ISharedDirectory} creation. |
@@ -19,4 +19,4 @@ /*! | ||
export { DirectoryFactory, SharedDirectory } from "./directoryFactory.js"; | ||
export type { ICreateInfo, IDirectoryNewStorageFormat, IDirectoryDataObject } from "./directory.js"; | ||
export type { ICreateInfo, IDirectoryNewStorageFormat, IDirectoryDataObject, } from "./directory.js"; | ||
export type { ISerializableValue } from "./internalInterfaces.js"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,3 +6,3 @@ /*! | ||
import type { IDisposable, IEvent, IEventProvider, IEventThisPlaceHolder } from "@fluidframework/core-interfaces"; | ||
import type { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-object-base"; | ||
import type { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-object-base/internal"; | ||
/** | ||
@@ -263,4 +263,6 @@ * Type of "valueChanged" event parameter. | ||
/** | ||
* The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting | ||
* and retrieving values that JavaScript developers are accustomed to with the | ||
* The SharedMap distributed data structure can be used to store key-value pairs. | ||
* | ||
* @remarks | ||
* SharedMap provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the | ||
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object. | ||
@@ -270,2 +272,4 @@ * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a | ||
* | ||
* Note: unlike JavaScript maps, SharedMap does not make any guarantees regarding enumeration order. | ||
* | ||
* For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}. | ||
@@ -272,0 +276,0 @@ * @sealed |
@@ -6,3 +6,3 @@ /*! | ||
import type { IFluidHandle } from "@fluidframework/core-interfaces"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import type { ISerializableValue, ISerializedValue } from "./internalInterfaces.js"; | ||
@@ -9,0 +9,0 @@ /** |
@@ -5,6 +5,6 @@ /*! | ||
*/ | ||
import type { IChannelAttributes, IChannelStorageService, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions"; | ||
import { type ISequencedDocumentMessage } from "@fluidframework/protocol-definitions"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions/internal"; | ||
import { type ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions/internal"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import { SharedObject } from "@fluidframework/shared-object-base/internal"; | ||
@@ -11,0 +11,0 @@ import type { ISharedMap, ISharedMapEvents } from "./interfaces.js"; |
@@ -6,7 +6,7 @@ /*! | ||
var _a; | ||
import { MessageType, } from "@fluidframework/driver-definitions/internal"; | ||
import { readAndParse } from "@fluidframework/driver-utils/internal"; | ||
import { MessageType } from "@fluidframework/protocol-definitions"; | ||
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal"; | ||
import { SharedObject } from "@fluidframework/shared-object-base/internal"; | ||
import { MapKernel } from "./mapKernel.js"; | ||
import { MapKernel, } from "./mapKernel.js"; | ||
const snapshotFileName = "header"; | ||
@@ -173,5 +173,3 @@ /** | ||
type: value.type, | ||
value: value.value === undefined | ||
? undefined | ||
: JSON.parse(value.value), | ||
value: value.value === undefined ? undefined : JSON.parse(value.value), | ||
}; | ||
@@ -178,0 +176,0 @@ } |
@@ -5,4 +5,3 @@ /*! | ||
*/ | ||
import type { IChannelAttributes, IChannelFactory, IChannelServices, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions"; | ||
import type { ISharedObjectKind } from "@fluidframework/shared-object-base"; | ||
import type { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChannelServices } from "@fluidframework/datastore-definitions/internal"; | ||
import type { ISharedMap } from "./interfaces.js"; | ||
@@ -45,3 +44,3 @@ /** | ||
*/ | ||
export declare const SharedMap: ISharedObjectKind<ISharedMap>; | ||
export declare const SharedMap: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedMap> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedMap>; | ||
/** | ||
@@ -48,0 +47,0 @@ * Entrypoint for {@link ISharedMap} creation. |
@@ -7,3 +7,3 @@ /*! | ||
import type { IFluidHandle } from "@fluidframework/core-interfaces"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import type { ISharedMapEvents } from "./interfaces.js"; | ||
@@ -10,0 +10,0 @@ import type { IMapClearOperation, IMapDeleteOperation, IMapSetOperation, ISerializableValue, ISerializedValue } from "./internalInterfaces.js"; |
@@ -6,3 +6,3 @@ /*! | ||
import { assert, unreachableCase } from "@fluidframework/core-utils/internal"; | ||
import { ValueType, bindHandles } from "@fluidframework/shared-object-base/internal"; | ||
import { ValueType } from "@fluidframework/shared-object-base/internal"; | ||
import { LocalValueMaker, makeSerializable } from "./localValues.js"; | ||
@@ -189,6 +189,2 @@ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ | ||
if (!this.isAttached()) { | ||
// this is necessary to bind the potential handles in the value | ||
// to this DDS, as we do not walk the object normally unless we | ||
// are attached | ||
bindHandles(localValue.value, this.serializer, this.handle); | ||
return; | ||
@@ -195,0 +191,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/map"; | ||
export declare const pkgVersion = "2.0.0-rc.4.0.6"; | ||
export declare const pkgVersion = "2.0.0-rc.5.0.0"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -8,3 +8,3 @@ /*! | ||
export const pkgName = "@fluidframework/map"; | ||
export const pkgVersion = "2.0.0-rc.4.0.6"; | ||
export const pkgVersion = "2.0.0-rc.5.0.0"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.43.1" | ||
"packageVersion": "7.45.1" | ||
} | ||
] | ||
} |
{ | ||
"name": "@fluidframework/map", | ||
"version": "2.0.0-rc.4.0.6", | ||
"version": "2.0.0-rc.5.0.0", | ||
"description": "Distributed map", | ||
@@ -70,13 +70,13 @@ "homepage": "https://fluidframework.com", | ||
"dependencies": { | ||
"@fluid-internal/client-utils": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/core-interfaces": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/core-utils": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/datastore-definitions": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/driver-utils": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/merge-tree": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/protocol-definitions": "^3.2.0", | ||
"@fluidframework/runtime-definitions": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/runtime-utils": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/shared-object-base": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/telemetry-utils": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluid-internal/client-utils": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/core-interfaces": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/core-utils": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/datastore-definitions": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/driver-definitions": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/driver-utils": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/merge-tree": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/runtime-definitions": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/runtime-utils": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/shared-object-base": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/telemetry-utils": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"path-browserify": "^1.0.1" | ||
@@ -86,15 +86,15 @@ }, | ||
"@arethetypeswrong/cli": "^0.15.2", | ||
"@biomejs/biome": "^1.6.2", | ||
"@fluid-internal/mocha-test-setup": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluid-private/stochastic-test-utils": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluid-private/test-dds-utils": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@biomejs/biome": "^1.7.3", | ||
"@fluid-internal/mocha-test-setup": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluid-private/stochastic-test-utils": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluid-private/test-dds-utils": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluid-tools/benchmark": "^0.48.0", | ||
"@fluid-tools/build-cli": "^0.38.0", | ||
"@fluid-tools/build-cli": "^0.39.0", | ||
"@fluidframework/build-common": "^2.0.3", | ||
"@fluidframework/build-tools": "^0.38.0", | ||
"@fluidframework/container-definitions": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@fluidframework/eslint-config-fluid": "^5.1.0", | ||
"@fluidframework/map-previous": "npm:@fluidframework/map@2.0.0-rc.3.0.0", | ||
"@fluidframework/test-runtime-utils": ">=2.0.0-rc.4.0.6 <2.0.0-rc.4.1.0", | ||
"@microsoft/api-extractor": "^7.43.1", | ||
"@fluidframework/build-tools": "^0.39.0", | ||
"@fluidframework/container-definitions": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@fluidframework/eslint-config-fluid": "^5.3.0", | ||
"@fluidframework/map-previous": "npm:@fluidframework/map@2.0.0-rc.4.0.0", | ||
"@fluidframework/test-runtime-utils": ">=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0", | ||
"@microsoft/api-extractor": "^7.45.1", | ||
"@types/mocha": "^9.1.1", | ||
@@ -104,2 +104,3 @@ "@types/node": "^18.19.0", | ||
"c8": "^8.0.1", | ||
"concurrently": "^8.2.1", | ||
"copyfiles": "^2.4.1", | ||
@@ -115,30 +116,6 @@ "cross-env": "^7.0.3", | ||
"rimraf": "^4.4.0", | ||
"typescript": "~5.1.6" | ||
"typescript": "~5.4.5" | ||
}, | ||
"typeValidation": { | ||
"broken": { | ||
"InterfaceDeclaration_ISharedDirectory": { | ||
"forwardCompat": false, | ||
"backCompat": false | ||
}, | ||
"InterfaceDeclaration_ISharedMap": { | ||
"forwardCompat": false, | ||
"backCompat": false | ||
}, | ||
"ClassDeclaration_SharedDirectory": { | ||
"forwardCompat": false | ||
}, | ||
"RemovedClassDeclaration_SharedDirectory": { | ||
"backCompat": false, | ||
"forwardCompat": false | ||
}, | ||
"TypeAliasDeclaration_SharedDirectory": { | ||
"forwardCompat": false, | ||
"backCompat": false | ||
}, | ||
"TypeAliasDeclaration_SharedMap": { | ||
"forwardCompat": false, | ||
"backCompat": false | ||
} | ||
} | ||
"broken": {} | ||
}, | ||
@@ -159,4 +136,11 @@ "scripts": { | ||
"check:are-the-types-wrong": "attw --pack .", | ||
"check:biome": "biome check . --formatter-enabled=true", | ||
"check:exports": "concurrently \"npm:check:exports:*\"", | ||
"check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json", | ||
"check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json", | ||
"check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json", | ||
"check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json", | ||
"check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json", | ||
"check:format": "npm run check:biome", | ||
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore", | ||
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json", | ||
"ci:build:docs": "api-extractor run", | ||
@@ -166,3 +150,4 @@ "clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc", | ||
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout", | ||
"format": "fluid-build --task format .", | ||
"format": "npm run format:biome", | ||
"format:biome": "biome check . --formatter-enabled=true --apply", | ||
"format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore", | ||
@@ -180,2 +165,3 @@ "lint": "fluid-build . --task lint", | ||
"test:snapshots:regen": "npm run test:mocha:esm -- --snapshot", | ||
"test:stress": "cross-env FUZZ_TEST_COUNT=100 FUZZ_STRESS_RUN=true mocha --ignore \"lib/test/memory/**/*\" --recursive \"lib/test/**/*.spec.js\"", | ||
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist", | ||
@@ -182,0 +168,0 @@ "typetests:gen": "flub generate typetests --dir . -v --publicFallback", |
@@ -9,6 +9,5 @@ /*! | ||
IChannelFactory, | ||
IFluidDataStoreRuntime, | ||
IChannelServices, | ||
IFluidDataStoreRuntime, | ||
} from "@fluidframework/datastore-definitions"; | ||
import type { ISharedObjectKind } from "@fluidframework/shared-object-base"; | ||
} from "@fluidframework/datastore-definitions/internal"; | ||
import { createSharedObjectKind } from "@fluidframework/shared-object-base/internal"; | ||
@@ -85,4 +84,3 @@ | ||
*/ | ||
export const SharedDirectory: ISharedObjectKind<ISharedDirectory> = | ||
createSharedObjectKind(DirectoryFactory); | ||
export const SharedDirectory = createSharedObjectKind<ISharedDirectory>(DirectoryFactory); | ||
@@ -89,0 +87,0 @@ /** |
@@ -30,3 +30,7 @@ /*! | ||
export { DirectoryFactory, SharedDirectory } from "./directoryFactory.js"; | ||
export type { ICreateInfo, IDirectoryNewStorageFormat, IDirectoryDataObject } from "./directory.js"; | ||
export type { | ||
ICreateInfo, | ||
IDirectoryNewStorageFormat, | ||
IDirectoryDataObject, | ||
} from "./directory.js"; | ||
export type { ISerializableValue } from "./internalInterfaces.js"; |
@@ -12,3 +12,6 @@ /*! | ||
} from "@fluidframework/core-interfaces"; | ||
import type { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-object-base"; | ||
import type { | ||
ISharedObject, | ||
ISharedObjectEvents, | ||
} from "@fluidframework/shared-object-base/internal"; | ||
@@ -335,4 +338,6 @@ /** | ||
/** | ||
* The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting | ||
* and retrieving values that JavaScript developers are accustomed to with the | ||
* The SharedMap distributed data structure can be used to store key-value pairs. | ||
* | ||
* @remarks | ||
* SharedMap provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the | ||
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object. | ||
@@ -342,2 +347,4 @@ * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a | ||
* | ||
* Note: unlike JavaScript maps, SharedMap does not make any guarantees regarding enumeration order. | ||
* | ||
* For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}. | ||
@@ -344,0 +351,0 @@ * @sealed |
@@ -8,3 +8,3 @@ /*! | ||
import type { ISerializedHandle } from "@fluidframework/runtime-utils/internal"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import { | ||
@@ -11,0 +11,0 @@ ValueType, |
@@ -8,14 +8,24 @@ /*! | ||
IChannelAttributes, | ||
IFluidDataStoreRuntime, | ||
IChannelStorageService, | ||
IFluidDataStoreRuntime, | ||
} from "@fluidframework/datastore-definitions"; | ||
} from "@fluidframework/datastore-definitions/internal"; | ||
import { | ||
MessageType, | ||
type ISequencedDocumentMessage, | ||
} from "@fluidframework/driver-definitions/internal"; | ||
import { readAndParse } from "@fluidframework/driver-utils/internal"; | ||
import { MessageType, type ISequencedDocumentMessage } from "@fluidframework/protocol-definitions"; | ||
import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions"; | ||
import type { | ||
ISummaryTreeWithStats, | ||
ITelemetryContext, | ||
} from "@fluidframework/runtime-definitions/internal"; | ||
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import { SharedObject } from "@fluidframework/shared-object-base/internal"; | ||
import type { ISharedMap, ISharedMapEvents } from "./interfaces.js"; | ||
import { type IMapDataObjectSerializable, type IMapOperation, MapKernel } from "./mapKernel.js"; | ||
import { | ||
type IMapDataObjectSerializable, | ||
type IMapOperation, | ||
MapKernel, | ||
} from "./mapKernel.js"; | ||
@@ -225,6 +235,3 @@ interface IMapSerializationFormat { | ||
type: value.type, | ||
value: | ||
value.value === undefined | ||
? undefined | ||
: (JSON.parse(value.value) as unknown), | ||
value: value.value === undefined ? undefined : (JSON.parse(value.value) as unknown), | ||
}; | ||
@@ -291,7 +298,3 @@ } | ||
if (message.type === MessageType.Operation) { | ||
this.kernel.tryProcessMessage( | ||
message.contents as IMapOperation, | ||
local, | ||
localOpMetadata, | ||
); | ||
this.kernel.tryProcessMessage(message.contents as IMapOperation, local, localOpMetadata); | ||
} | ||
@@ -298,0 +301,0 @@ } |
@@ -9,6 +9,5 @@ /*! | ||
IChannelFactory, | ||
IFluidDataStoreRuntime, | ||
IChannelServices, | ||
IFluidDataStoreRuntime, | ||
} from "@fluidframework/datastore-definitions"; | ||
import type { ISharedObjectKind } from "@fluidframework/shared-object-base"; | ||
} from "@fluidframework/datastore-definitions/internal"; | ||
import { createSharedObjectKind } from "@fluidframework/shared-object-base/internal"; | ||
@@ -85,3 +84,3 @@ | ||
*/ | ||
export const SharedMap: ISharedObjectKind<ISharedMap> = createSharedObjectKind(MapFactory); | ||
export const SharedMap = createSharedObjectKind<ISharedMap>(MapFactory); | ||
@@ -88,0 +87,0 @@ /** |
@@ -9,4 +9,4 @@ /*! | ||
import { assert, unreachableCase } from "@fluidframework/core-utils/internal"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base"; | ||
import { ValueType, bindHandles } from "@fluidframework/shared-object-base/internal"; | ||
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal"; | ||
import { ValueType } from "@fluidframework/shared-object-base/internal"; | ||
@@ -212,3 +212,3 @@ import type { ISharedMapEvents } from "./interfaces.js"; | ||
: // Unpack the stored value | ||
{ value: [nextVal.value[0], nextVal.value[1].value], done: false }; | ||
{ value: [nextVal.value[0], nextVal.value[1].value], done: false }; | ||
}, | ||
@@ -236,3 +236,3 @@ [Symbol.iterator](): IterableIterator<[string, unknown]> { | ||
: // Unpack the stored value | ||
{ value: nextVal.value.value as unknown, done: false }; | ||
{ value: nextVal.value.value as unknown, done: false }; | ||
}, | ||
@@ -305,6 +305,2 @@ [Symbol.iterator](): IterableIterator<unknown> { | ||
if (!this.isAttached()) { | ||
// this is necessary to bind the potential handles in the value | ||
// to this DDS, as we do not walk the object normally unless we | ||
// are attached | ||
bindHandles(localValue.value, this.serializer, this.handle); | ||
return; | ||
@@ -454,3 +450,7 @@ } | ||
*/ | ||
public tryProcessMessage(op: IMapOperation, local: boolean, localOpMetadata: unknown): boolean { | ||
public tryProcessMessage( | ||
op: IMapOperation, | ||
local: boolean, | ||
localOpMetadata: unknown, | ||
): boolean { | ||
const handler = this.messageHandlers.get(op.type); | ||
@@ -554,8 +554,3 @@ if (handler === undefined) { | ||
if (successfullyRemoved) { | ||
this.eventEmitter.emit( | ||
"valueChanged", | ||
{ key, previousValue }, | ||
local, | ||
this.eventEmitter, | ||
); | ||
this.eventEmitter.emit("valueChanged", { key, previousValue }, local, this.eventEmitter); | ||
} | ||
@@ -601,7 +596,3 @@ return previousLocalValue; | ||
) { | ||
return this.localValueMaker.fromSerializable( | ||
serializable, | ||
this.serializer, | ||
this.handle, | ||
); | ||
return this.localValueMaker.fromSerializable(serializable, this.serializer, this.handle); | ||
} else { | ||
@@ -781,3 +772,6 @@ throw new Error("Unknown local value type"); | ||
*/ | ||
private resubmitMapKeyMessage(op: IMapKeyOperation, localOpMetadata: MapLocalOpMetadata): void { | ||
private resubmitMapKeyMessage( | ||
op: IMapKeyOperation, | ||
localOpMetadata: MapLocalOpMetadata, | ||
): void { | ||
assert( | ||
@@ -784,0 +778,0 @@ isMapKeyLocalOpMetadata(localOpMetadata), |
@@ -9,2 +9,2 @@ /*! | ||
export const pkgName = "@fluidframework/map"; | ||
export const pkgVersion = "2.0.0-rc.4.0.6"; | ||
export const pkgVersion = "2.0.0-rc.5.0.0"; |
@@ -8,3 +8,5 @@ { | ||
"outDir": "./lib", | ||
"noUncheckedIndexedAccess": false, | ||
"exactOptionalPropertyTypes": false, | ||
}, | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1073018
119
13736
30
+ Added@fluidframework/driver-definitions@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
+ Added@fluid-internal/client-utils@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/container-definitions@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/container-runtime@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/container-runtime-definitions@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/core-interfaces@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/core-utils@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/datastore@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/datastore-definitions@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/driver-definitions@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/driver-utils@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/id-compressor@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/merge-tree@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/runtime-definitions@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/runtime-utils@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/shared-object-base@2.0.0-rc.5.0.8(transitive)
+ Added@fluidframework/telemetry-utils@2.0.0-rc.5.0.8(transitive)
- Removed@fluid-internal/client-utils@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/common-definitions@1.1.0(transitive)
- Removed@fluidframework/common-utils@3.1.0(transitive)
- Removed@fluidframework/container-definitions@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/container-runtime@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/container-runtime-definitions@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/core-interfaces@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/core-utils@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/datastore@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/datastore-definitions@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/driver-definitions@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/driver-utils@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/gitresources@4.0.1(transitive)
- Removed@fluidframework/id-compressor@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/merge-tree@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/protocol-base@4.0.1(transitive)
- Removed@fluidframework/protocol-definitions@3.2.0(transitive)
- Removed@fluidframework/runtime-definitions@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/runtime-utils@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/shared-object-base@2.0.0-rc.4.0.10(transitive)
- Removed@fluidframework/telemetry-utils@2.0.0-rc.4.0.10(transitive)
- Removedlodash@4.17.21(transitive)
Updated@fluid-internal/client-utils@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/core-interfaces@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/core-utils@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/datastore-definitions@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/driver-utils@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/merge-tree@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/runtime-definitions@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/runtime-utils@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/shared-object-base@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0
Updated@fluidframework/telemetry-utils@>=2.0.0-rc.5.0.0 <2.0.0-rc.5.1.0