Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@fluidframework/driver-definitions

Package Overview
Dependencies
Maintainers
1
Versions
565
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/driver-definitions - npm Package Compare versions

Comparing version
2.101.1
to
2.102.0
+1
-0
api-report/driver-definitions.legacy.beta.api.md

@@ -378,2 +378,3 @@ ## Beta API Report File for "@fluidframework/driver-definitions"

removeEntry?(entry: ICacheEntry): Promise<void>;
update?(entry: ICacheEntry, updater: (existing: unknown, set: (value: unknown) => void) => void): Promise<boolean>;
}

@@ -380,0 +381,0 @@

# @fluidframework/driver-definitions
## 2.102.0
Dependency updates only.
## 2.101.0

@@ -4,0 +8,0 @@

@@ -93,3 +93,23 @@ /*!

removeEntry?(entry: ICacheEntry): Promise<void>;
/**
* Atomically read the currently-cached value, hand it to `updater`, and write a new value
* iff `updater` calls the supplied `set` callback inside the same atomic transaction.
* Enables compare-and-set / read-modify-write across consumers that share the underlying
* storage (for example, multiple browser tabs).
*
* Implementations must invoke `updater` synchronously between reading the existing value
* and committing the write, so the get/decide/put runs atomically. The updater is passed
* `(existing, set)`; calling `set(value)` schedules a write, calling `set(undefined)`
* schedules a delete of the row at the key, and returning without calling `set` leaves
* the cache untouched. If the updater throws, the existing row is preserved.
*
* @param entry - cache entry, identifies file and particular key for this file.
* @param updater - synchronous callback invoked with `(existing, set)`. `existing` matches
* what `get` would return (typically `undefined` when the row is missing or invisible
* under implementation-specific staleness rules).
* @returns `true` if `set` was called and the write (or delete) committed; `false` if the
* updater returned without calling `set`, threw, or the implementation observed an error.
*/
update?(entry: ICacheEntry, updater: (existing: unknown, set: (value: unknown) => void) => void): Promise<boolean>;
}
//# sourceMappingURL=cacheDefinitions.d.ts.map
+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"cacheDefinitions.d.ts","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":"AA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AM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IAC1C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1C;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,CACN,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,GACjE,OAAO,CAAC,OAAO,CAAC,CAAC;CACpB"}

@@ -1,1 +0,1 @@

{"version":3,"file":"cacheDefinitions.js","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IResolvedUrl } from \"./urlResolver.js\";\n\n/**\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n * @legacy @beta\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n\n\t/**\n\t * Optional version of the file.\n\t */\n\tfileVersion?: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: string;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @legacy @beta\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<unknown>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: unknown): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parameters.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n\n\t/**\n\t * Removes a specific entry from the cache.\n\t * @param entry - cache entry to be deleted.\n\t */\n\tremoveEntry?(entry: ICacheEntry): Promise<void>;\n}\n"]}
{"version":3,"file":"cacheDefinitions.js","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IResolvedUrl } from \"./urlResolver.js\";\n\n/**\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n * @legacy @beta\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n\n\t/**\n\t * Optional version of the file.\n\t */\n\tfileVersion?: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: string;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @legacy @beta\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<unknown>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: unknown): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parameters.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n\n\t/**\n\t * Removes a specific entry from the cache.\n\t * @param entry - cache entry to be deleted.\n\t */\n\tremoveEntry?(entry: ICacheEntry): Promise<void>;\n\n\t/**\n\t * Atomically read the currently-cached value, hand it to `updater`, and write a new value\n\t * iff `updater` calls the supplied `set` callback inside the same atomic transaction.\n\t * Enables compare-and-set / read-modify-write across consumers that share the underlying\n\t * storage (for example, multiple browser tabs).\n\t *\n\t * Implementations must invoke `updater` synchronously between reading the existing value\n\t * and committing the write, so the get/decide/put runs atomically. The updater is passed\n\t * `(existing, set)`; calling `set(value)` schedules a write, calling `set(undefined)`\n\t * schedules a delete of the row at the key, and returning without calling `set` leaves\n\t * the cache untouched. If the updater throws, the existing row is preserved.\n\t *\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @param updater - synchronous callback invoked with `(existing, set)`. `existing` matches\n\t * what `get` would return (typically `undefined` when the row is missing or invisible\n\t * under implementation-specific staleness rules).\n\t * @returns `true` if `set` was called and the write (or delete) committed; `false` if the\n\t * updater returned without calling `set`, threw, or the implementation observed an error.\n\t */\n\tupdate?(\n\t\tentry: ICacheEntry,\n\t\tupdater: (existing: unknown, set: (value: unknown) => void) => void,\n\t): Promise<boolean>;\n}\n"]}

@@ -93,3 +93,23 @@ /*!

removeEntry?(entry: ICacheEntry): Promise<void>;
/**
* Atomically read the currently-cached value, hand it to `updater`, and write a new value
* iff `updater` calls the supplied `set` callback inside the same atomic transaction.
* Enables compare-and-set / read-modify-write across consumers that share the underlying
* storage (for example, multiple browser tabs).
*
* Implementations must invoke `updater` synchronously between reading the existing value
* and committing the write, so the get/decide/put runs atomically. The updater is passed
* `(existing, set)`; calling `set(value)` schedules a write, calling `set(undefined)`
* schedules a delete of the row at the key, and returning without calling `set` leaves
* the cache untouched. If the updater throws, the existing row is preserved.
*
* @param entry - cache entry, identifies file and particular key for this file.
* @param updater - synchronous callback invoked with `(existing, set)`. `existing` matches
* what `get` would return (typically `undefined` when the row is missing or invisible
* under implementation-specific staleness rules).
* @returns `true` if `set` was called and the write (or delete) committed; `false` if the
* updater returned without calling `set`, threw, or the implementation observed an error.
*/
update?(entry: ICacheEntry, updater: (existing: unknown, set: (value: unknown) => void) => void): Promise<boolean>;
}
//# sourceMappingURL=cacheDefinitions.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"cacheDefinitions.d.ts","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,EAAE,YAAY,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;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1C;;;;;OAKG;IACH,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,CACN,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,GACjE,OAAO,CAAC,OAAO,CAAC,CAAC;CACpB"}

@@ -1,1 +0,1 @@

{"version":3,"file":"cacheDefinitions.js","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IResolvedUrl } from \"./urlResolver.js\";\n\n/**\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n * @legacy @beta\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n\n\t/**\n\t * Optional version of the file.\n\t */\n\tfileVersion?: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: string;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @legacy @beta\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<unknown>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: unknown): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parameters.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n\n\t/**\n\t * Removes a specific entry from the cache.\n\t * @param entry - cache entry to be deleted.\n\t */\n\tremoveEntry?(entry: ICacheEntry): Promise<void>;\n}\n"]}
{"version":3,"file":"cacheDefinitions.js","sourceRoot":"","sources":["../src/cacheDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IResolvedUrl } from \"./urlResolver.js\";\n\n/**\n * File / container identifier.\n * There is overlapping information here - host can use all of it or parts\n * to implement storage / identify files.\n * @legacy @beta\n */\nexport interface IFileEntry {\n\t/**\n\t * Unique and stable ID of the document.\n\t * Driver guarantees that docId is stable ID uniquely identifying document.\n\t */\n\tdocId: string;\n\t/**\n\t * Resolved URI is provided for additional versatility - host can use it to\n\t * identify file in storage, and (as example) delete all cached entries for\n\t * a file if user requests so.\n\t * This is IOdspResolvedUrl in case of ODSP driver.\n\t */\n\tresolvedUrl: IResolvedUrl;\n\n\t/**\n\t * Optional version of the file.\n\t */\n\tfileVersion?: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface IEntry {\n\t/**\n\t * Identifies type of entry for a given file.\n\t * Each file can have multiple types of entries associated with it.\n\t * For example, it can be snapshot, blob, ops, etc.\n\t */\n\ttype: string;\n\n\t/**\n\t * Identifies individual entry for a given file and type.\n\t * Each file can have multiple cache entries associated with it.\n\t * This property identifies a particular instance of entry.\n\t * For example, for blobs it will be unique ID of the blob in a file.\n\t * For batch of ops, it can be starting op sequence number.\n\t * For types that have only one entry (like snapshots), it will be empty string.\n\t */\n\tkey: string;\n}\n\n/**\n * Cache entry. Identifies file that this entry belongs to, and type of content stored in it.\n * @legacy @beta\n */\nexport interface ICacheEntry extends IEntry {\n\t/**\n\t * Identifies file in storage this cached entry is for\n\t */\n\tfile: IFileEntry;\n}\n\n/**\n * Persistent cache. This interface can be implemented by the host to provide durable caching\n * across sessions. If not provided at driver factory construction, factory will use in-memory\n * cache implementation that does not survive across sessions. Snapshot entires stored in the\n * IPersistedCache will be considered stale and removed after 2 days. Read the README for more\n * information.\n * @legacy @beta\n */\nexport interface IPersistedCache {\n\t/**\n\t * Get the cache value of the key\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @returns Cached value. undefined if nothing is cached.\n\t */\n\tget(entry: ICacheEntry): Promise<unknown>;\n\n\t/**\n\t * Put the value into cache.\n\t * Important - only serializable content is allowed since this cache may be persisted between sessions\n\t * @param entry - cache entry.\n\t * @param value - JSON-serializable content.\n\t */\n\tput(entry: ICacheEntry, value: unknown): Promise<void>;\n\n\t/**\n\t * Removes the entries from the cache for given parameters.\n\t * @param file - file entry to be deleted.\n\t */\n\tremoveEntries(file: IFileEntry): Promise<void>;\n\n\t/**\n\t * Removes a specific entry from the cache.\n\t * @param entry - cache entry to be deleted.\n\t */\n\tremoveEntry?(entry: ICacheEntry): Promise<void>;\n\n\t/**\n\t * Atomically read the currently-cached value, hand it to `updater`, and write a new value\n\t * iff `updater` calls the supplied `set` callback inside the same atomic transaction.\n\t * Enables compare-and-set / read-modify-write across consumers that share the underlying\n\t * storage (for example, multiple browser tabs).\n\t *\n\t * Implementations must invoke `updater` synchronously between reading the existing value\n\t * and committing the write, so the get/decide/put runs atomically. The updater is passed\n\t * `(existing, set)`; calling `set(value)` schedules a write, calling `set(undefined)`\n\t * schedules a delete of the row at the key, and returning without calling `set` leaves\n\t * the cache untouched. If the updater throws, the existing row is preserved.\n\t *\n\t * @param entry - cache entry, identifies file and particular key for this file.\n\t * @param updater - synchronous callback invoked with `(existing, set)`. `existing` matches\n\t * what `get` would return (typically `undefined` when the row is missing or invisible\n\t * under implementation-specific staleness rules).\n\t * @returns `true` if `set` was called and the write (or delete) committed; `false` if the\n\t * updater returned without calling `set`, threw, or the implementation observed an error.\n\t */\n\tupdate?(\n\t\tentry: ICacheEntry,\n\t\tupdater: (existing: unknown, set: (value: unknown) => void) => void,\n\t): Promise<boolean>;\n}\n"]}
{
"name": "@fluidframework/driver-definitions",
"version": "2.101.1",
"version": "2.102.0",
"description": "Fluid driver definitions",

@@ -50,3 +50,3 @@ "homepage": "https://fluidframework.com",

"dependencies": {
"@fluidframework/core-interfaces": "~2.101.1"
"@fluidframework/core-interfaces": "~2.102.0"
},

@@ -59,3 +59,3 @@ "devDependencies": {

"@fluidframework/build-tools": "^0.65.0",
"@fluidframework/driver-definitions-previous": "npm:@fluidframework/driver-definitions@2.92.0",
"@fluidframework/driver-definitions-previous": "npm:@fluidframework/driver-definitions@2.101.0",
"@fluidframework/eslint-config-fluid": "^9.0.0",

@@ -62,0 +62,0 @@ "@microsoft/api-extractor": "7.58.1",

@@ -103,2 +103,26 @@ /*!

removeEntry?(entry: ICacheEntry): Promise<void>;
/**
* Atomically read the currently-cached value, hand it to `updater`, and write a new value
* iff `updater` calls the supplied `set` callback inside the same atomic transaction.
* Enables compare-and-set / read-modify-write across consumers that share the underlying
* storage (for example, multiple browser tabs).
*
* Implementations must invoke `updater` synchronously between reading the existing value
* and committing the write, so the get/decide/put runs atomically. The updater is passed
* `(existing, set)`; calling `set(value)` schedules a write, calling `set(undefined)`
* schedules a delete of the row at the key, and returning without calling `set` leaves
* the cache untouched. If the updater throws, the existing row is preserved.
*
* @param entry - cache entry, identifies file and particular key for this file.
* @param updater - synchronous callback invoked with `(existing, set)`. `existing` matches
* what `get` would return (typically `undefined` when the row is missing or invisible
* under implementation-specific staleness rules).
* @returns `true` if `set` was called and the write (or delete) committed; `false` if the
* updater returned without calling `set`, threw, or the implementation observed an error.
*/
update?(
entry: ICacheEntry,
updater: (existing: unknown, set: (value: unknown) => void) => void,
): Promise<boolean>;
}