@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.
Files changed (94) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/compactSnapshotWriter.d.ts.map +1 -1
  3. package/dist/compactSnapshotWriter.js +1 -0
  4. package/dist/compactSnapshotWriter.js.map +1 -1
  5. package/dist/createFile/createNewUtils.d.ts.map +1 -1
  6. package/dist/createFile/createNewUtils.js.map +1 -1
  7. package/dist/epochTracker.d.ts.map +1 -1
  8. package/dist/epochTracker.js +2 -0
  9. package/dist/epochTracker.js.map +1 -1
  10. package/dist/fetchSnapshot.d.ts.map +1 -1
  11. package/dist/fetchSnapshot.js.map +1 -1
  12. package/dist/odspDelayLoadedDeltaStream.d.ts.map +1 -1
  13. package/dist/odspDelayLoadedDeltaStream.js.map +1 -1
  14. package/dist/odspDeltaStorageService.d.ts.map +1 -1
  15. package/dist/odspDeltaStorageService.js.map +1 -1
  16. package/dist/odspDocumentDeltaConnection.d.ts.map +1 -1
  17. package/dist/odspDocumentDeltaConnection.js +2 -2
  18. package/dist/odspDocumentDeltaConnection.js.map +1 -1
  19. package/dist/odspDocumentService.d.ts.map +1 -1
  20. package/dist/odspDocumentService.js +2 -0
  21. package/dist/odspDocumentService.js.map +1 -1
  22. package/dist/odspDocumentServiceFactoryCore.d.ts.map +1 -1
  23. package/dist/odspDocumentServiceFactoryCore.js.map +1 -1
  24. package/dist/odspDocumentStorageManager.d.ts.map +1 -1
  25. package/dist/odspDocumentStorageManager.js +2 -0
  26. package/dist/odspDocumentStorageManager.js.map +1 -1
  27. package/dist/odspDocumentStorageServiceBase.d.ts.map +1 -1
  28. package/dist/odspDocumentStorageServiceBase.js +1 -0
  29. package/dist/odspDocumentStorageServiceBase.js.map +1 -1
  30. package/dist/odspLayerCompatState.d.ts +1 -1
  31. package/dist/odspLayerCompatState.d.ts.map +1 -1
  32. package/dist/odspLayerCompatState.js +2 -1
  33. package/dist/odspLayerCompatState.js.map +1 -1
  34. package/dist/packageVersion.d.ts +1 -1
  35. package/dist/packageVersion.d.ts.map +1 -1
  36. package/dist/packageVersion.js +1 -1
  37. package/dist/packageVersion.js.map +1 -1
  38. package/dist/vroom.d.ts.map +1 -1
  39. package/dist/vroom.js.map +1 -1
  40. package/eslint.config.mts +4 -23
  41. package/lib/compactSnapshotWriter.d.ts.map +1 -1
  42. package/lib/compactSnapshotWriter.js +1 -0
  43. package/lib/compactSnapshotWriter.js.map +1 -1
  44. package/lib/createFile/createNewUtils.d.ts.map +1 -1
  45. package/lib/createFile/createNewUtils.js.map +1 -1
  46. package/lib/epochTracker.d.ts.map +1 -1
  47. package/lib/epochTracker.js +2 -0
  48. package/lib/epochTracker.js.map +1 -1
  49. package/lib/fetchSnapshot.d.ts.map +1 -1
  50. package/lib/fetchSnapshot.js.map +1 -1
  51. package/lib/odspDelayLoadedDeltaStream.d.ts.map +1 -1
  52. package/lib/odspDelayLoadedDeltaStream.js.map +1 -1
  53. package/lib/odspDeltaStorageService.d.ts.map +1 -1
  54. package/lib/odspDeltaStorageService.js.map +1 -1
  55. package/lib/odspDocumentDeltaConnection.d.ts.map +1 -1
  56. package/lib/odspDocumentDeltaConnection.js +2 -2
  57. package/lib/odspDocumentDeltaConnection.js.map +1 -1
  58. package/lib/odspDocumentService.d.ts.map +1 -1
  59. package/lib/odspDocumentService.js +2 -0
  60. package/lib/odspDocumentService.js.map +1 -1
  61. package/lib/odspDocumentServiceFactoryCore.d.ts.map +1 -1
  62. package/lib/odspDocumentServiceFactoryCore.js.map +1 -1
  63. package/lib/odspDocumentStorageManager.d.ts.map +1 -1
  64. package/lib/odspDocumentStorageManager.js +2 -0
  65. package/lib/odspDocumentStorageManager.js.map +1 -1
  66. package/lib/odspDocumentStorageServiceBase.d.ts.map +1 -1
  67. package/lib/odspDocumentStorageServiceBase.js +1 -0
  68. package/lib/odspDocumentStorageServiceBase.js.map +1 -1
  69. package/lib/odspLayerCompatState.d.ts +1 -1
  70. package/lib/odspLayerCompatState.d.ts.map +1 -1
  71. package/lib/odspLayerCompatState.js +2 -1
  72. package/lib/odspLayerCompatState.js.map +1 -1
  73. package/lib/packageVersion.d.ts +1 -1
  74. package/lib/packageVersion.d.ts.map +1 -1
  75. package/lib/packageVersion.js +1 -1
  76. package/lib/packageVersion.js.map +1 -1
  77. package/lib/vroom.d.ts.map +1 -1
  78. package/lib/vroom.js.map +1 -1
  79. package/package.json +20 -20
  80. package/src/compactSnapshotWriter.ts +1 -0
  81. package/src/createFile/createNewUtils.ts +0 -1
  82. package/src/epochTracker.ts +2 -1
  83. package/src/fetchSnapshot.ts +0 -1
  84. package/src/odspDelayLoadedDeltaStream.ts +0 -1
  85. package/src/odspDeltaStorageService.ts +0 -1
  86. package/src/odspDocumentDeltaConnection.ts +2 -3
  87. package/src/odspDocumentService.ts +2 -0
  88. package/src/odspDocumentServiceFactoryCore.ts +0 -1
  89. package/src/odspDocumentStorageManager.ts +2 -0
  90. package/src/odspDocumentStorageServiceBase.ts +1 -0
  91. package/src/odspLayerCompatState.ts +2 -2
  92. package/src/packageVersion.ts +1 -1
  93. package/src/vroom.ts +0 -1
  94. package/.eslintrc.cjs +0 -49
@@ -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
  }
@@ -29,7 +29,6 @@ import {
29
29
  isFluidError,
30
30
  wrapError,
31
31
  } from "@fluidframework/telemetry-utils/internal";
32
-
33
32
  import { v4 as uuid } from "uuid";
34
33
 
35
34
  import {
@@ -35,7 +35,6 @@ import {
35
35
  type MonitoringContext,
36
36
  normalizeError,
37
37
  } from "@fluidframework/telemetry-utils/internal";
38
-
39
38
  import { v4 as uuid } from "uuid";
40
39
 
41
40
  import { policyLabelsUpdatesSignalType } from "./contracts.js";
@@ -18,7 +18,6 @@ import {
18
18
  type ITelemetryLoggerExt,
19
19
  PerformanceEvent,
20
20
  } from "@fluidframework/telemetry-utils/internal";
21
-
22
21
  import { v4 as uuid } from "uuid";
23
22
 
24
23
  import type { IDeltaStorageGetResponse, ISequencedDeltaOpMessage } from "./contracts.js";
@@ -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-callback-reference, unicorn/no-array-method-this-argument
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 { ILayerCompatDetails } from "@fluid-internal/client-utils";
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: 3,
22
+ generation,
23
23
  /**
24
24
  * The features supported by the ODSP Driver layer across the Driver / Loader boundary.
25
25
  */
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/odsp-driver";
9
- export const pkgVersion = "2.74.0";
9
+ export const pkgVersion = "2.81.0-374083";
package/src/vroom.ts CHANGED
@@ -13,7 +13,6 @@ import {
13
13
  type ITelemetryLoggerExt,
14
14
  PerformanceEvent,
15
15
  } from "@fluidframework/telemetry-utils/internal";
16
-
17
16
  import { v4 as uuid } from "uuid";
18
17
 
19
18
  import type { EpochTracker } from "./epochTracker.js";
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
- };