@fluidframework/core-interfaces 2.70.0 → 2.72.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.
Files changed (41) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/CHANGELOG.md +13 -9
  3. package/api-extractor/api-extractor-lint-legacy.alpha.cjs.json +5 -0
  4. package/api-extractor/api-extractor-lint-legacy.alpha.esm.json +5 -0
  5. package/api-extractor/api-extractor.legacy.json +5 -1
  6. package/api-report/core-interfaces.beta.api.md +1 -0
  7. package/api-report/core-interfaces.legacy.alpha.api.md +473 -0
  8. package/api-report/core-interfaces.legacy.beta.api.md +1 -0
  9. package/api-report/core-interfaces.legacy.public.api.md +1 -0
  10. package/api-report/core-interfaces.public.api.md +1 -0
  11. package/dist/error.d.ts +41 -11
  12. package/dist/error.d.ts.map +1 -1
  13. package/dist/error.js +14 -3
  14. package/dist/error.js.map +1 -1
  15. package/dist/events/listeners.d.ts +0 -11
  16. package/dist/events/listeners.d.ts.map +1 -1
  17. package/dist/events/listeners.js.map +1 -1
  18. package/dist/index.d.ts +1 -2
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -4
  21. package/dist/index.js.map +1 -1
  22. package/dist/legacy.alpha.d.ts +73 -0
  23. package/dist/package.json +4 -0
  24. package/legacy/alpha.d.ts +11 -0
  25. package/lib/error.d.ts +41 -11
  26. package/lib/error.d.ts.map +1 -1
  27. package/lib/error.js +13 -2
  28. package/lib/error.js.map +1 -1
  29. package/lib/events/listeners.d.ts +0 -11
  30. package/lib/events/listeners.d.ts.map +1 -1
  31. package/lib/events/listeners.js.map +1 -1
  32. package/lib/index.d.ts +1 -2
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/index.js +1 -2
  35. package/lib/index.js.map +1 -1
  36. package/lib/legacy.alpha.d.ts +73 -0
  37. package/package.json +21 -9
  38. package/src/cjs/package.json +4 -0
  39. package/src/error.ts +25 -15
  40. package/src/events/listeners.ts +2 -0
  41. package/src/index.ts +4 -2
@@ -0,0 +1,73 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export {
12
+ // #region @public APIs
13
+ ConfigTypes,
14
+ ErasedType,
15
+ ExtendEventProvider,
16
+ FluidObject,
17
+ FluidObjectKeys,
18
+ FluidObjectProviderKeys,
19
+ IConfigProviderBase,
20
+ IDisposable,
21
+ IErrorBase,
22
+ IErrorEvent,
23
+ IEvent,
24
+ IEventProvider,
25
+ IEventThisPlaceHolder,
26
+ IEventTransformer,
27
+ IFluidHandle,
28
+ IFluidHandleErased,
29
+ IFluidLoadable,
30
+ IProvideFluidLoadable,
31
+ IRequest,
32
+ IRequestHeader,
33
+ IResponse,
34
+ ITelemetryBaseEvent,
35
+ ITelemetryBaseLogger,
36
+ ITelemetryBaseProperties,
37
+ IsListener,
38
+ Listenable,
39
+ Listeners,
40
+ LogLevel,
41
+ Off,
42
+ ReplaceIEventThisPlaceHolder,
43
+ Tagged,
44
+ TelemetryBaseEventPropertyType,
45
+ TransformedEvent,
46
+ fluidHandleSymbol,
47
+ // #endregion
48
+
49
+ // #region @beta APIs
50
+ ErasedBaseType,
51
+ // #endregion
52
+
53
+ // #region @legacyBeta APIs
54
+ FluidErrorTypes,
55
+ IFluidHandleContext,
56
+ IFluidHandleEvents,
57
+ IFluidHandleInternal,
58
+ IFluidHandlePayloadPending,
59
+ ILocalFluidHandle,
60
+ ILocalFluidHandleEvents,
61
+ ILoggingError,
62
+ IProvideFluidHandle,
63
+ IProvideFluidHandleContext,
64
+ IThrottlingWarning,
65
+ PayloadState,
66
+ TypedMessage,
67
+ // #endregion
68
+
69
+ // #region @legacyAlpha APIs
70
+ FluidErrorTypesAlpha,
71
+ ILayerIncompatibilityError
72
+ // #endregion
73
+ } from "./index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/core-interfaces",
3
- "version": "2.70.0",
3
+ "version": "2.72.0",
4
4
  "description": "Fluid object interfaces",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -33,6 +33,16 @@
33
33
  "default": "./dist/index.js"
34
34
  }
35
35
  },
36
+ "./legacy/alpha": {
37
+ "import": {
38
+ "types": "./lib/legacy.alpha.d.ts",
39
+ "default": "./lib/index.js"
40
+ },
41
+ "require": {
42
+ "types": "./dist/legacy.alpha.d.ts",
43
+ "default": "./dist/index.js"
44
+ }
45
+ },
36
46
  "./internal": {
37
47
  "import": {
38
48
  "types": "./lib/internal.d.ts",
@@ -73,11 +83,11 @@
73
83
  "devDependencies": {
74
84
  "@arethetypeswrong/cli": "^0.17.1",
75
85
  "@biomejs/biome": "~1.9.3",
76
- "@fluid-tools/build-cli": "^0.58.3",
86
+ "@fluid-tools/build-cli": "^0.60.0",
77
87
  "@fluidframework/build-common": "^2.0.3",
78
- "@fluidframework/build-tools": "^0.58.3",
79
- "@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.63.0",
80
- "@fluidframework/eslint-config-fluid": "^6.1.0",
88
+ "@fluidframework/build-tools": "^0.60.0",
89
+ "@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.71.0",
90
+ "@fluidframework/eslint-config-fluid": "~2.72.0",
81
91
  "@microsoft/api-extractor": "7.52.11",
82
92
  "@types/mocha": "^10.0.10",
83
93
  "@types/node": "^18.19.0",
@@ -104,8 +114,8 @@
104
114
  },
105
115
  "scripts": {
106
116
  "api": "fluid-build . --task api",
107
- "api-extractor:commonjs": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./dist",
108
- "api-extractor:esnext": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat",
117
+ "api-extractor:commonjs": "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacy.alpha --outDir ./dist",
118
+ "api-extractor:esnext": "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacy.alpha --outDir ./lib --node10TypeCompat",
109
119
  "build": "fluid-build . --task build",
110
120
  "build:api-reports": "concurrently \"npm:build:api-reports:*\"",
111
121
  "build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor.current.json",
@@ -123,8 +133,10 @@
123
133
  "check:exports": "concurrently \"npm:check:exports:*\"",
124
134
  "check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
125
135
  "check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json",
136
+ "check:exports:cjs:legacy.alpha": "api-extractor run --config api-extractor/api-extractor-lint-legacy.alpha.cjs.json",
126
137
  "check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
127
138
  "check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json",
139
+ "check:exports:esm:legacy.alpha": "api-extractor run --config api-extractor/api-extractor-lint-legacy.alpha.esm.json",
128
140
  "check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
129
141
  "check:format": "npm run check:biome",
130
142
  "ci:build": "npm run build:compile",
@@ -133,8 +145,8 @@
133
145
  "ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
134
146
  "ci:build:docs": "api-extractor run",
135
147
  "clean": "rimraf --glob dist lib {alpha,beta,legacy}.d.ts \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
136
- "eslint": "eslint --format stylish src",
137
- "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
148
+ "eslint": "eslint --quiet --format stylish src",
149
+ "eslint:fix": "eslint --quiet --format stylish src --fix --fix-type problem,suggestion,layout",
138
150
  "format": "npm run format:biome",
139
151
  "format:biome": "biome check . --write",
140
152
  "lint": "fluid-build . --task lint",
@@ -10,6 +10,10 @@
10
10
  "types": "./legacy.d.ts",
11
11
  "default": "./index.js"
12
12
  },
13
+ "./legacy/alpha": {
14
+ "types": "./legacy.alpha.d.ts",
15
+ "default": "./index.js"
16
+ },
13
17
  "./internal": {
14
18
  "types": "./internal.d.ts",
15
19
  "default": "./internal.js"
package/src/error.ts CHANGED
@@ -41,6 +41,29 @@ export const FluidErrorTypes = {
41
41
  */
42
42
  export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
43
43
 
44
+ /**
45
+ * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.
46
+ * @legacy @alpha
47
+ */
48
+ export const FluidErrorTypesAlpha = {
49
+ ...FluidErrorTypes,
50
+ /**
51
+ * Error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
52
+ * not compatible with the Runtime layer, the container create / load will fail with an error of this type.
53
+ * In most cases, the layer compatibility validation happens during container load / create causing it to
54
+ * fail with this error type.
55
+ * In some cases such as for the Runtime and DataStore layer compatibility, the incompatibility may be detected
56
+ * during data store loads. In such cases, the data store load will fail with this error type.
57
+ */
58
+ layerIncompatibilityError: "layerIncompatibilityError",
59
+ } as const;
60
+
61
+ /**
62
+ * @legacy @alpha
63
+ */
64
+ export type FluidErrorTypesAlpha =
65
+ (typeof FluidErrorTypesAlpha)[keyof typeof FluidErrorTypesAlpha];
66
+
44
67
  /**
45
68
  * Base interface for all errors and warnings emitted the container.
46
69
  *
@@ -130,15 +153,7 @@ export interface IThrottlingWarning extends IErrorBase {
130
153
  }
131
154
 
132
155
  /**
133
- * Symbol used to identify an error of type {@link ILayerIncompatibilityError}.
134
- * @legacy @alpha
135
- */
136
- export const layerIncompatibilityErrorSymbol: unique symbol = Symbol(
137
- "LayerIncompatibilityError",
138
- );
139
-
140
- /**
141
- * Usage error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
156
+ * Layer incompatibility error indicating that two Fluid layers are incompatible. For instance, if the Loader layer is
142
157
  * not compatible with the Runtime layer, the container will be disposed with this error.
143
158
  * @legacy @alpha
144
159
  */
@@ -146,12 +161,7 @@ export interface ILayerIncompatibilityError extends IErrorBase {
146
161
  /**
147
162
  * {@inheritDoc IErrorBase.errorType}
148
163
  */
149
- readonly errorType: typeof FluidErrorTypes.usageError;
150
-
151
- /**
152
- * Symbol used to identify this error as a layer incompatibility error.
153
- */
154
- readonly [layerIncompatibilityErrorSymbol]: true;
164
+ readonly errorType: typeof FluidErrorTypesAlpha.layerIncompatibilityError;
155
165
  /**
156
166
  * The layer that is reporting the incompatibility.
157
167
  */
@@ -30,6 +30,7 @@ export type Listeners<T extends object> = {
30
30
  [P in (string | symbol) & keyof T as IsListener<T[P]> extends true ? P : never]: T[P];
31
31
  };
32
32
 
33
+ /* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
33
34
  /**
34
35
  * An object which allows the registration of listeners so that subscribers can be notified when an event happens.
35
36
  * @param TListeners - All the {@link Listeners | events} that this subscribable supports
@@ -47,6 +48,7 @@ export type Listeners<T extends object> = {
47
48
  * @sealed @public
48
49
  */
49
50
  export interface Listenable<TListeners extends object> {
51
+ /* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive
50
52
  /**
51
53
  * Register an event listener.
52
54
  * @param eventName - The name of the event.
package/src/index.ts CHANGED
@@ -14,8 +14,10 @@ export type {
14
14
  IThrottlingWarning,
15
15
  ILayerIncompatibilityError,
16
16
  } from "./error.js";
17
- export { layerIncompatibilityErrorSymbol } from "./error.js";
18
- export { FluidErrorTypes } from "./error.js";
17
+ export {
18
+ FluidErrorTypes,
19
+ FluidErrorTypesAlpha,
20
+ } from "./error.js";
19
21
 
20
22
  export type {
21
23
  ExtendEventProvider,