@fluidframework/odsp-driver 2.80.0 → 2.81.0-374083
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compactSnapshotWriter.d.ts.map +1 -1
- package/dist/compactSnapshotWriter.js +1 -0
- package/dist/compactSnapshotWriter.js.map +1 -1
- package/dist/epochTracker.d.ts.map +1 -1
- package/dist/epochTracker.js +2 -0
- package/dist/epochTracker.js.map +1 -1
- package/dist/odspDocumentDeltaConnection.js +2 -2
- package/dist/odspDocumentDeltaConnection.js.map +1 -1
- package/dist/odspDocumentService.d.ts.map +1 -1
- package/dist/odspDocumentService.js +2 -0
- package/dist/odspDocumentService.js.map +1 -1
- package/dist/odspDocumentStorageManager.d.ts.map +1 -1
- package/dist/odspDocumentStorageManager.js +2 -0
- package/dist/odspDocumentStorageManager.js.map +1 -1
- package/dist/odspDocumentStorageServiceBase.d.ts.map +1 -1
- package/dist/odspDocumentStorageServiceBase.js +1 -0
- package/dist/odspDocumentStorageServiceBase.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/eslint.config.mts +4 -23
- package/lib/compactSnapshotWriter.d.ts.map +1 -1
- package/lib/compactSnapshotWriter.js +1 -0
- package/lib/compactSnapshotWriter.js.map +1 -1
- package/lib/epochTracker.d.ts.map +1 -1
- package/lib/epochTracker.js +2 -0
- package/lib/epochTracker.js.map +1 -1
- package/lib/odspDocumentDeltaConnection.js +2 -2
- package/lib/odspDocumentDeltaConnection.js.map +1 -1
- package/lib/odspDocumentService.d.ts.map +1 -1
- package/lib/odspDocumentService.js +2 -0
- package/lib/odspDocumentService.js.map +1 -1
- package/lib/odspDocumentStorageManager.d.ts.map +1 -1
- package/lib/odspDocumentStorageManager.js +2 -0
- package/lib/odspDocumentStorageManager.js.map +1 -1
- package/lib/odspDocumentStorageServiceBase.d.ts.map +1 -1
- package/lib/odspDocumentStorageServiceBase.js +1 -0
- package/lib/odspDocumentStorageServiceBase.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +15 -15
- package/src/compactSnapshotWriter.ts +1 -0
- package/src/epochTracker.ts +2 -0
- package/src/odspDocumentDeltaConnection.ts +2 -2
- package/src/odspDocumentService.ts +2 -0
- package/src/odspDocumentStorageManager.ts +2 -0
- package/src/odspDocumentStorageServiceBase.ts +1 -0
- package/src/packageVersion.ts +1 -1
- package/.eslintrc.cjs +0 -49
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.81.0-374083",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,27 +69,27 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "
|
|
73
|
-
"@fluidframework/core-interfaces": "
|
|
74
|
-
"@fluidframework/core-utils": "
|
|
75
|
-
"@fluidframework/driver-base": "
|
|
76
|
-
"@fluidframework/driver-definitions": "
|
|
77
|
-
"@fluidframework/driver-utils": "
|
|
78
|
-
"@fluidframework/odsp-doclib-utils": "
|
|
79
|
-
"@fluidframework/odsp-driver-definitions": "
|
|
80
|
-
"@fluidframework/telemetry-utils": "
|
|
72
|
+
"@fluid-internal/client-utils": "2.81.0-374083",
|
|
73
|
+
"@fluidframework/core-interfaces": "2.81.0-374083",
|
|
74
|
+
"@fluidframework/core-utils": "2.81.0-374083",
|
|
75
|
+
"@fluidframework/driver-base": "2.81.0-374083",
|
|
76
|
+
"@fluidframework/driver-definitions": "2.81.0-374083",
|
|
77
|
+
"@fluidframework/driver-utils": "2.81.0-374083",
|
|
78
|
+
"@fluidframework/odsp-doclib-utils": "2.81.0-374083",
|
|
79
|
+
"@fluidframework/odsp-driver-definitions": "2.81.0-374083",
|
|
80
|
+
"@fluidframework/telemetry-utils": "2.81.0-374083",
|
|
81
81
|
"socket.io-client": "~4.7.5",
|
|
82
82
|
"uuid": "^11.1.0"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
86
86
|
"@biomejs/biome": "~1.9.3",
|
|
87
|
-
"@fluid-internal/mocha-test-setup": "
|
|
88
|
-
"@fluid-tools/build-cli": "^0.
|
|
87
|
+
"@fluid-internal/mocha-test-setup": "2.81.0-374083",
|
|
88
|
+
"@fluid-tools/build-cli": "^0.63.0",
|
|
89
89
|
"@fluidframework/build-common": "^2.0.3",
|
|
90
|
-
"@fluidframework/build-tools": "^0.
|
|
91
|
-
"@fluidframework/eslint-config-fluid": "
|
|
92
|
-
"@fluidframework/odsp-driver-previous": "npm:@fluidframework/odsp-driver@2.
|
|
90
|
+
"@fluidframework/build-tools": "^0.63.0",
|
|
91
|
+
"@fluidframework/eslint-config-fluid": "2.81.0-374083",
|
|
92
|
+
"@fluidframework/odsp-driver-previous": "npm:@fluidframework/odsp-driver@2.80.0",
|
|
93
93
|
"@microsoft/api-extractor": "7.52.11",
|
|
94
94
|
"@types/mocha": "^10.0.10",
|
|
95
95
|
"@types/node": "^18.19.0",
|
|
@@ -159,6 +159,7 @@ export function convertToCompactSnapshot(snapshotContents: ISnapshot): Uint8Arra
|
|
|
159
159
|
);
|
|
160
160
|
|
|
161
161
|
let latestSequenceNumber = snapshotContents.latestSequenceNumber;
|
|
162
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
|
|
162
163
|
if (latestSequenceNumber === undefined) {
|
|
163
164
|
latestSequenceNumber =
|
|
164
165
|
snapshotContents.ops.length > 0
|
package/src/epochTracker.ts
CHANGED
|
@@ -139,6 +139,7 @@ export class EpochTracker implements IPersistedFileCache {
|
|
|
139
139
|
)) as IVersionedValueWithEpoch;
|
|
140
140
|
// Version mismatch between what the runtime expects and what it recieved.
|
|
141
141
|
// The cached value should not be used
|
|
142
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- using ?. could change behavior
|
|
142
143
|
if (value === undefined || value.version !== persistedCacheValueVersion) {
|
|
143
144
|
return undefined;
|
|
144
145
|
}
|
|
@@ -294,6 +295,7 @@ export class EpochTracker implements IPersistedFileCache {
|
|
|
294
295
|
.catch(async (error) => {
|
|
295
296
|
// Get the server epoch from error in case we don't have it as if undefined we won't be able
|
|
296
297
|
// to mark it as epoch error.
|
|
298
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
|
|
297
299
|
if (epochFromResponse === undefined) {
|
|
298
300
|
epochFromResponse = (error as IOdspError).serverEpoch;
|
|
299
301
|
}
|
|
@@ -391,7 +391,7 @@ export class OdspDocumentDeltaConnection extends DocumentDeltaConnection {
|
|
|
391
391
|
documentId: string,
|
|
392
392
|
logger: ITelemetryLoggerExt,
|
|
393
393
|
): SocketReference {
|
|
394
|
-
// eslint-disable-next-line unicorn/no-array-
|
|
394
|
+
// eslint-disable-next-line unicorn/no-array-method-this-argument
|
|
395
395
|
const existingSocketReference = SocketReference.find(key, logger);
|
|
396
396
|
if (existingSocketReference) {
|
|
397
397
|
return existingSocketReference;
|
|
@@ -749,7 +749,7 @@ export class OdspDocumentDeltaConnection extends DocumentDeltaConnection {
|
|
|
749
749
|
public get disposed(): boolean {
|
|
750
750
|
if (!(this._disposed || this.socket.connected)) {
|
|
751
751
|
// Send error event if this connection is not yet disposed after socket is disconnected for 15s.
|
|
752
|
-
// eslint-disable-next-line unicorn/no-lonely-if
|
|
752
|
+
// eslint-disable-next-line unicorn/no-lonely-if, @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
|
|
753
753
|
if (this.connectionNotYetDisposedTimeout === undefined) {
|
|
754
754
|
this.connectionNotYetDisposedTimeout = setTimeout(() => {
|
|
755
755
|
if (!this._disposed) {
|
|
@@ -172,6 +172,7 @@ export class OdspDocumentService
|
|
|
172
172
|
* @returns returns the document storage service for sharepoint driver.
|
|
173
173
|
*/
|
|
174
174
|
public async connectToStorage(): Promise<IDocumentStorageService> {
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
|
|
175
176
|
if (!this.storageManager) {
|
|
176
177
|
this.storageManager = new OdspDocumentStorageService(
|
|
177
178
|
this.odspResolvedUrl,
|
|
@@ -247,6 +248,7 @@ export class OdspDocumentService
|
|
|
247
248
|
* @returns returns the document delta stream service for onedrive/sharepoint driver.
|
|
248
249
|
*/
|
|
249
250
|
public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {
|
|
251
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
|
|
250
252
|
if (this.socketModuleP === undefined) {
|
|
251
253
|
this.socketModuleP = this.getDelayLoadedDeltaStream();
|
|
252
254
|
}
|
|
@@ -724,6 +724,7 @@ export class OdspDocumentStorageService extends OdspDocumentStorageServiceBase {
|
|
|
724
724
|
this.checkSnapshotUrl();
|
|
725
725
|
|
|
726
726
|
// Set the module promise right away, so as to not call it twice.
|
|
727
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
|
|
727
728
|
if (this.summaryModuleP === undefined) {
|
|
728
729
|
this.summaryModuleP = this.getDelayLoadedSummaryManager();
|
|
729
730
|
}
|
|
@@ -760,6 +761,7 @@ export class OdspDocumentStorageService extends OdspDocumentStorageServiceBase {
|
|
|
760
761
|
}
|
|
761
762
|
}
|
|
762
763
|
|
|
764
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
|
|
763
765
|
if (!this.odspSummaryUploadManager) {
|
|
764
766
|
this.odspSummaryUploadManager = await this.summaryModuleP
|
|
765
767
|
.then(async (m) => {
|
|
@@ -241,6 +241,7 @@ export abstract class OdspDocumentStorageServiceBase implements IDocumentStorage
|
|
|
241
241
|
|
|
242
242
|
private async readTree(id: string, scenarioName?: string): Promise<ISnapshotTree | null> {
|
|
243
243
|
let tree = this.commitCache.get(id);
|
|
244
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
|
|
244
245
|
if (!tree) {
|
|
245
246
|
tree = await this.fetchTreeFromSnapshot(id, scenarioName);
|
|
246
247
|
}
|
package/src/packageVersion.ts
CHANGED
package/.eslintrc.cjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
extends: [require.resolve("@fluidframework/eslint-config-fluid"), "prettier"],
|
|
8
|
-
parserOptions: {
|
|
9
|
-
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
|
|
10
|
-
},
|
|
11
|
-
rules: {
|
|
12
|
-
// TODO: remove these overrides and fix violations
|
|
13
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
14
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
15
|
-
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
16
|
-
|
|
17
|
-
// This library uses and serializes "utf-8".
|
|
18
|
-
"unicorn/text-encoding-identifier-case": "off",
|
|
19
|
-
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
|
|
20
|
-
|
|
21
|
-
// #region TODO: remove these once eslint-config-fluid has been updated to 5.8.0
|
|
22
|
-
"@typescript-eslint/consistent-type-exports": [
|
|
23
|
-
"error",
|
|
24
|
-
{ fixMixedExportsWithInlineTypeSpecifier: true },
|
|
25
|
-
],
|
|
26
|
-
"@typescript-eslint/consistent-type-imports": [
|
|
27
|
-
"error",
|
|
28
|
-
{ fixStyle: "inline-type-imports" },
|
|
29
|
-
],
|
|
30
|
-
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
31
|
-
// #endregion
|
|
32
|
-
|
|
33
|
-
// Disabled because the rule is crashing on this package - AB#51780
|
|
34
|
-
"@typescript-eslint/unbound-method": "off",
|
|
35
|
-
},
|
|
36
|
-
overrides: [
|
|
37
|
-
{
|
|
38
|
-
// Rules only for test files
|
|
39
|
-
files: ["*.spec.ts", "src/test/**"],
|
|
40
|
-
rules: {
|
|
41
|
-
// It's valuable for tests to validate handling of `null` values, regardless of our API policies.
|
|
42
|
-
"unicorn/no-null": "off",
|
|
43
|
-
|
|
44
|
-
// Fine for tests to use `__dirname`
|
|
45
|
-
"unicorn/prefer-module": "off",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
};
|