@fluidframework/map
Advanced tools
Comparing version 2.1.0-276985 to 2.1.0-281041
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "../../../common/build/build-common/api-extractor-base.esm.current.json" | ||
"extends": "../../../common/build/build-common/api-extractor-model.esm.json" | ||
} |
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-base.esm.legacy.json" | ||
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json" | ||
} |
@@ -23,3 +23,3 @@ ## Alpha API Report File for "@fluidframework/map" | ||
// @alpha | ||
// @public @sealed | ||
export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> { | ||
@@ -45,3 +45,3 @@ readonly absolutePath: string; | ||
// @alpha | ||
// @public @sealed | ||
export interface IDirectoryEvents extends IEvent { | ||
@@ -61,3 +61,3 @@ (event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any; | ||
// @alpha | ||
// @public @sealed | ||
export interface IDirectoryValueChanged extends IValueChanged { | ||
@@ -73,3 +73,3 @@ path: string; | ||
// @alpha | ||
// @alpha @sealed | ||
export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>, Omit<IDirectory, "on" | "once" | "off"> { | ||
@@ -82,3 +82,3 @@ // (undocumented) | ||
// @alpha | ||
// @alpha @sealed | ||
export interface ISharedDirectoryEvents extends ISharedObjectEvents { | ||
@@ -103,3 +103,3 @@ (event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any; | ||
// @alpha @sealed | ||
// @public @sealed | ||
export interface IValueChanged { | ||
@@ -132,4 +132,2 @@ readonly key: string; | ||
// (No @packageDocumentation comment for this package) | ||
``` |
@@ -11,3 +11,3 @@ /*! | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -28,4 +28,5 @@ export interface IValueChanged { | ||
* @remarks When used as a Map, operates on its keys. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -97,2 +98,3 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> { | ||
* These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories. | ||
* @sealed | ||
* @legacy | ||
@@ -155,4 +157,5 @@ * @alpha | ||
* Events emitted in response to changes to the directory data. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -224,2 +227,3 @@ export interface IDirectoryEvents extends IEvent { | ||
* SubDirectories can be retrieved for use as working directories. | ||
* @sealed | ||
* @legacy | ||
@@ -234,4 +238,5 @@ * @alpha | ||
* Type of "valueChanged" event parameter for {@link ISharedDirectory}. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -241,2 +246,5 @@ export interface IDirectoryValueChanged extends IValueChanged { | ||
* The absolute path to the IDirectory storing the key which changed. | ||
* @readonly | ||
* @privateRemarks | ||
* When breaking changes can be made, `readonly` should be added. | ||
*/ | ||
@@ -243,0 +251,0 @@ path: string; |
@@ -8,5 +8,17 @@ /*! | ||
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
* Generated by "flub generate entrypoints" in @fluidframework/build-tools. | ||
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli. | ||
*/ | ||
/** | ||
* The `map` library provides interfaces and implementing classes for map-like distributed data structures. | ||
* | ||
* @remarks The following distributed data structures are defined in this library: | ||
* | ||
* - {@link SharedMap} | ||
* | ||
* - {@link SharedDirectory} | ||
* | ||
* @packageDocumentation | ||
*/ | ||
export { | ||
@@ -13,0 +25,0 @@ // @legacy APIs |
@@ -146,5 +146,4 @@ "use strict"; | ||
// loads all blobs at once and partitioning schema has no impact on that process. | ||
for (const key of Object.keys(data)) { | ||
const value = data[key]; | ||
if (value.value && value.value.length >= MinValueSizeSeparateSnapshotBlob) { | ||
for (const [key, { value, type }] of Object.entries(data)) { | ||
if (value && value.length >= MinValueSizeSeparateSnapshotBlob) { | ||
const blobName = `blob${counter}`; | ||
@@ -155,4 +154,4 @@ counter++; | ||
[key]: { | ||
type: value.type, | ||
value: JSON.parse(value.value), | ||
type, | ||
value: JSON.parse(value), | ||
}, | ||
@@ -163,5 +162,5 @@ }; | ||
else { | ||
currentSize += value.type.length + 21; // Approximation cost of property header | ||
if (value.value) { | ||
currentSize += value.value.length; | ||
currentSize += type.length + 21; // Approximation cost of property header | ||
if (value) { | ||
currentSize += value.length; | ||
} | ||
@@ -177,4 +176,4 @@ if (currentSize > MaxSnapshotBlobSize) { | ||
headerBlob[key] = { | ||
type: value.type, | ||
value: value.value === undefined ? undefined : JSON.parse(value.value), | ||
type, | ||
value: value === undefined ? undefined : JSON.parse(value), | ||
}; | ||
@@ -181,0 +180,0 @@ } |
@@ -462,2 +462,4 @@ "use strict"; | ||
isMapKeyLocalOpMetadata(localOpMetadata) && | ||
// Non null asserting, above we checked that the length is greater than 0. | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
localOpMetadata.pendingMessageId < this.pendingClearMessageIds[0], 0x013 /* "Received out of order op when there is an unackd clear message" */); | ||
@@ -464,0 +466,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/map"; | ||
export declare const pkgVersion = "2.1.0-276985"; | ||
export declare const pkgVersion = "2.1.0-281041"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
exports.pkgName = "@fluidframework/map"; | ||
exports.pkgVersion = "2.1.0-276985"; | ||
exports.pkgVersion = "2.1.0-281041"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -8,6 +8,16 @@ /*! | ||
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
* Generated by "flub generate entrypoints" in @fluidframework/build-tools. | ||
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli. | ||
*/ | ||
export {} | ||
/** | ||
* The `map` library provides interfaces and implementing classes for map-like distributed data structures. | ||
* | ||
* @remarks The following distributed data structures are defined in this library: | ||
* | ||
* - {@link SharedMap} | ||
* | ||
* - {@link SharedDirectory} | ||
* | ||
* @packageDocumentation | ||
*/export {} | ||
@@ -8,5 +8,5 @@ /*! | ||
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
* Generated by "flub generate entrypoints" in @fluidframework/build-tools. | ||
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli. | ||
*/ | ||
export * from "./lib/index.js"; |
@@ -8,5 +8,5 @@ /*! | ||
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
* Generated by "flub generate entrypoints" in @fluidframework/build-tools. | ||
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli. | ||
*/ | ||
export * from "./lib/legacy.js"; |
@@ -11,3 +11,3 @@ /*! | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -28,4 +28,5 @@ export interface IValueChanged { | ||
* @remarks When used as a Map, operates on its keys. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -97,2 +98,3 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> { | ||
* These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories. | ||
* @sealed | ||
* @legacy | ||
@@ -155,4 +157,5 @@ * @alpha | ||
* Events emitted in response to changes to the directory data. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -224,2 +227,3 @@ export interface IDirectoryEvents extends IEvent { | ||
* SubDirectories can be retrieved for use as working directories. | ||
* @sealed | ||
* @legacy | ||
@@ -234,4 +238,5 @@ * @alpha | ||
* Type of "valueChanged" event parameter for {@link ISharedDirectory}. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -241,2 +246,5 @@ export interface IDirectoryValueChanged extends IValueChanged { | ||
* The absolute path to the IDirectory storing the key which changed. | ||
* @readonly | ||
* @privateRemarks | ||
* When breaking changes can be made, `readonly` should be added. | ||
*/ | ||
@@ -243,0 +251,0 @@ path: string; |
@@ -8,5 +8,17 @@ /*! | ||
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
* Generated by "flub generate entrypoints" in @fluidframework/build-tools. | ||
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli. | ||
*/ | ||
/** | ||
* The `map` library provides interfaces and implementing classes for map-like distributed data structures. | ||
* | ||
* @remarks The following distributed data structures are defined in this library: | ||
* | ||
* - {@link SharedMap} | ||
* | ||
* - {@link SharedDirectory} | ||
* | ||
* @packageDocumentation | ||
*/ | ||
export { | ||
@@ -13,0 +25,0 @@ // @legacy APIs |
@@ -143,5 +143,4 @@ /*! | ||
// loads all blobs at once and partitioning schema has no impact on that process. | ||
for (const key of Object.keys(data)) { | ||
const value = data[key]; | ||
if (value.value && value.value.length >= MinValueSizeSeparateSnapshotBlob) { | ||
for (const [key, { value, type }] of Object.entries(data)) { | ||
if (value && value.length >= MinValueSizeSeparateSnapshotBlob) { | ||
const blobName = `blob${counter}`; | ||
@@ -152,4 +151,4 @@ counter++; | ||
[key]: { | ||
type: value.type, | ||
value: JSON.parse(value.value), | ||
type, | ||
value: JSON.parse(value), | ||
}, | ||
@@ -160,5 +159,5 @@ }; | ||
else { | ||
currentSize += value.type.length + 21; // Approximation cost of property header | ||
if (value.value) { | ||
currentSize += value.value.length; | ||
currentSize += type.length + 21; // Approximation cost of property header | ||
if (value) { | ||
currentSize += value.length; | ||
} | ||
@@ -174,4 +173,4 @@ if (currentSize > MaxSnapshotBlobSize) { | ||
headerBlob[key] = { | ||
type: value.type, | ||
value: value.value === undefined ? undefined : JSON.parse(value.value), | ||
type, | ||
value: value === undefined ? undefined : JSON.parse(value), | ||
}; | ||
@@ -178,0 +177,0 @@ } |
@@ -459,2 +459,4 @@ /*! | ||
isMapKeyLocalOpMetadata(localOpMetadata) && | ||
// Non null asserting, above we checked that the length is greater than 0. | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
localOpMetadata.pendingMessageId < this.pendingClearMessageIds[0], 0x013 /* "Received out of order op when there is an unackd clear message" */); | ||
@@ -461,0 +463,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/map"; | ||
export declare const pkgVersion = "2.1.0-276985"; | ||
export declare const pkgVersion = "2.1.0-281041"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -8,3 +8,3 @@ /*! | ||
export const pkgName = "@fluidframework/map"; | ||
export const pkgVersion = "2.1.0-276985"; | ||
export const pkgVersion = "2.1.0-281041"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -8,6 +8,16 @@ /*! | ||
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
* Generated by "flub generate entrypoints" in @fluidframework/build-tools. | ||
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli. | ||
*/ | ||
export {} | ||
/** | ||
* The `map` library provides interfaces and implementing classes for map-like distributed data structures. | ||
* | ||
* @remarks The following distributed data structures are defined in this library: | ||
* | ||
* - {@link SharedMap} | ||
* | ||
* - {@link SharedDirectory} | ||
* | ||
* @packageDocumentation | ||
*/export {} | ||
{ | ||
"name": "@fluidframework/map", | ||
"version": "2.1.0-276985", | ||
"version": "2.1.0-281041", | ||
"description": "Distributed map", | ||
@@ -70,13 +70,13 @@ "homepage": "https://fluidframework.com", | ||
"dependencies": { | ||
"@fluid-internal/client-utils": "2.1.0-276985", | ||
"@fluidframework/core-interfaces": "2.1.0-276985", | ||
"@fluidframework/core-utils": "2.1.0-276985", | ||
"@fluidframework/datastore-definitions": "2.1.0-276985", | ||
"@fluidframework/driver-definitions": "2.1.0-276985", | ||
"@fluidframework/driver-utils": "2.1.0-276985", | ||
"@fluidframework/merge-tree": "2.1.0-276985", | ||
"@fluidframework/runtime-definitions": "2.1.0-276985", | ||
"@fluidframework/runtime-utils": "2.1.0-276985", | ||
"@fluidframework/shared-object-base": "2.1.0-276985", | ||
"@fluidframework/telemetry-utils": "2.1.0-276985", | ||
"@fluid-internal/client-utils": "2.1.0-281041", | ||
"@fluidframework/core-interfaces": "2.1.0-281041", | ||
"@fluidframework/core-utils": "2.1.0-281041", | ||
"@fluidframework/datastore-definitions": "2.1.0-281041", | ||
"@fluidframework/driver-definitions": "2.1.0-281041", | ||
"@fluidframework/driver-utils": "2.1.0-281041", | ||
"@fluidframework/merge-tree": "2.1.0-281041", | ||
"@fluidframework/runtime-definitions": "2.1.0-281041", | ||
"@fluidframework/runtime-utils": "2.1.0-281041", | ||
"@fluidframework/shared-object-base": "2.1.0-281041", | ||
"@fluidframework/telemetry-utils": "2.1.0-281041", | ||
"path-browserify": "^1.0.1" | ||
@@ -86,14 +86,14 @@ }, | ||
"@arethetypeswrong/cli": "^0.15.2", | ||
"@biomejs/biome": "^1.7.3", | ||
"@fluid-internal/mocha-test-setup": "2.1.0-276985", | ||
"@fluid-private/stochastic-test-utils": "2.1.0-276985", | ||
"@fluid-private/test-dds-utils": "2.1.0-276985", | ||
"@biomejs/biome": "~1.8.3", | ||
"@fluid-internal/mocha-test-setup": "2.1.0-281041", | ||
"@fluid-private/stochastic-test-utils": "2.1.0-281041", | ||
"@fluid-private/test-dds-utils": "2.1.0-281041", | ||
"@fluid-tools/benchmark": "^0.48.0", | ||
"@fluid-tools/build-cli": "^0.39.0", | ||
"@fluid-tools/build-cli": "^0.40.0", | ||
"@fluidframework/build-common": "^2.0.3", | ||
"@fluidframework/build-tools": "^0.39.0", | ||
"@fluidframework/container-definitions": "2.1.0-276985", | ||
"@fluidframework/build-tools": "^0.40.0", | ||
"@fluidframework/container-definitions": "2.1.0-281041", | ||
"@fluidframework/eslint-config-fluid": "^5.3.0", | ||
"@fluidframework/map-previous": "npm:@fluidframework/map@2.0.0-rc.5.0.0", | ||
"@fluidframework/test-runtime-utils": "2.1.0-276985", | ||
"@fluidframework/map-previous": "npm:@fluidframework/map@2.0.0", | ||
"@fluidframework/test-runtime-utils": "2.1.0-281041", | ||
"@microsoft/api-extractor": "^7.45.1", | ||
@@ -118,3 +118,10 @@ "@types/mocha": "^9.1.1", | ||
"typeValidation": { | ||
"broken": {} | ||
"broken": { | ||
"VariableDeclaration_SharedMap": { | ||
"forwardCompat": false | ||
}, | ||
"VariableDeclaration_SharedDirectory": { | ||
"forwardCompat": false | ||
} | ||
} | ||
}, | ||
@@ -126,7 +133,8 @@ "scripts": { | ||
"build": "fluid-build . --task build", | ||
"build:api-reports": "concurrently \"npm:build:api-reports:*\"", | ||
"build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor.current.json", | ||
"build:api-reports:legacy": "api-extractor run --local --config api-extractor/api-extractor.legacy.json", | ||
"build:commonjs": "fluid-build . --task commonjs", | ||
"build:compile": "fluid-build . --task compile", | ||
"build:docs": "concurrently \"npm:build:docs:*\"", | ||
"build:docs:current": "api-extractor run --local", | ||
"build:docs:legacy": "api-extractor run --local --config api-extractor/api-extractor.legacy.json", | ||
"build:docs": "api-extractor run --local", | ||
"build:esnext": "tsc --project ./tsconfig.json", | ||
@@ -138,3 +146,3 @@ "build:genver": "gen-version", | ||
"check:are-the-types-wrong": "attw --pack .", | ||
"check:biome": "biome check . --formatter-enabled=true", | ||
"check:biome": "biome check .", | ||
"check:exports": "concurrently \"npm:check:exports:*\"", | ||
@@ -148,5 +156,6 @@ "check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json", | ||
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore", | ||
"ci:build:docs": "concurrently \"npm:ci:build:docs:*\"", | ||
"ci:build:docs:current": "api-extractor run", | ||
"ci:build:docs:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json", | ||
"ci:build:api-reports": "concurrently \"npm:ci:build:api-reports:*\"", | ||
"ci:build:api-reports:current": "api-extractor run --config api-extractor/api-extractor.current.json", | ||
"ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json", | ||
"ci:build:docs": "api-extractor run", | ||
"clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc", | ||
@@ -156,3 +165,3 @@ "eslint": "eslint --format stylish src", | ||
"format": "npm run format:biome", | ||
"format:biome": "biome check . --formatter-enabled=true --apply", | ||
"format:biome": "biome check . --write", | ||
"format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore", | ||
@@ -159,0 +168,0 @@ "lint": "fluid-build . --task lint", |
# @fluidframework/map | ||
<!-- AUTO-GENERATED-CONTENT:START (README_DEPENDENCY_GUIDELINES_SECTION:includeHeading=TRUE) --> | ||
<!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README_HEADER:) --> | ||
@@ -16,11 +16,10 @@ <!-- prettier-ignore-start --> | ||
<!-- prettier-ignore-end --> | ||
## Installation | ||
<!-- AUTO-GENERATED-CONTENT:END --> | ||
To get started, install the package by running the following command: | ||
<!-- AUTO-GENERATED-CONTENT:START (README_IMPORT_INSTRUCTIONS:includeHeading=TRUE) --> | ||
```bash | ||
npm i @fluidframework/map | ||
``` | ||
<!-- prettier-ignore-start --> | ||
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. --> | ||
## Importing from this package | ||
@@ -89,3 +88,3 @@ | ||
<!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README:scripts=FALSE&installation=FALSE&importInstructions=FALSE) --> | ||
<!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README_FOOTER:) --> | ||
@@ -99,2 +98,46 @@ <!-- prettier-ignore-start --> | ||
## Minimum Client Requirements | ||
These are the platform requirements for the current version of Fluid Framework Client Packages. | ||
These requirements err on the side of being too strict since within a major version they can be relaxed over time, but not made stricter. | ||
For Long Term Support (LTS) versions this can require supporting these platforms for several years. | ||
It is likely that other configurations will work, but they are not supported: if they stop working, we do not consider that a bug. | ||
If you would benefit from support for something not listed here, file an issue and the product team will evaluate your request. | ||
When making such a request please include if the configuration already works (and thus the request is just that it becomes officially supported), or if changes are required to get it working. | ||
### Supported Runtimes | ||
- NodeJs ^20.10.0 except that we will drop support for it [when NodeJs 20 loses its upstream support on 2026-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS (22) at least 1 year before 20 is end-of-life. This same policy applies to NodeJS 22 when it is end of life (2027-04-30). | ||
- Modern browsers supporting the es2022 standard library: in response to asks we can add explicit support for using babel to polyfill to target specific standards or runtimes (meaning we can avoid/remove use of things that don't polyfill robustly, but otherwise target modern standards). | ||
### Supported Tools | ||
- TypeScript 5.4: | ||
- All [`strict`](https://www.typescriptlang.org/tsconfig) options are supported. | ||
- [`strictNullChecks`](https://www.typescriptlang.org/tsconfig) is required. | ||
- [Configuration options deprecated in 5.0](https://github.com/microsoft/TypeScript/issues/51909) are not supported. | ||
- `exactOptionalPropertyTypes` is currently not fully supported. | ||
If used, narrowing members of Fluid Framework types types using `in`, `Reflect.has`, `Object.hasOwn` or `Object.prototype.hasOwnProperty` should be avoided as they may incorrectly exclude `undefined` from the possible values in some cases. | ||
- [webpack](https://webpack.js.org/) 5 | ||
- We are not intending to be prescriptive about what bundler to use. | ||
Other bundlers which can handle ES Modules should work, but webpack is the only one we actively test. | ||
### Module Resolution | ||
[`Node16`, `NodeNext`, or `Bundler`](https://www.typescriptlang.org/tsconfig#moduleResolution) resolution should be used with TypeScript compilerOptions to follow the [Node.js v12+ ESM Resolution and Loading algorithm](https://nodejs.github.io/nodejs.dev/en/api/v20/esm/#resolution-and-loading-algorithm). | ||
Node10 resolution is not supported as it does not support Fluid Framework's API structuring pattern that is used to distinguish stable APIs from those that are in development. | ||
### Module Formats | ||
- ES Modules: | ||
ES Modules are the preferred way to consume our client packages (including in NodeJs) and consuming our client packages from ES Modules is fully supported. | ||
- CommonJs: | ||
Consuming our client packages as CommonJs is supported only in NodeJS and only for the cases listed below. | ||
This is done to accommodate some workflows without good ES Module support. | ||
If you have a workflow you would like included in this list, file an issue. | ||
Once this list of workflows motivating CommonJS support is empty, we may drop support for CommonJS one year after notice of the change is posted here. | ||
- Testing with Jest (which lacks [stable ESM support](https://jestjs.io/docs/ecmascript-modules) due to [unstable APIs in NodeJs](https://github.com/nodejs/node/issues/37648)) | ||
## Contribution Guidelines | ||
@@ -101,0 +144,0 @@ |
@@ -21,3 +21,3 @@ /*! | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -42,4 +42,5 @@ export interface IValueChanged { | ||
* @remarks When used as a Map, operates on its keys. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -128,2 +129,3 @@ export interface IDirectory | ||
* These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories. | ||
* @sealed | ||
* @legacy | ||
@@ -203,4 +205,5 @@ * @alpha | ||
* Events emitted in response to changes to the directory data. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -286,2 +289,3 @@ export interface IDirectoryEvents extends IEvent { | ||
* SubDirectories can be retrieved for use as working directories. | ||
* @sealed | ||
* @legacy | ||
@@ -303,4 +307,5 @@ * @alpha | ||
* Type of "valueChanged" event parameter for {@link ISharedDirectory}. | ||
* @sealed | ||
* @legacy | ||
* @alpha | ||
* @public | ||
*/ | ||
@@ -310,2 +315,5 @@ export interface IDirectoryValueChanged extends IValueChanged { | ||
* The absolute path to the IDirectory storing the key which changed. | ||
* @readonly | ||
* @privateRemarks | ||
* When breaking changes can be made, `readonly` should be added. | ||
*/ | ||
@@ -312,0 +320,0 @@ path: string; |
@@ -205,5 +205,4 @@ /*! | ||
// loads all blobs at once and partitioning schema has no impact on that process. | ||
for (const key of Object.keys(data)) { | ||
const value = data[key]; | ||
if (value.value && value.value.length >= MinValueSizeSeparateSnapshotBlob) { | ||
for (const [key, { value, type }] of Object.entries(data)) { | ||
if (value && value.length >= MinValueSizeSeparateSnapshotBlob) { | ||
const blobName = `blob${counter}`; | ||
@@ -214,4 +213,4 @@ counter++; | ||
[key]: { | ||
type: value.type, | ||
value: JSON.parse(value.value) as unknown, | ||
type, | ||
value: JSON.parse(value) as unknown, | ||
}, | ||
@@ -221,5 +220,5 @@ }; | ||
} else { | ||
currentSize += value.type.length + 21; // Approximation cost of property header | ||
if (value.value) { | ||
currentSize += value.value.length; | ||
currentSize += type.length + 21; // Approximation cost of property header | ||
if (value) { | ||
currentSize += value.length; | ||
} | ||
@@ -236,4 +235,4 @@ | ||
headerBlob[key] = { | ||
type: value.type, | ||
value: value.value === undefined ? undefined : (JSON.parse(value.value) as unknown), | ||
type, | ||
value: value === undefined ? undefined : (JSON.parse(value) as unknown), | ||
}; | ||
@@ -240,0 +239,0 @@ } |
@@ -615,3 +615,5 @@ /*! | ||
isMapKeyLocalOpMetadata(localOpMetadata) && | ||
localOpMetadata.pendingMessageId < this.pendingClearMessageIds[0], | ||
// Non null asserting, above we checked that the length is greater than 0. | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
localOpMetadata.pendingMessageId < this.pendingClearMessageIds[0]!, | ||
0x013 /* "Received out of order op when there is an unackd clear message" */, | ||
@@ -618,0 +620,0 @@ ); |
@@ -9,2 +9,2 @@ /*! | ||
export const pkgName = "@fluidframework/map"; | ||
export const pkgVersion = "2.1.0-276985"; | ||
export const pkgVersion = "2.1.0-281041"; |
@@ -8,5 +8,4 @@ { | ||
"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 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 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
1087688
122
13945
177
+ Added@fluid-internal/client-utils@2.1.0-281041(transitive)
+ Added@fluidframework/container-definitions@2.1.0-281041(transitive)
+ Added@fluidframework/container-runtime@2.1.0-281041(transitive)
+ Added@fluidframework/container-runtime-definitions@2.1.0-281041(transitive)
+ Added@fluidframework/core-interfaces@2.1.0-281041(transitive)
+ Added@fluidframework/core-utils@2.1.0-281041(transitive)
+ Added@fluidframework/datastore@2.1.0-281041(transitive)
+ Added@fluidframework/datastore-definitions@2.1.0-281041(transitive)
+ Added@fluidframework/driver-definitions@2.1.0-281041(transitive)
+ Added@fluidframework/driver-utils@2.1.0-281041(transitive)
+ Added@fluidframework/id-compressor@2.1.0-281041(transitive)
+ Added@fluidframework/merge-tree@2.1.0-281041(transitive)
+ Added@fluidframework/runtime-definitions@2.1.0-281041(transitive)
+ Added@fluidframework/runtime-utils@2.1.0-281041(transitive)
+ Added@fluidframework/shared-object-base@2.1.0-281041(transitive)
+ Added@fluidframework/telemetry-utils@2.1.0-281041(transitive)
- Removed@fluid-internal/client-utils@2.1.0-276985(transitive)
- Removed@fluidframework/container-definitions@2.1.0-276985(transitive)
- Removed@fluidframework/container-runtime@2.1.0-276985(transitive)
- Removed@fluidframework/container-runtime-definitions@2.1.0-276985(transitive)
- Removed@fluidframework/core-interfaces@2.1.0-276985(transitive)
- Removed@fluidframework/core-utils@2.1.0-276985(transitive)
- Removed@fluidframework/datastore@2.1.0-276985(transitive)
- Removed@fluidframework/datastore-definitions@2.1.0-276985(transitive)
- Removed@fluidframework/driver-definitions@2.1.0-276985(transitive)
- Removed@fluidframework/driver-utils@2.1.0-276985(transitive)
- Removed@fluidframework/id-compressor@2.1.0-276985(transitive)
- Removed@fluidframework/merge-tree@2.1.0-276985(transitive)
- Removed@fluidframework/runtime-definitions@2.1.0-276985(transitive)
- Removed@fluidframework/runtime-utils@2.1.0-276985(transitive)
- Removed@fluidframework/shared-object-base@2.1.0-276985(transitive)
- Removed@fluidframework/telemetry-utils@2.1.0-276985(transitive)