Skip to content

Commit 1bed431

Browse files
authored
type tests for 2.20 (#23648)
Update type tests according to our wiki.
1 parent ec5f945 commit 1bed431

File tree

68 files changed

+795
-1205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+795
-1205
lines changed

azure/packages/azure-service-utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"@arethetypeswrong/cli": "^0.17.1",
9898
"@biomejs/biome": "~1.9.3",
9999
"@fluid-tools/build-cli": "^0.51.0",
100-
"@fluidframework/azure-service-utils-previous": "npm:@fluidframework/azure-service-utils@2.13.0",
100+
"@fluidframework/azure-service-utils-previous": "npm:@fluidframework/azure-service-utils@2.20.0",
101101
"@fluidframework/build-common": "^2.0.3",
102102
"@fluidframework/build-tools": "^0.51.0",
103103
"@fluidframework/eslint-config-fluid": "^5.6.0",

experimental/dds/attributable-map/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"devDependencies": {
102102
"@arethetypeswrong/cli": "^0.17.1",
103103
"@biomejs/biome": "~1.9.3",
104-
"@fluid-experimental/attributable-map-previous": "npm:@fluid-experimental/attributable-map@2.13.0",
104+
"@fluid-experimental/attributable-map-previous": "npm:@fluid-experimental/attributable-map@2.20.0",
105105
"@fluid-internal/mocha-test-setup": "workspace:~",
106106
"@fluid-private/stochastic-test-utils": "workspace:~",
107107
"@fluid-private/test-dds-utils": "workspace:~",

packages/common/client-utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"devDependencies": {
136136
"@arethetypeswrong/cli": "^0.17.1",
137137
"@biomejs/biome": "~1.9.3",
138-
"@fluid-internal/client-utils-previous": "npm:@fluid-internal/client-utils@2.13.0",
138+
"@fluid-internal/client-utils-previous": "npm:@fluid-internal/client-utils@2.20.0",
139139
"@fluid-internal/mocha-test-setup": "workspace:~",
140140
"@fluid-tools/build-cli": "^0.51.0",
141141
"@fluidframework/build-common": "^2.0.3",

packages/common/container-definitions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"@fluid-tools/build-cli": "^0.51.0",
103103
"@fluidframework/build-common": "^2.0.3",
104104
"@fluidframework/build-tools": "^0.51.0",
105-
"@fluidframework/container-definitions-previous": "npm:@fluidframework/container-definitions@2.13.0",
105+
"@fluidframework/container-definitions-previous": "npm:@fluidframework/container-definitions@2.20.0",
106106
"@fluidframework/eslint-config-fluid": "^5.6.0",
107107
"@microsoft/api-extractor": "7.47.8",
108108
"concurrently": "^8.2.1",

packages/common/core-interfaces/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"@fluid-tools/build-cli": "^0.51.0",
9999
"@fluidframework/build-common": "^2.0.3",
100100
"@fluidframework/build-tools": "^0.51.0",
101-
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.13.0",
101+
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.20.0",
102102
"@fluidframework/eslint-config-fluid": "^5.6.0",
103103
"@microsoft/api-extractor": "7.47.8",
104104
"@types/node": "^18.19.0",

packages/common/core-utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"@fluid-tools/build-cli": "^0.51.0",
125125
"@fluidframework/build-common": "^2.0.3",
126126
"@fluidframework/build-tools": "^0.51.0",
127-
"@fluidframework/core-utils-previous": "npm:@fluidframework/core-utils@2.13.0",
127+
"@fluidframework/core-utils-previous": "npm:@fluidframework/core-utils@2.20.0",
128128
"@fluidframework/eslint-config-fluid": "^5.6.0",
129129
"@microsoft/api-extractor": "7.47.8",
130130
"@types/mocha": "^10.0.10",

packages/common/driver-definitions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"@fluid-tools/build-cli": "^0.51.0",
9898
"@fluidframework/build-common": "^2.0.3",
9999
"@fluidframework/build-tools": "^0.51.0",
100-
"@fluidframework/driver-definitions-previous": "npm:@fluidframework/driver-definitions@2.13.0",
100+
"@fluidframework/driver-definitions-previous": "npm:@fluidframework/driver-definitions@2.20.0",
101101
"@fluidframework/eslint-config-fluid": "^5.6.0",
102102
"@microsoft/api-extractor": "7.47.8",
103103
"concurrently": "^8.2.1",

packages/dds/cell/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"@fluid-tools/build-cli": "^0.51.0",
116116
"@fluidframework/build-common": "^2.0.3",
117117
"@fluidframework/build-tools": "^0.51.0",
118-
"@fluidframework/cell-previous": "npm:@fluidframework/cell@2.13.0",
118+
"@fluidframework/cell-previous": "npm:@fluidframework/cell@2.20.0",
119119
"@fluidframework/container-definitions": "workspace:~",
120120
"@fluidframework/eslint-config-fluid": "^5.6.0",
121121
"@fluidframework/test-runtime-utils": "workspace:~",

packages/dds/counter/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"@fluidframework/build-common": "^2.0.3",
134134
"@fluidframework/build-tools": "^0.51.0",
135135
"@fluidframework/container-definitions": "workspace:~",
136-
"@fluidframework/counter-previous": "npm:@fluidframework/counter@2.13.0",
136+
"@fluidframework/counter-previous": "npm:@fluidframework/counter@2.20.0",
137137
"@fluidframework/eslint-config-fluid": "^5.6.0",
138138
"@fluidframework/test-runtime-utils": "workspace:~",
139139
"@microsoft/api-extractor": "7.47.8",

packages/dds/map/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
"@fluidframework/build-tools": "^0.51.0",
148148
"@fluidframework/container-definitions": "workspace:~",
149149
"@fluidframework/eslint-config-fluid": "^5.6.0",
150-
"@fluidframework/map-previous": "npm:@fluidframework/map@2.13.0",
150+
"@fluidframework/map-previous": "npm:@fluidframework/map@2.20.0",
151151
"@fluidframework/test-runtime-utils": "workspace:~",
152152
"@microsoft/api-extractor": "7.47.8",
153153
"@types/mocha": "^10.0.10",

packages/dds/matrix/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
"@fluidframework/build-tools": "^0.51.0",
151151
"@fluidframework/container-definitions": "workspace:~",
152152
"@fluidframework/eslint-config-fluid": "^5.6.0",
153-
"@fluidframework/matrix-previous": "npm:@fluidframework/matrix@2.13.0",
153+
"@fluidframework/matrix-previous": "npm:@fluidframework/matrix@2.20.0",
154154
"@fluidframework/test-runtime-utils": "workspace:~",
155155
"@microsoft/api-extractor": "7.47.8",
156156
"@tiny-calc/micro": "0.0.0-alpha.5",

packages/dds/merge-tree/package.json

+2-60
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"@fluidframework/build-common": "^2.0.3",
157157
"@fluidframework/build-tools": "^0.51.0",
158158
"@fluidframework/eslint-config-fluid": "^5.6.0",
159-
"@fluidframework/merge-tree-previous": "npm:@fluidframework/merge-tree@2.13.0",
159+
"@fluidframework/merge-tree-previous": "npm:@fluidframework/merge-tree@2.20.0",
160160
"@fluidframework/test-runtime-utils": "workspace:~",
161161
"@microsoft/api-extractor": "7.47.8",
162162
"@types/diff": "^3.5.1",
@@ -177,65 +177,7 @@
177177
"typescript": "~5.4.5"
178178
},
179179
"typeValidation": {
180-
"broken": {
181-
"Class_BaseSegment": {
182-
"backCompat": false
183-
},
184-
"Class_Marker": {
185-
"backCompat": false
186-
},
187-
"Class_TextSegment": {
188-
"backCompat": false
189-
},
190-
"Class_TrackingGroup": {
191-
"backCompat": false
192-
},
193-
"ClassStatics_BaseSegment": {
194-
"backCompat": false
195-
},
196-
"ClassStatics_Marker": {
197-
"backCompat": false
198-
},
199-
"ClassStatics_TextSegment": {
200-
"backCompat": false
201-
},
202-
"ClassStatics_TrackingGroup": {
203-
"backCompat": false
204-
},
205-
"Interface_IMergeTreeDeltaCallbackArgs": {
206-
"backCompat": false
207-
},
208-
"Interface_IMergeTreeMaintenanceCallbackArgs": {
209-
"backCompat": false
210-
},
211-
"Interface_IMergeTreeSegmentDelta": {
212-
"backCompat": false
213-
},
214-
"Interface_ISegment": {
215-
"backCompat": false
216-
},
217-
"Interface_ITrackingGroup": {
218-
"backCompat": false
219-
},
220-
"TypeAlias_MergeTreeDeltaRevertible": {
221-
"backCompat": false
222-
},
223-
"TypeAlias_Trackable": {
224-
"backCompat": false
225-
},
226-
"Interface_IMergeNodeCommon": {
227-
"forwardCompat": false,
228-
"backCompat": false
229-
},
230-
"Interface_IMoveInfo": {
231-
"forwardCompat": false,
232-
"backCompat": false
233-
},
234-
"Interface_IRemovalInfo": {
235-
"forwardCompat": false,
236-
"backCompat": false
237-
}
238-
},
180+
"broken": {},
239181
"entrypoint": "legacy"
240182
}
241183
}

packages/dds/merge-tree/src/test/types/validateMergeTreePrevious.generated.ts

-93
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,8 @@ declare type old_as_current_for_Class_BaseSegment = requireAssignableTo<TypeOnly
3131
* typeValidation.broken:
3232
* "Class_BaseSegment": {"backCompat": false}
3333
*/
34-
// @ts-expect-error compatibility expected to be broken
3534
declare type current_as_old_for_Class_BaseSegment = requireAssignableTo<TypeOnly<current.BaseSegment>, TypeOnly<old.BaseSegment>>
3635

37-
/*
38-
* Validate backward compatibility by using the current type in place of the old type.
39-
* If this test starts failing, it indicates a change that is not backward compatible.
40-
* To acknowledge the breaking change, add the following to package.json under
41-
* typeValidation.broken:
42-
* "Class_LocalReferenceCollection": {"backCompat": false}
43-
*/
44-
declare type current_as_old_for_Class_LocalReferenceCollection = requireAssignableTo<TypeOnly<current.LocalReferenceCollection>, TypeOnly<old.LocalReferenceCollection>>
45-
4636
/*
4737
* Validate forward compatibility by using the old type in place of the current type.
4838
* If this test starts failing, it indicates a change that is not forward compatible.
@@ -59,7 +49,6 @@ declare type old_as_current_for_Class_Marker = requireAssignableTo<TypeOnly<old.
5949
* typeValidation.broken:
6050
* "Class_Marker": {"backCompat": false}
6151
*/
62-
// @ts-expect-error compatibility expected to be broken
6352
declare type current_as_old_for_Class_Marker = requireAssignableTo<TypeOnly<current.Marker>, TypeOnly<old.Marker>>
6453

6554
/*
@@ -78,7 +67,6 @@ declare type old_as_current_for_Class_TextSegment = requireAssignableTo<TypeOnly
7867
* typeValidation.broken:
7968
* "Class_TextSegment": {"backCompat": false}
8069
*/
81-
// @ts-expect-error compatibility expected to be broken
8270
declare type current_as_old_for_Class_TextSegment = requireAssignableTo<TypeOnly<current.TextSegment>, TypeOnly<old.TextSegment>>
8371

8472
/*
@@ -97,7 +85,6 @@ declare type old_as_current_for_Class_TrackingGroup = requireAssignableTo<TypeOn
9785
* typeValidation.broken:
9886
* "Class_TrackingGroup": {"backCompat": false}
9987
*/
100-
// @ts-expect-error compatibility expected to be broken
10188
declare type current_as_old_for_Class_TrackingGroup = requireAssignableTo<TypeOnly<current.TrackingGroup>, TypeOnly<old.TrackingGroup>>
10289

10390
/*
@@ -125,26 +112,15 @@ declare type current_as_old_for_Class_TrackingGroupCollection = requireAssignabl
125112
* typeValidation.broken:
126113
* "ClassStatics_BaseSegment": {"backCompat": false}
127114
*/
128-
// @ts-expect-error compatibility expected to be broken
129115
declare type current_as_old_for_ClassStatics_BaseSegment = requireAssignableTo<TypeOnly<typeof current.BaseSegment>, TypeOnly<typeof old.BaseSegment>>
130116

131-
/*
132-
* Validate backward compatibility by using the current type in place of the old type.
133-
* If this test starts failing, it indicates a change that is not backward compatible.
134-
* To acknowledge the breaking change, add the following to package.json under
135-
* typeValidation.broken:
136-
* "ClassStatics_LocalReferenceCollection": {"backCompat": false}
137-
*/
138-
declare type current_as_old_for_ClassStatics_LocalReferenceCollection = requireAssignableTo<TypeOnly<typeof current.LocalReferenceCollection>, TypeOnly<typeof old.LocalReferenceCollection>>
139-
140117
/*
141118
* Validate backward compatibility by using the current type in place of the old type.
142119
* If this test starts failing, it indicates a change that is not backward compatible.
143120
* To acknowledge the breaking change, add the following to package.json under
144121
* typeValidation.broken:
145122
* "ClassStatics_Marker": {"backCompat": false}
146123
*/
147-
// @ts-expect-error compatibility expected to be broken
148124
declare type current_as_old_for_ClassStatics_Marker = requireAssignableTo<TypeOnly<typeof current.Marker>, TypeOnly<typeof old.Marker>>
149125

150126
/*
@@ -154,7 +130,6 @@ declare type current_as_old_for_ClassStatics_Marker = requireAssignableTo<TypeOn
154130
* typeValidation.broken:
155131
* "ClassStatics_TextSegment": {"backCompat": false}
156132
*/
157-
// @ts-expect-error compatibility expected to be broken
158133
declare type current_as_old_for_ClassStatics_TextSegment = requireAssignableTo<TypeOnly<typeof current.TextSegment>, TypeOnly<typeof old.TextSegment>>
159134

160135
/*
@@ -164,7 +139,6 @@ declare type current_as_old_for_ClassStatics_TextSegment = requireAssignableTo<T
164139
* typeValidation.broken:
165140
* "ClassStatics_TrackingGroup": {"backCompat": false}
166141
*/
167-
// @ts-expect-error compatibility expected to be broken
168142
declare type current_as_old_for_ClassStatics_TrackingGroup = requireAssignableTo<TypeOnly<typeof current.TrackingGroup>, TypeOnly<typeof old.TrackingGroup>>
169143

170144
/*
@@ -401,26 +375,6 @@ declare type old_as_current_for_Interface_IMarkerDef = requireAssignableTo<TypeO
401375
*/
402376
declare type current_as_old_for_Interface_IMarkerDef = requireAssignableTo<TypeOnly<current.IMarkerDef>, TypeOnly<old.IMarkerDef>>
403377

404-
/*
405-
* Validate forward compatibility by using the old type in place of the current type.
406-
* If this test starts failing, it indicates a change that is not forward compatible.
407-
* To acknowledge the breaking change, add the following to package.json under
408-
* typeValidation.broken:
409-
* "Interface_IMergeNodeCommon": {"forwardCompat": false}
410-
*/
411-
// @ts-expect-error compatibility expected to be broken
412-
declare type old_as_current_for_Interface_IMergeNodeCommon = requireAssignableTo<TypeOnly<old.IMergeNodeCommon>, TypeOnly<current.IMergeNodeCommon>>
413-
414-
/*
415-
* Validate backward compatibility by using the current type in place of the old type.
416-
* If this test starts failing, it indicates a change that is not backward compatible.
417-
* To acknowledge the breaking change, add the following to package.json under
418-
* typeValidation.broken:
419-
* "Interface_IMergeNodeCommon": {"backCompat": false}
420-
*/
421-
// @ts-expect-error compatibility expected to be broken
422-
declare type current_as_old_for_Interface_IMergeNodeCommon = requireAssignableTo<TypeOnly<current.IMergeNodeCommon>, TypeOnly<old.IMergeNodeCommon>>
423-
424378
/*
425379
* Validate forward compatibility by using the old type in place of the current type.
426380
* If this test starts failing, it indicates a change that is not forward compatible.
@@ -491,7 +445,6 @@ declare type old_as_current_for_Interface_IMergeTreeDeltaCallbackArgs = requireA
491445
* typeValidation.broken:
492446
* "Interface_IMergeTreeDeltaCallbackArgs": {"backCompat": false}
493447
*/
494-
// @ts-expect-error compatibility expected to be broken
495448
declare type current_as_old_for_Interface_IMergeTreeDeltaCallbackArgs = requireAssignableTo<TypeOnly<current.IMergeTreeDeltaCallbackArgs>, TypeOnly<old.IMergeTreeDeltaCallbackArgs>>
496449

497450
/*
@@ -564,7 +517,6 @@ declare type old_as_current_for_Interface_IMergeTreeMaintenanceCallbackArgs = re
564517
* typeValidation.broken:
565518
* "Interface_IMergeTreeMaintenanceCallbackArgs": {"backCompat": false}
566519
*/
567-
// @ts-expect-error compatibility expected to be broken
568520
declare type current_as_old_for_Interface_IMergeTreeMaintenanceCallbackArgs = requireAssignableTo<TypeOnly<current.IMergeTreeMaintenanceCallbackArgs>, TypeOnly<old.IMergeTreeMaintenanceCallbackArgs>>
569521

570522
/*
@@ -655,29 +607,8 @@ declare type old_as_current_for_Interface_IMergeTreeSegmentDelta = requireAssign
655607
* typeValidation.broken:
656608
* "Interface_IMergeTreeSegmentDelta": {"backCompat": false}
657609
*/
658-
// @ts-expect-error compatibility expected to be broken
659610
declare type current_as_old_for_Interface_IMergeTreeSegmentDelta = requireAssignableTo<TypeOnly<current.IMergeTreeSegmentDelta>, TypeOnly<old.IMergeTreeSegmentDelta>>
660611

661-
/*
662-
* Validate forward compatibility by using the old type in place of the current type.
663-
* If this test starts failing, it indicates a change that is not forward compatible.
664-
* To acknowledge the breaking change, add the following to package.json under
665-
* typeValidation.broken:
666-
* "Interface_IMoveInfo": {"forwardCompat": false}
667-
*/
668-
// @ts-expect-error compatibility expected to be broken
669-
declare type old_as_current_for_Interface_IMoveInfo = requireAssignableTo<TypeOnly<old.IMoveInfo>, TypeOnly<current.IMoveInfo>>
670-
671-
/*
672-
* Validate backward compatibility by using the current type in place of the old type.
673-
* If this test starts failing, it indicates a change that is not backward compatible.
674-
* To acknowledge the breaking change, add the following to package.json under
675-
* typeValidation.broken:
676-
* "Interface_IMoveInfo": {"backCompat": false}
677-
*/
678-
// @ts-expect-error compatibility expected to be broken
679-
declare type current_as_old_for_Interface_IMoveInfo = requireAssignableTo<TypeOnly<current.IMoveInfo>, TypeOnly<old.IMoveInfo>>
680-
681612
/*
682613
* Validate forward compatibility by using the old type in place of the current type.
683614
* If this test starts failing, it indicates a change that is not forward compatible.
@@ -714,26 +645,6 @@ declare type old_as_current_for_Interface_IRelativePosition = requireAssignableT
714645
*/
715646
declare type current_as_old_for_Interface_IRelativePosition = requireAssignableTo<TypeOnly<current.IRelativePosition>, TypeOnly<old.IRelativePosition>>
716647

717-
/*
718-
* Validate forward compatibility by using the old type in place of the current type.
719-
* If this test starts failing, it indicates a change that is not forward compatible.
720-
* To acknowledge the breaking change, add the following to package.json under
721-
* typeValidation.broken:
722-
* "Interface_IRemovalInfo": {"forwardCompat": false}
723-
*/
724-
// @ts-expect-error compatibility expected to be broken
725-
declare type old_as_current_for_Interface_IRemovalInfo = requireAssignableTo<TypeOnly<old.IRemovalInfo>, TypeOnly<current.IRemovalInfo>>
726-
727-
/*
728-
* Validate backward compatibility by using the current type in place of the old type.
729-
* If this test starts failing, it indicates a change that is not backward compatible.
730-
* To acknowledge the breaking change, add the following to package.json under
731-
* typeValidation.broken:
732-
* "Interface_IRemovalInfo": {"backCompat": false}
733-
*/
734-
// @ts-expect-error compatibility expected to be broken
735-
declare type current_as_old_for_Interface_IRemovalInfo = requireAssignableTo<TypeOnly<current.IRemovalInfo>, TypeOnly<old.IRemovalInfo>>
736-
737648
/*
738649
* Validate forward compatibility by using the old type in place of the current type.
739650
* If this test starts failing, it indicates a change that is not forward compatible.
@@ -750,7 +661,6 @@ declare type old_as_current_for_Interface_ISegment = requireAssignableTo<TypeOnl
750661
* typeValidation.broken:
751662
* "Interface_ISegment": {"backCompat": false}
752663
*/
753-
// @ts-expect-error compatibility expected to be broken
754664
declare type current_as_old_for_Interface_ISegment = requireAssignableTo<TypeOnly<current.ISegment>, TypeOnly<old.ISegment>>
755665

756666
/*
@@ -787,7 +697,6 @@ declare type old_as_current_for_Interface_ITrackingGroup = requireAssignableTo<T
787697
* typeValidation.broken:
788698
* "Interface_ITrackingGroup": {"backCompat": false}
789699
*/
790-
// @ts-expect-error compatibility expected to be broken
791700
declare type current_as_old_for_Interface_ITrackingGroup = requireAssignableTo<TypeOnly<current.ITrackingGroup>, TypeOnly<old.ITrackingGroup>>
792701

793702
/*
@@ -977,7 +886,6 @@ declare type old_as_current_for_TypeAlias_MergeTreeDeltaRevertible = requireAssi
977886
* typeValidation.broken:
978887
* "TypeAlias_MergeTreeDeltaRevertible": {"backCompat": false}
979888
*/
980-
// @ts-expect-error compatibility expected to be broken
981889
declare type current_as_old_for_TypeAlias_MergeTreeDeltaRevertible = requireAssignableTo<TypeOnly<current.MergeTreeDeltaRevertible>, TypeOnly<old.MergeTreeDeltaRevertible>>
982890

983891
/*
@@ -1086,7 +994,6 @@ declare type old_as_current_for_TypeAlias_Trackable = requireAssignableTo<TypeOn
1086994
* typeValidation.broken:
1087995
* "TypeAlias_Trackable": {"backCompat": false}
1088996
*/
1089-
// @ts-expect-error compatibility expected to be broken
1090997
declare type current_as_old_for_TypeAlias_Trackable = requireAssignableTo<TypeOnly<current.Trackable>, TypeOnly<old.Trackable>>
1091998

1092999
/*

0 commit comments

Comments
 (0)