@fluidframework/odsp-driver 2.74.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/CHANGELOG.md +4 -0
- package/dist/compactSnapshotWriter.d.ts.map +1 -1
- package/dist/compactSnapshotWriter.js +1 -0
- package/dist/compactSnapshotWriter.js.map +1 -1
- package/dist/createFile/createNewUtils.d.ts.map +1 -1
- package/dist/createFile/createNewUtils.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/fetchSnapshot.d.ts.map +1 -1
- package/dist/fetchSnapshot.js.map +1 -1
- package/dist/odspDelayLoadedDeltaStream.d.ts.map +1 -1
- package/dist/odspDelayLoadedDeltaStream.js.map +1 -1
- package/dist/odspDeltaStorageService.d.ts.map +1 -1
- package/dist/odspDeltaStorageService.js.map +1 -1
- package/dist/odspDocumentDeltaConnection.d.ts.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/odspDocumentServiceFactoryCore.d.ts.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.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/odspLayerCompatState.d.ts +1 -1
- package/dist/odspLayerCompatState.d.ts.map +1 -1
- package/dist/odspLayerCompatState.js +2 -1
- package/dist/odspLayerCompatState.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/dist/vroom.d.ts.map +1 -1
- package/dist/vroom.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/createFile/createNewUtils.d.ts.map +1 -1
- package/lib/createFile/createNewUtils.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/fetchSnapshot.d.ts.map +1 -1
- package/lib/fetchSnapshot.js.map +1 -1
- package/lib/odspDelayLoadedDeltaStream.d.ts.map +1 -1
- package/lib/odspDelayLoadedDeltaStream.js.map +1 -1
- package/lib/odspDeltaStorageService.d.ts.map +1 -1
- package/lib/odspDeltaStorageService.js.map +1 -1
- package/lib/odspDocumentDeltaConnection.d.ts.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/odspDocumentServiceFactoryCore.d.ts.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.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/odspLayerCompatState.d.ts +1 -1
- package/lib/odspLayerCompatState.d.ts.map +1 -1
- package/lib/odspLayerCompatState.js +2 -1
- package/lib/odspLayerCompatState.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/lib/vroom.d.ts.map +1 -1
- package/lib/vroom.js.map +1 -1
- package/package.json +20 -20
- package/src/compactSnapshotWriter.ts +1 -0
- package/src/createFile/createNewUtils.ts +0 -1
- package/src/epochTracker.ts +2 -1
- package/src/fetchSnapshot.ts +0 -1
- package/src/odspDelayLoadedDeltaStream.ts +0 -1
- package/src/odspDeltaStorageService.ts +0 -1
- package/src/odspDocumentDeltaConnection.ts +2 -3
- package/src/odspDocumentService.ts +2 -0
- package/src/odspDocumentServiceFactoryCore.ts +0 -1
- package/src/odspDocumentStorageManager.ts +2 -0
- package/src/odspDocumentStorageServiceBase.ts +1 -0
- package/src/odspLayerCompatState.ts +2 -2
- package/src/packageVersion.ts +1 -1
- package/src/vroom.ts +0 -1
- package/.eslintrc.cjs +0 -49
package/src/epochTracker.ts
CHANGED
|
@@ -33,7 +33,6 @@ import {
|
|
|
33
33
|
normalizeError,
|
|
34
34
|
wrapError,
|
|
35
35
|
} from "@fluidframework/telemetry-utils/internal";
|
|
36
|
-
|
|
37
36
|
import { v4 as uuid } from "uuid";
|
|
38
37
|
|
|
39
38
|
import { type IVersionedValueWithEpoch, persistedCacheValueVersion } from "./contracts.js";
|
|
@@ -140,6 +139,7 @@ export class EpochTracker implements IPersistedFileCache {
|
|
|
140
139
|
)) as IVersionedValueWithEpoch;
|
|
141
140
|
// Version mismatch between what the runtime expects and what it recieved.
|
|
142
141
|
// The cached value should not be used
|
|
142
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- using ?. could change behavior
|
|
143
143
|
if (value === undefined || value.version !== persistedCacheValueVersion) {
|
|
144
144
|
return undefined;
|
|
145
145
|
}
|
|
@@ -295,6 +295,7 @@ export class EpochTracker implements IPersistedFileCache {
|
|
|
295
295
|
.catch(async (error) => {
|
|
296
296
|
// Get the server epoch from error in case we don't have it as if undefined we won't be able
|
|
297
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
|
|
298
299
|
if (epochFromResponse === undefined) {
|
|
299
300
|
epochFromResponse = (error as IOdspError).serverEpoch;
|
|
300
301
|
}
|
package/src/fetchSnapshot.ts
CHANGED
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
type ITelemetryLoggerExt,
|
|
25
25
|
loggerToMonitoringContext,
|
|
26
26
|
} from "@fluidframework/telemetry-utils/internal";
|
|
27
|
-
|
|
28
27
|
import type { Socket } from "socket.io-client";
|
|
29
28
|
import { v4 as uuid } from "uuid";
|
|
30
29
|
|
|
@@ -392,7 +391,7 @@ export class OdspDocumentDeltaConnection extends DocumentDeltaConnection {
|
|
|
392
391
|
documentId: string,
|
|
393
392
|
logger: ITelemetryLoggerExt,
|
|
394
393
|
): SocketReference {
|
|
395
|
-
// eslint-disable-next-line unicorn/no-array-
|
|
394
|
+
// eslint-disable-next-line unicorn/no-array-method-this-argument
|
|
396
395
|
const existingSocketReference = SocketReference.find(key, logger);
|
|
397
396
|
if (existingSocketReference) {
|
|
398
397
|
return existingSocketReference;
|
|
@@ -750,7 +749,7 @@ export class OdspDocumentDeltaConnection extends DocumentDeltaConnection {
|
|
|
750
749
|
public get disposed(): boolean {
|
|
751
750
|
if (!(this._disposed || this.socket.connected)) {
|
|
752
751
|
// Send error event if this connection is not yet disposed after socket is disconnected for 15s.
|
|
753
|
-
// 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
|
|
754
753
|
if (this.connectionNotYetDisposedTimeout === undefined) {
|
|
755
754
|
this.connectionNotYetDisposedTimeout = setTimeout(() => {
|
|
756
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
|
}
|
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
type TokenFetcher,
|
|
31
31
|
} from "@fluidframework/odsp-driver-definitions/internal";
|
|
32
32
|
import { PerformanceEvent, createChildLogger } from "@fluidframework/telemetry-utils/internal";
|
|
33
|
-
|
|
34
33
|
import { v4 as uuid } from "uuid";
|
|
35
34
|
|
|
36
35
|
import { useCreateNewModule } from "./createFile/index.js";
|
|
@@ -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
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type
|
|
6
|
+
import { generation, type ILayerCompatDetails } from "@fluid-internal/client-utils";
|
|
7
7
|
|
|
8
8
|
import { pkgVersion } from "./packageVersion.js";
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ export const odspDriverCompatDetailsForLoader: ILayerCompatDetails = {
|
|
|
19
19
|
/**
|
|
20
20
|
* The current generation of the ODSP Driver layer.
|
|
21
21
|
*/
|
|
22
|
-
generation
|
|
22
|
+
generation,
|
|
23
23
|
/**
|
|
24
24
|
* The features supported by the ODSP Driver layer across the Driver / Loader boundary.
|
|
25
25
|
*/
|
package/src/packageVersion.ts
CHANGED
package/src/vroom.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
|
-
};
|