@atlaskit/adf-schema 36.10.4 → 36.10.5

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,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 36.10.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 1b75a44: Add items field to JSON Schema transformer from ADF DSL
8
+
3
9
  ## 36.10.4
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "36.10.4",
3
+ "version": "36.10.5",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@atlassian/adf-schema-json": "^1.15.0",
48
- "@atlaskit/adf-schema-generator": "^1.7.9",
48
+ "@atlaskit/adf-schema-generator": "^1.7.10",
49
49
  "@babel/cli": "^7.22.9",
50
50
  "@babel/core": "^7.22.9",
51
51
  "@babel/plugin-proposal-class-properties": "^7.18.6",
@@ -101,3 +101,16 @@ A number of nodes have `marks` defined, yet the array is empty. Assuming this is
101
101
  .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
102
102
  .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
103
103
  ```
104
+
105
+ Delete all subfields except for content, text, marks, attrs, anyOf, items, type and properties. Base level content objects (not nodes) are also deleted. `inline` is also deleted, as it is a content object for paragraph.
106
+
107
+ All fields of content except for type and items have been deleted as well.
108
+
109
+ A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
110
+
111
+ ```sh
112
+ cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
113
+ .version, .required, .additionalProperties, .allOf, .minItems, .content.items.anyOf?, .content.items."$ref"?, .content.items[]?, .content."$ref",
114
+ .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
115
+ .bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
116
+ ```
@@ -48,6 +48,7 @@ const jsonWithTypes = {
48
48
  },
49
49
  content: {
50
50
  type: 'array',
51
+ items: {},
51
52
  },
52
53
  attrs: {
53
54
  type: 'object',
@@ -682,6 +683,7 @@ const jsonWithTypes = {
682
683
  },
683
684
  content: {
684
685
  type: 'array',
686
+ items: {},
685
687
  },
686
688
  },
687
689
  },
@@ -696,6 +698,7 @@ const jsonWithTypes = {
696
698
  },
697
699
  content: {
698
700
  type: 'array',
701
+ items: {},
699
702
  },
700
703
  },
701
704
  },
@@ -774,6 +777,7 @@ const jsonWithTypes = {
774
777
  },
775
778
  content: {
776
779
  type: 'array',
780
+ items: {},
777
781
  },
778
782
  attrs: {
779
783
  type: 'object',
@@ -796,6 +800,7 @@ const jsonWithTypes = {
796
800
  },
797
801
  content: {
798
802
  type: 'array',
803
+ items: [],
799
804
  },
800
805
  attrs: {
801
806
  type: 'object',
@@ -815,6 +820,7 @@ const jsonWithTypes = {
815
820
  },
816
821
  content: {
817
822
  type: 'array',
823
+ items: [],
818
824
  },
819
825
  },
820
826
  },
@@ -826,6 +832,7 @@ const jsonWithTypes = {
826
832
  },
827
833
  content: {
828
834
  type: 'array',
835
+ items: {},
829
836
  },
830
837
  },
831
838
  },
@@ -837,6 +844,7 @@ const jsonWithTypes = {
837
844
  },
838
845
  content: {
839
846
  type: 'array',
847
+ items: {},
840
848
  },
841
849
  attrs: {
842
850
  type: 'object',
@@ -857,6 +865,7 @@ const jsonWithTypes = {
857
865
  },
858
866
  content: {
859
867
  type: 'array',
868
+ items: {},
860
869
  },
861
870
  attrs: {
862
871
  type: 'object',
@@ -881,6 +890,7 @@ const jsonWithTypes = {
881
890
  },
882
891
  content: {
883
892
  type: 'array',
893
+ items: {},
884
894
  },
885
895
  },
886
896
  },
@@ -892,6 +902,7 @@ const jsonWithTypes = {
892
902
  },
893
903
  content: {
894
904
  type: 'array',
905
+ items: {},
895
906
  },
896
907
  attrs: {
897
908
  type: 'object',
@@ -914,6 +925,7 @@ const jsonWithTypes = {
914
925
  },
915
926
  content: {
916
927
  type: 'array',
928
+ items: {},
917
929
  },
918
930
  attrs: {
919
931
  type: 'object',
@@ -969,6 +981,7 @@ const jsonWithTypes = {
969
981
  },
970
982
  content: {
971
983
  type: 'array',
984
+ items: {},
972
985
  },
973
986
  },
974
987
  },
@@ -980,6 +993,7 @@ const jsonWithTypes = {
980
993
  },
981
994
  content: {
982
995
  type: 'array',
996
+ items: {},
983
997
  },
984
998
  },
985
999
  },
@@ -1108,6 +1122,7 @@ const jsonWithTypes = {
1108
1122
  },
1109
1123
  content: {
1110
1124
  type: 'array',
1125
+ items: {},
1111
1126
  },
1112
1127
  marks: {
1113
1128
  type: 'array',
@@ -1125,6 +1140,7 @@ const jsonWithTypes = {
1125
1140
  },
1126
1141
  content: {
1127
1142
  type: 'array',
1143
+ items: {},
1128
1144
  },
1129
1145
  },
1130
1146
  },
@@ -1202,6 +1218,7 @@ const jsonWithTypes = {
1202
1218
  },
1203
1219
  content: {
1204
1220
  type: 'array',
1221
+ items: {},
1205
1222
  },
1206
1223
  },
1207
1224
  },
@@ -1239,6 +1256,7 @@ const jsonWithTypes = {
1239
1256
  },
1240
1257
  content: {
1241
1258
  type: 'array',
1259
+ items: {},
1242
1260
  },
1243
1261
  },
1244
1262
  },
@@ -1261,6 +1279,7 @@ const jsonWithTypes = {
1261
1279
  },
1262
1280
  content: {
1263
1281
  type: 'array',
1282
+ items: {},
1264
1283
  },
1265
1284
  },
1266
1285
  },
@@ -1278,6 +1297,7 @@ const jsonWithTypes = {
1278
1297
  },
1279
1298
  content: {
1280
1299
  type: 'array',
1300
+ items: {},
1281
1301
  },
1282
1302
  },
1283
1303
  },
@@ -1290,6 +1310,7 @@ const jsonWithTypes = {
1290
1310
  },
1291
1311
  content: {
1292
1312
  type: 'array',
1313
+ items: {},
1293
1314
  },
1294
1315
  },
1295
1316
  },
@@ -1297,13 +1318,19 @@ const jsonWithTypes = {
1297
1318
  };
1298
1319
 
1299
1320
  // New JSON, different to the old JSON schema
1300
- jsonWithTypes.definitions.heading_node.properties.content = { type: 'array' };
1321
+ jsonWithTypes.definitions.heading_node.properties.content = {
1322
+ type: 'array',
1323
+ items: {},
1324
+ };
1301
1325
  jsonWithTypes.definitions.nestedExpand_node.properties.content = {
1302
1326
  type: 'array',
1327
+ items: {},
1303
1328
  };
1304
1329
  jsonWithTypes.definitions.table_cell_node.properties.content = {
1305
1330
  type: 'array',
1331
+ items: {},
1306
1332
  };
1307
1333
  jsonWithTypes.definitions.table_header_node.properties.content = {
1308
1334
  type: 'array',
1335
+ items: {},
1309
1336
  };