@atlaskit/adf-schema 37.1.24 → 37.1.26

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 (69) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  3. package/dist/cjs/next-schema/nodes/blockCard.js +36 -2
  4. package/dist/cjs/next-schema/nodes/heading.js +1 -1
  5. package/dist/cjs/next-schema/nodes/mediaSingle.js +6 -0
  6. package/dist/cjs/next-schema/nodes/nestedExpand.js +2 -0
  7. package/dist/cjs/next-schema/nodes/paragraph.js +1 -1
  8. package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  9. package/dist/es2019/next-schema/nodes/blockCard.js +36 -2
  10. package/dist/es2019/next-schema/nodes/heading.js +1 -1
  11. package/dist/es2019/next-schema/nodes/mediaSingle.js +6 -0
  12. package/dist/es2019/next-schema/nodes/nestedExpand.js +2 -0
  13. package/dist/es2019/next-schema/nodes/paragraph.js +1 -1
  14. package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  15. package/dist/esm/next-schema/nodes/blockCard.js +36 -2
  16. package/dist/esm/next-schema/nodes/heading.js +1 -1
  17. package/dist/esm/next-schema/nodes/mediaSingle.js +6 -0
  18. package/dist/esm/next-schema/nodes/nestedExpand.js +2 -0
  19. package/dist/esm/next-schema/nodes/paragraph.js +1 -1
  20. package/dist/types/next-schema/full-schema.adf.d.ts +2 -12
  21. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +8 -48
  22. package/dist/types/next-schema/nodes/blockCard.d.ts +2 -12
  23. package/dist/types/next-schema/nodes/blockquote.d.ts +2 -12
  24. package/dist/types/next-schema/nodes/bodiedExtension.d.ts +2 -12
  25. package/dist/types/next-schema/nodes/caption.d.ts +2 -12
  26. package/dist/types/next-schema/nodes/codeBlock.d.ts +4 -24
  27. package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +2 -12
  28. package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +2 -12
  29. package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +2 -12
  30. package/dist/types/next-schema/nodes/date.d.ts +2 -12
  31. package/dist/types/next-schema/nodes/decisionItem.d.ts +2 -12
  32. package/dist/types/next-schema/nodes/decisionList.d.ts +2 -12
  33. package/dist/types/next-schema/nodes/embedCard.d.ts +2 -12
  34. package/dist/types/next-schema/nodes/emoji.d.ts +2 -12
  35. package/dist/types/next-schema/nodes/expand.d.ts +2 -12
  36. package/dist/types/next-schema/nodes/extension.d.ts +2 -12
  37. package/dist/types/next-schema/nodes/extensionFrame.d.ts +2 -12
  38. package/dist/types/next-schema/nodes/hardBreak.d.ts +2 -12
  39. package/dist/types/next-schema/nodes/heading.d.ts +4 -24
  40. package/dist/types/next-schema/nodes/image.d.ts +2 -12
  41. package/dist/types/next-schema/nodes/inlineCard.d.ts +2 -12
  42. package/dist/types/next-schema/nodes/inlineExtension.d.ts +2 -12
  43. package/dist/types/next-schema/nodes/layoutColumn.d.ts +2 -12
  44. package/dist/types/next-schema/nodes/layoutSection.d.ts +2 -12
  45. package/dist/types/next-schema/nodes/list.d.ts +4 -24
  46. package/dist/types/next-schema/nodes/media.d.ts +2 -12
  47. package/dist/types/next-schema/nodes/mediaGroup.d.ts +2 -12
  48. package/dist/types/next-schema/nodes/mediaInline.d.ts +2 -12
  49. package/dist/types/next-schema/nodes/mediaSingle.d.ts +2 -12
  50. package/dist/types/next-schema/nodes/mention.d.ts +2 -12
  51. package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +2 -12
  52. package/dist/types/next-schema/nodes/nestedExpand.d.ts +5 -13
  53. package/dist/types/next-schema/nodes/panel.d.ts +2 -12
  54. package/dist/types/next-schema/nodes/paragraph.d.ts +2 -12
  55. package/dist/types/next-schema/nodes/placeholder.d.ts +2 -12
  56. package/dist/types/next-schema/nodes/rule.d.ts +2 -12
  57. package/dist/types/next-schema/nodes/status.d.ts +2 -12
  58. package/dist/types/next-schema/nodes/table.d.ts +2 -12
  59. package/dist/types/next-schema/nodes/tableCell.d.ts +2 -12
  60. package/dist/types/next-schema/nodes/tableCellContent.d.ts +2 -12
  61. package/dist/types/next-schema/nodes/tableHeader.d.ts +2 -12
  62. package/dist/types/next-schema/nodes/tableRow.d.ts +2 -12
  63. package/dist/types/next-schema/nodes/task.d.ts +4 -24
  64. package/dist/types/next-schema/nodes/text.d.ts +2 -12
  65. package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +2 -12
  66. package/dist/types/next-schema/nodes/unsupportedInline.d.ts +2 -12
  67. package/package.json +2 -2
  68. package/schema-generators/__tests__/unit/adfToValidatorSpecValidation.unit.ts +0 -1
  69. package/schema-generators/__tests__/unit/json-full-schema-backwards-compat.unit.ts +29 -11
@@ -24,17 +24,7 @@ export declare const rule: import("@atlaskit/adf-schema-generator/dist/types/adf
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
@@ -24,17 +24,7 @@ export declare const status: import("@atlaskit/adf-schema-generator/dist/types/a
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
@@ -24,17 +24,7 @@ export declare const table: import("@atlaskit/adf-schema-generator/dist/types/ad
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
@@ -24,17 +24,7 @@ export declare const tableCell: import("@atlaskit/adf-schema-generator/dist/type
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
@@ -24,17 +24,7 @@ export declare const tableCellContent: import("@atlaskit/adf-schema-generator/di
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
@@ -24,17 +24,7 @@ export declare const tableHeader: import("@atlaskit/adf-schema-generator/dist/ty
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
@@ -24,17 +24,7 @@ export declare const tableRow: import("@atlaskit/adf-schema-generator/dist/types
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
@@ -24,18 +24,8 @@ export declare const taskItem: import("@atlaskit/adf-schema-generator/dist/types
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
41
31
  export declare const taskList: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], {
@@ -64,17 +54,7 @@ export declare const taskList: import("@atlaskit/adf-schema-generator/dist/types
64
54
  whitespace?: "pre" | "normal";
65
55
  tableRole?: "table" | "row" | "cell" | "header_cell";
66
56
  DANGEROUS_MANUAL_OVERRIDE?: {
67
- 'pm-spec'?: {
68
- [x: string]: {
69
- value: any;
70
- reason: string;
71
- };
72
- };
73
- 'validator-spec'?: {
74
- [x: string]: {
75
- value: any;
76
- reason: string;
77
- };
78
- };
57
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
58
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
79
59
  };
80
60
  }>;
@@ -24,18 +24,8 @@ export declare const text: import("@atlaskit/adf-schema-generator/dist/types/adf
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  } & {
41
31
  marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
@@ -24,17 +24,7 @@ export declare const unsupportedBlock: import("@atlaskit/adf-schema-generator/di
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
@@ -24,17 +24,7 @@ export declare const unsupportedInline: import("@atlaskit/adf-schema-generator/d
24
24
  whitespace?: "pre" | "normal";
25
25
  tableRole?: "table" | "row" | "cell" | "header_cell";
26
26
  DANGEROUS_MANUAL_OVERRIDE?: {
27
- 'pm-spec'?: {
28
- [x: string]: {
29
- value: any;
30
- reason: string;
31
- };
32
- };
33
- 'validator-spec'?: {
34
- [x: string]: {
35
- value: any;
36
- reason: string;
37
- };
38
- };
27
+ 'pm-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
28
+ 'validator-spec'?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").DangerousManualOverride;
39
29
  };
40
30
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "37.1.24",
3
+ "version": "37.1.26",
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/"
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@atlassian/adf-schema-json": "^1.16.0",
50
- "@atlaskit/adf-schema-generator": "^1.25.3",
50
+ "@atlaskit/adf-schema-generator": "^1.25.5",
51
51
  "@atlaskit/adf-utils": "^19.2.2",
52
52
  "@atlaskit/codemod-utils": "^4.2.4",
53
53
  "@atlaskit/json-schema-generator": "^3.3.9",
@@ -4,7 +4,6 @@ import adfNode from '../../../src/next-schema/full-schema.adf';
4
4
 
5
5
  const newSpecs = sortNestedArrays(adfToValidatorSpec(adfNode));
6
6
  const SKIP_LIST = [
7
- 'blockCard', // doesn't match existing spec
8
7
  'caption', // doesn't match existing spec
9
8
  'codeBlock', // doesn't match existing spec
10
9
  'doc', // doesn't match existing spec, need to flatten groups
@@ -37,25 +37,43 @@ expect.extend({
37
37
  },
38
38
  });
39
39
 
40
+ test('ADF DSL to JSON Schema backwards compatibility for full schema', () => {
41
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
42
+ const currentSchema = require('../../../json-schema/v1/full.json');
43
+ const nextSchema = adfToJSON(adfNode);
44
+ expect(nextSchema).toBeBackwardsCompatibleWith(currentSchema);
45
+ });
46
+
40
47
  // The end goal is to be able to remove all transformation for known failures
41
48
  function transformFullFixtureForKnownFailures(json) {
42
49
  const definitions = json.definitions;
43
50
 
44
- delete definitions.nestedExpand_content;
45
- delete definitions.nestedExpand_node;
46
- delete definitions.nestedExpand_with_no_marks_node;
51
+ delete definitions.doc_node;
52
+ delete definitions.blockRootOnly_node;
53
+ delete definitions.extensionFrame_node;
54
+ delete definitions.block_content;
55
+ delete definitions.non_nestable_block_content;
56
+ delete definitions.table_row_node;
57
+ delete definitions.table_cell_content;
58
+ delete definitions.mediaGroup_node;
59
+ delete definitions.inline_node;
60
+ delete definitions.mediaInline_node;
61
+ delete definitions.mediaSingle_width_type_node;
62
+ delete definitions.status_node;
63
+ delete definitions.date_node;
64
+ delete definitions.emoji_node;
65
+ delete definitions.mention_node;
66
+ delete definitions.codeBlock_with_marks_node;
67
+ delete definitions.codeBlock_node;
47
68
 
48
69
  return json;
49
70
  }
50
71
 
51
- test('ADF DSL to JSON Schema backwards compatibility for full schema', () => {
52
- const currentSchema = transformFullFixtureForKnownFailures(
53
- // eslint-disable-next-line @typescript-eslint/no-var-requires
54
- require('../../../json-schema/v1/full.json'),
55
- );
56
- const nextSchema = adfToJSON(adfNode);
57
-
58
- expect(nextSchema).toBeBackwardsCompatibleWith(currentSchema);
72
+ test('JSON Schema to ADF DSL backwards compatibility for full schema', () => {
73
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
74
+ const currentSchema = require('../../../json-schema/v1/full.json');
75
+ const nextSchema = transformFullFixtureForKnownFailures(adfToJSON(adfNode));
76
+ expect(currentSchema).toBeBackwardsCompatibleWith(nextSchema);
59
77
  });
60
78
 
61
79
  const DEFINITIONS_TO_SKIP_STAGE_0 = [