@fluidframework/datastore 2.91.0 → 2.93.0

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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # @fluidframework/datastore
2
2
 
3
+ ## 2.93.0
4
+
5
+ ### Minor Changes
6
+
7
+ - minVersionForCollab is now non-optional ([#25331](https://github.com/microsoft/FluidFramework/pull/25331)) [9a0d0272df](https://github.com/microsoft/FluidFramework/commit/9a0d0272df6ae1a521cff00292dd159ea3b5e270)
8
+
9
+ This change is a follow-up for [pull request 25130](https://github.com/microsoft/FluidFramework/pull/25130)
10
+ which was released as part of [2.61.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.61.0).
11
+
12
+ The `minVersionForCollab` property has been made non-optional in the following `@beta` `@legacy` interfaces in the Runtime layer:
13
+ - `IFluidParentContext.minVersionForCollab` in `@fluidframework/runtime-definitions`.
14
+ - `IFluidDataStoreContext.minVersionForCollab` in `@fluidframework/runtime-definitions`.
15
+ - `IFluidDataStoreContextDetached.minVersionForCollab` in `@fluidframework/runtime-definitions`.
16
+
17
+ Consumers of Fluid aren't expected to implement these interfaces directly, so no impact is expected.
18
+
19
+ Additionally the following properties now always return a value, rather than possibly returning `undefined`:
20
+ - `FluidDataStoreRuntime.minVersionForCollab` in `@fluidframework/datastore`.
21
+ Note that API Extractor shows this as a breaking change since FluidDataStoreRuntime is beta + legacy and non-sealed.
22
+ However, FluidDataStoreRuntime is not intended to be extended directly outside of a known legacy use-case.
23
+ - `IDataObjectProps.context.minVersionForCollab` in `@fluidframework/aqueduct`.
24
+ - `ITestFluidObject.context.minVersionForCollab` in `@fluidframework/test-utils`
25
+ - `IProvideTestFluidObject.ITestFluidObject.context.minVersionForCollab` in `@fluidframework/test-utils`
26
+
27
+ ## 2.92.0
28
+
29
+ Dependency updates only.
30
+
3
31
  ## 2.91.0
4
32
 
5
33
  Dependency updates only.
package/README.md CHANGED
@@ -71,7 +71,7 @@ When making such a request please include if the configuration already works (an
71
71
 
72
72
  ### Supported Runtimes
73
73
 
74
- - 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).
74
+ - NodeJs ^22.22.2 except that we will drop support for it [when NodeJs 22 loses its upstream support on 2027-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS at least 1 year before 22 is end-of-life.
75
75
  - Running Fluid in a Node.js environment with the `--no-experimental-fetch` flag is not supported.
76
76
  - 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).
77
77
 
@@ -70,7 +70,7 @@ export class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataStoreRunt
70
70
  // (undocumented)
71
71
  get logger(): ITelemetryLoggerExt;
72
72
  makeVisibleAndAttachGraph(): void;
73
- readonly minVersionForCollab?: MinimumVersionForCollab | undefined;
73
+ readonly minVersionForCollab: MinimumVersionForCollab;
74
74
  notifyReadOnlyState(readonly: boolean): void;
75
75
  // (undocumented)
76
76
  get objectsRoutingContext(): this;
@@ -12,11 +12,11 @@ export declare const dataStoreCoreCompatDetails: {
12
12
  /**
13
13
  * The package version of the DataStore layer.
14
14
  */
15
- readonly pkgVersion: "2.91.0";
15
+ readonly pkgVersion: "2.93.0";
16
16
  /**
17
17
  * The current generation of the DataStore layer.
18
18
  */
19
- readonly generation: 5;
19
+ readonly generation: 6;
20
20
  };
21
21
  /**
22
22
  * DataStore's compatibility details that is exposed to the Runtime layer.
@@ -40,13 +40,29 @@ export type LocalFluidDataStoreRuntimeMessage = {
40
40
  export interface ISharedObjectRegistry {
41
41
  get(name: string): IChannelFactory | undefined;
42
42
  }
43
+ /**
44
+ * Wraps an {@link ISharedObjectRegistry} to transparently redirect legacy URL-based DDS type
45
+ * strings to the factories registered under the corresponding short-name path segment.
46
+ *
47
+ * When a lookup by the full URL fails, this wrapper retries using only the portion of the URL
48
+ * after `"https://graph.microsoft.com/types/"`. This allows old documents whose summaries
49
+ * contain URL-based type strings to be loaded against a registry built with the current
50
+ * short-name factory types.
51
+ *
52
+ * @remarks
53
+ * See {@link legacyTypeUrlPrefix} for details on old vs. new formats
54
+ */
55
+ export declare class LegacyTypeAwareRegistry implements ISharedObjectRegistry {
56
+ private readonly base;
57
+ constructor(base: ISharedObjectRegistry);
58
+ get(name: string): IChannelFactory | undefined;
59
+ }
43
60
  /**
44
61
  * Base data store class
45
62
  * @legacy @beta
46
63
  */
47
64
  export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataStoreRuntimeEvents> implements IFluidDataStoreChannel, IFluidDataStoreRuntime, IFluidHandleContext {
48
65
  private readonly dataStoreContext;
49
- private readonly sharedObjectRegistry;
50
66
  /**
51
67
  * {@inheritDoc @fluidframework/datastore-definitions#IFluidDataStoreRuntime.entryPoint}
52
68
  */
@@ -83,6 +99,7 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
83
99
  readonly id: string;
84
100
  readonly options: Record<string | number, any>;
85
101
  readonly deltaManagerInternal: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
102
+ private readonly sharedObjectRegistry;
86
103
  private readonly quorum;
87
104
  private readonly audience;
88
105
  private readonly mc;
@@ -110,9 +127,13 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
110
127
  */
111
128
  private readonly submitMessagesWithoutEncodingHandles;
112
129
  /**
113
- * See `IFluidDataStoreRuntimeInternalConfig.minVersionForCollab`.
130
+ * See IFluidDataStoreRuntimeInternalConfig.minVersionForCollab
131
+ *
132
+ * Note: this class doesn't declare that it implements IFluidDataStoreRuntimeInternalConfig,
133
+ * and we keep this property as private, but consumers may optimistically cast
134
+ * to the internal interface to access this property.
114
135
  */
115
- readonly minVersionForCollab?: MinimumVersionForCollab | undefined;
136
+ readonly minVersionForCollab: MinimumVersionForCollab;
116
137
  /**
117
138
  * Create an instance of a DataStore runtime.
118
139
  *
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAA4B,MAAM,8BAA8B,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EACX,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACX,mBAAmB,EACnB,oBAAoB,EACpB,MAAM,0CAA0C,CAAC;AAQlD,OAAO,KAAK,EACX,QAAQ,EACR,eAAe,EACf,sBAAsB,EACtB,4BAA4B,EAC5B,mBAAmB,EAEnB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,cAAc,EAInB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACX,gBAAgB,EAEhB,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAG3B,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,eAAe,EAEf,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAI9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAI5B,MAAM,8CAA8C,CAAC;AAkBtD,OAAO,EACN,KAAK,mBAAmB,EASxB,MAAM,0CAA0C,CAAC;AAiClD;;G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;;;;;;;;OAcG;IACI,QAAQ,CACd,IAAI,EAAE,oBAAoB,EAG1B,OAAO,EAAE,GAAG,EACZ,eAAe,EAAE,OAAO,EACxB,MAAM,EAAE,OAAO,GACb,IAAI;IA6BP;;;;;;;;;;;;OAYG;IACI,QAAQ,CAAC,CACf,IAAI,EAAE,oBAAoB,EAG1B,OAAO,EAAE,GAAG,EACZ,eAAe,EAAE,OAAO,GACtB,IAAI;IAgCM,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAqD3D;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,cAAc;IAkBtB,OAAO,CAAC,eAAe;IAMvB;;;;OAIG;IACH,OAAO,CAAC,+BAA+B;IAyBhC,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,QAAQ,GAAG,IAAI;CA+CtF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,mBACf,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,KAAK,QAAQ,SAAS,CAAC,SACnF,4BAA4B,KAChC,4BAS+B,CAAC;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,YACtB,CACR,OAAO,EAAE,qBAAqB,EAC9B,uBAAuB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,KAClD,QAAQ;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,SACvD,4BAA4B,KAChC,4BAkD+B,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.mixinSummaryHandler = exports.mixinRequestHandler = exports.FluidDataStoreRuntime = exports.DataStoreMessageType = void 0;
7
+ exports.mixinSummaryHandler = exports.mixinRequestHandler = exports.FluidDataStoreRuntime = exports.LegacyTypeAwareRegistry = exports.DataStoreMessageType = void 0;
8
8
  const client_utils_1 = require("@fluid-internal/client-utils");
9
9
  const container_definitions_1 = require("@fluidframework/container-definitions");
10
10
  const internal_1 = require("@fluidframework/core-utils/internal");
@@ -33,6 +33,74 @@ var DataStoreMessageType;
33
33
  DataStoreMessageType["Attach"] = "attach";
34
34
  DataStoreMessageType["ChannelOp"] = "op";
35
35
  })(DataStoreMessageType || (exports.DataStoreMessageType = DataStoreMessageType = {}));
36
+ /**
37
+ * The common URL prefix used by legacy DDS type strings.
38
+ * Factories originally used full URLs (e.g. `"https://graph.microsoft.com/types/map"`);
39
+ * new factories use only the trailing path segment (e.g. `"map"`).
40
+ *
41
+ * Support for reading both formats was added in 2.92.0.
42
+ * @remarks
43
+ * This is encoded using base64 to avoid replacement of URL-like values that we have seen some reverse proxies perform.
44
+ * The value at runtime is "https://graph.microsoft.com/types/".
45
+ */
46
+ const legacyTypeUrlPrefix = atob("aHR0cHM6Ly9ncmFwaC5taWNyb3NvZnQuY29tL3R5cGVzLw==");
47
+ /**
48
+ * Wraps an {@link ISharedObjectRegistry} to transparently redirect legacy URL-based DDS type
49
+ * strings to the factories registered under the corresponding short-name path segment.
50
+ *
51
+ * When a lookup by the full URL fails, this wrapper retries using only the portion of the URL
52
+ * after `"https://graph.microsoft.com/types/"`. This allows old documents whose summaries
53
+ * contain URL-based type strings to be loaded against a registry built with the current
54
+ * short-name factory types.
55
+ *
56
+ * @remarks
57
+ * See {@link legacyTypeUrlPrefix} for details on old vs. new formats
58
+ */
59
+ class LegacyTypeAwareRegistry {
60
+ constructor(base) {
61
+ this.base = base;
62
+ }
63
+ get(name) {
64
+ let factory = this.base.get(name);
65
+ if (factory !== undefined) {
66
+ return factory;
67
+ }
68
+ // eslint-disable-next-line unicorn/prefer-ternary -- This is more readable as an if statement to clearly delineate which logic can be later removed vs. which needs to stay.
69
+ if (name.startsWith(legacyTypeUrlPrefix)) {
70
+ // Back-compat: if the name is a legacy URL-based type string, retry with just the trailing path segment.
71
+ factory = this.base.get(name.slice(legacyTypeUrlPrefix.length));
72
+ }
73
+ else {
74
+ // Temporary compat: if the name is *not* a legacy URL-based type string and we haven't found a match yet, check if we have a match with the
75
+ // corresponding legacy scheme. This ensures that if a client containing an older code version with the legacy attribute types loads a document
76
+ // written by a newer code version, they are still able to find the correct factories. This block can be removed once collaboration between clients
77
+ // with legacy vs. new attribute types in their code is no longer supported.
78
+ factory = this.base.get(`${legacyTypeUrlPrefix}${name}`);
79
+ }
80
+ if (factory !== undefined) {
81
+ return factory;
82
+ }
83
+ if (isURL(name) && name.includes("graph.microsoft")) {
84
+ // Reasonably strong signal that this the document refers to a DDS type string that is using the legacy URL format, but
85
+ // the base URL was likely changed by a reverse proxy or similar. Assume that its final segment is still the short (modern) name of
86
+ // a valid DDS type and look it up as such.
87
+ const finalSegment = name.split("/").slice(-1)[0];
88
+ if (finalSegment !== undefined) {
89
+ return (this.base.get(finalSegment) ?? this.base.get(`${legacyTypeUrlPrefix}${finalSegment}`));
90
+ }
91
+ }
92
+ }
93
+ }
94
+ exports.LegacyTypeAwareRegistry = LegacyTypeAwareRegistry;
95
+ function isURL(str) {
96
+ try {
97
+ new URL(str);
98
+ return true;
99
+ }
100
+ catch {
101
+ return false;
102
+ }
103
+ }
36
104
  const defaultPolicies = {
37
105
  readonlyInStagingMode: false,
38
106
  };
@@ -117,7 +185,6 @@ class FluidDataStoreRuntime extends client_utils_1.TypedEventEmitter {
117
185
  constructor(dataStoreContext, sharedObjectRegistry, existing, provideEntryPoint, policies) {
118
186
  super();
119
187
  this.dataStoreContext = dataStoreContext;
120
- this.sharedObjectRegistry = sharedObjectRegistry;
121
188
  /**
122
189
  * {@inheritDoc @fluidframework/datastore-definitions#IFluidDataStoreRuntime.isReadOnly}
123
190
  */
@@ -145,6 +212,7 @@ class FluidDataStoreRuntime extends client_utils_1.TypedEventEmitter {
145
212
  * Used to compute {@link FluidDataStoreRuntime.isDirty}
146
213
  */
147
214
  this.pendingOpCount = initializePendingOpCount();
215
+ this.sharedObjectRegistry = new LegacyTypeAwareRegistry(sharedObjectRegistry);
148
216
  (0, internal_1.assert)(!dataStoreContext.id.includes("/"), 0x30e /* Id cannot contain slashes. DataStoreContext should have validated this. */);
149
217
  this.mc = (0, internal_5.createChildMonitoringContext)({
150
218
  logger: dataStoreContext.baseLogger,