fluid-framework 2.51.0-347100 → 2.51.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 +49 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# fluid-framework
|
|
2
2
|
|
|
3
|
+
## 2.51.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Fix adaptEnum's handling of numeric enums ([#24957](https://github.com/microsoft/FluidFramework/pull/24957)) [7535d31fa61](https://github.com/microsoft/FluidFramework/commit/7535d31fa61a535bf58bb88fc597e6e4f64c5b23)
|
|
8
|
+
|
|
9
|
+
Enum entries whose values are numeric get additional properties on TypeScript's generated Enum object.
|
|
10
|
+
These values were getting treated like enum entries at runtime by `adaptEnum` (`@beta`).
|
|
11
|
+
This has been fixed and the runtime behavior now matches the types in this case.
|
|
12
|
+
|
|
13
|
+
If any documents were created with this API which were impacted by this bug and keeping them openable is required, they will need a workaround.
|
|
14
|
+
Impacted schema using the union from `adaptEnum` can need to be updated to explicitly include the previously erroneously generated schema.
|
|
15
|
+
|
|
16
|
+
Before:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
enum Mode {
|
|
20
|
+
a = 1,
|
|
21
|
+
}
|
|
22
|
+
const ModeNodes = adaptEnum(schemaFactory, Mode);
|
|
23
|
+
const union = ModeNodes.schema;
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
After:
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
enum Mode {
|
|
30
|
+
a = 1,
|
|
31
|
+
}
|
|
32
|
+
const ModeNodes = adaptEnum(schemaFactory, Mode);
|
|
33
|
+
// Bugged version of adaptEnum used to include this: it should not be used but must be included in the schema for legacy document compatibility.
|
|
34
|
+
class Workaround extends schemaFactory.object("a", {}) {}
|
|
35
|
+
const union = [...ModeNodes.schema, Workaround] as const;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
To help detect when schema contain unexpected content, and to ensure workarounds like this are implemented properly, applications should include tests which check the schema for compatibility.
|
|
39
|
+
See [tree-cli-app's schema tests](https://github.com/microsoft/FluidFramework/blob/main/examples/apps/tree-cli-app/src/test/schema.spec.ts) for an example of how to do this.
|
|
40
|
+
|
|
41
|
+
The schema returned by `adaptEnum` have also been updated to `toString` to include the value of the particular enum entry: this has no effect on the nodes, just the schema.
|
|
42
|
+
|
|
43
|
+
- Make POJO mode TreeArrayNodes report the array constructor as their constructor ([#24988](https://github.com/microsoft/FluidFramework/pull/24988)) [7b4d0abe90f](https://github.com/microsoft/FluidFramework/commit/7b4d0abe90f50075bb06ef73ceceff2529ef78f5)
|
|
44
|
+
|
|
45
|
+
Make POJO mode TreeArrayNode's inherited `constructor` property report `Array` instead of the `TreeNodeSchema` class.
|
|
46
|
+
This is necessary to make `TreeArrayNode`s appear equal to arrays according to NodeJS's `assert.strict.deepEqual` in NodeJS 22.
|
|
47
|
+
|
|
48
|
+
- "rootChanged" event is no longer skipped if first change is setting the root to undefined ([#24994](https://github.com/microsoft/FluidFramework/pull/24994)) [e6f25875794](https://github.com/microsoft/FluidFramework/commit/e6f258757947b72b6a9d19c79f5717eccd44452b)
|
|
49
|
+
|
|
50
|
+
A bug has been fixed where [rootChanged](https://fluidframework.com/docs/api/fluid-framework/treeviewevents-interface#rootchanged-methodsignature) would not be fired if the change is the first change since the [TreeView](https://fluidframework.com/docs/api/fluid-framework/treeview-interface) became in-schema, and the change was setting the document root to `undefined`.
|
|
51
|
+
|
|
3
52
|
## 2.50.0
|
|
4
53
|
|
|
5
54
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluid-framework",
|
|
3
|
-
"version": "2.51.0
|
|
3
|
+
"version": "2.51.0",
|
|
4
4
|
"description": "The main entry point into Fluid Framework public packages",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
"main": "lib/index.js",
|
|
58
58
|
"types": "lib/public.d.ts",
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@fluidframework/container-definitions": "2.51.0
|
|
61
|
-
"@fluidframework/container-loader": "2.51.0
|
|
62
|
-
"@fluidframework/core-interfaces": "2.51.0
|
|
63
|
-
"@fluidframework/core-utils": "2.51.0
|
|
64
|
-
"@fluidframework/driver-definitions": "2.51.0
|
|
65
|
-
"@fluidframework/fluid-static": "2.51.0
|
|
66
|
-
"@fluidframework/map": "2.51.0
|
|
67
|
-
"@fluidframework/runtime-utils": "2.51.0
|
|
68
|
-
"@fluidframework/sequence": "2.51.0
|
|
69
|
-
"@fluidframework/shared-object-base": "2.51.0
|
|
70
|
-
"@fluidframework/tree": "2.51.0
|
|
60
|
+
"@fluidframework/container-definitions": "~2.51.0",
|
|
61
|
+
"@fluidframework/container-loader": "~2.51.0",
|
|
62
|
+
"@fluidframework/core-interfaces": "~2.51.0",
|
|
63
|
+
"@fluidframework/core-utils": "~2.51.0",
|
|
64
|
+
"@fluidframework/driver-definitions": "~2.51.0",
|
|
65
|
+
"@fluidframework/fluid-static": "~2.51.0",
|
|
66
|
+
"@fluidframework/map": "~2.51.0",
|
|
67
|
+
"@fluidframework/runtime-utils": "~2.51.0",
|
|
68
|
+
"@fluidframework/sequence": "~2.51.0",
|
|
69
|
+
"@fluidframework/shared-object-base": "~2.51.0",
|
|
70
|
+
"@fluidframework/tree": "~2.51.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@arethetypeswrong/cli": "^0.17.1",
|