Skip to content

Commit 1eaf526

Browse files
authored
docs(container-definitions): Reserve some keys in IFluidCodeDetailsConfig for framework use (microsoft#25641)
## Description Updates the documentation on `IFluidCodeDetails` and `IFluidCodeDetailsConfig` to make some string keys in the latter reserved for Fluid Framework use. ## Breaking Changes While it could theoretically cause breaking changes, I could not find evidence of our partners using keys like the ones this PR now makes reserved; the chances seem pretty low IMO. Furthermore, the scenario for which we intend to use reserved keys does not apply to existing Fluid documents, so even if some partner was using keys like these, their Fluid files would not go through the code that will care about the new reserved keys (at least not the code we already know of today). ## Reviewer Guidance The review process is outlined on [this wiki page](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines).
1 parent ea2f4c8 commit 1eaf526

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

.changeset/forty-snakes-swim.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@fluidframework/container-definitions": minor
3+
"__section": legacy
4+
---
5+
Some keys in IFluidCodeDetailsConfig are now reserved for Fluid Framework use
6+
7+
The keys of [`IFluidCodeDetailsConfig`](https://fluidframework.com/docs/api/container-definitions/ifluidcodedetailsconfig-interface)
8+
(the [type of the `config` property on `IFluidCodeDetails`](https://fluidframework.com/docs/api/container-definitions/ifluidcodedetails-interface#config-propertysignature))
9+
used to be entirely free for consumer use.
10+
Going forward, keys with the `"FluidFramework."` prefix are reserved for Fluid Framework's internal use.
11+
12+
We do not expect this to affect any consumers.

packages/common/container-definitions/src/fluidPackage.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ export const isFluidPackage = (pkg: unknown): pkg is Readonly<IFluidPackage> =>
7272
typeof (pkg as Partial<IFluidPackage>)?.fluid === "object";
7373

7474
/**
75-
* Package manager configuration. Provides a key value mapping of config values
75+
* A key-value mapping of config values.
76+
*
77+
* @remarks
78+
* Can be used by consumers for things like providing additional configuration for their package manager.
79+
*
80+
* @see {@link IFluidCodeDetails.config}
81+
*
7682
* @legacy @beta
7783
*/
7884
export interface IFluidCodeDetailsConfig {
@@ -85,16 +91,20 @@ export interface IFluidCodeDetailsConfig {
8591
*/
8692
export interface IFluidCodeDetails {
8793
/**
88-
* The code package to be used on the Fluid document. This is either the package name which will be loaded
89-
* from a package manager. Or the expanded Fluid package.
94+
* The code package to be used on the Fluid document.
95+
* This is either the package name which will be loaded from a package manager, or the expanded Fluid package.
9096
*/
9197
readonly package: string | Readonly<IFluidPackage>;
9298

9399
/**
94-
* Configuration details. This includes links to the package manager and base CDNs.
100+
* Configuration details and additional information about the Fluid document.
95101
*
96-
* @remarks This is strictly consumer-defined data.
97-
* Its contents and semantics (including whether or not this data is present) are completely up to the consumer.
102+
* @remarks
103+
* This is mainly consumer-defined data (e.g. links to a package manager and base CDNs).
104+
* Its contents and semantics (including whether or not this data is present) are completely up to the consumer,
105+
* _except_ for keys starting with "FluidFramework." (e.g. "FluidFramework.CustomSetting1")
106+
* which are reserved by the framework and should not be used by consumers.
107+
* Outside of those reserved keys, Fluid does not interpret this data in any way.
98108
*/
99109
readonly config?: IFluidCodeDetailsConfig;
100110
}

0 commit comments

Comments
 (0)