@atlaskit/adf-schema 42.0.1 → 42.1.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 +12 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +1 -24
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/panel.js +0 -3
- package/dist/cjs/validator-schema/generated/validatorSpec.js +1 -11
- package/dist/es2019/next-schema/generated/nodeTypes.js +0 -23
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/panel.js +0 -3
- package/dist/es2019/validator-schema/generated/validatorSpec.js +0 -10
- package/dist/esm/next-schema/generated/nodeTypes.js +0 -23
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/nodes/panel.js +0 -3
- package/dist/esm/validator-schema/generated/validatorSpec.js +0 -10
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +0 -14
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +1 -4
- package/dist/types/next-schema/nodes/panel.d.ts +1 -4
- package/dist/types/schema/nodes/types/inline-content.d.ts +10 -1
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +0 -10
- package/eslint-plugin-warn-schema.js +3 -0
- package/eslint.config.js +19 -0
- package/package.json +1 -1
- package/warn-schema-change.js +152 -0
- package/warn-schema-change.test.js +42 -0
package/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelWithNestedBlockquoteStage0 = exports.
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelWithNestedBlockquoteStage0 = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemWithNestedDecisionStage0 = exports.listItemLegacy = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandWithoutNestedExpand = exports.expandWithNoMark = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockWithNoMarks = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteWithoutNestedCodeblockOrMedia = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
|
7
7
|
var _createPMSpecFactory = require("../../schema/createPMSpecFactory");
|
8
8
|
/**
|
9
9
|
* This file was automatically generated by @atlaskit/adf-schema-generator
|
@@ -891,29 +891,6 @@ var panel = exports.panel = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
891
891
|
},
|
892
892
|
selectable: true
|
893
893
|
});
|
894
|
-
var panelLegacy = exports.panelLegacy = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
895
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | unsupportedBlock)+',
|
896
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
897
|
-
group: 'block',
|
898
|
-
attrs: {
|
899
|
-
panelType: {
|
900
|
-
default: 'info'
|
901
|
-
},
|
902
|
-
panelIcon: {
|
903
|
-
default: null
|
904
|
-
},
|
905
|
-
panelIconId: {
|
906
|
-
default: null
|
907
|
-
},
|
908
|
-
panelIconText: {
|
909
|
-
default: null
|
910
|
-
},
|
911
|
-
panelColor: {
|
912
|
-
default: null
|
913
|
-
}
|
914
|
-
},
|
915
|
-
selectable: true
|
916
|
-
});
|
917
894
|
var panelWithNestedBlockquoteStage0 = exports.panelWithNestedBlockquoteStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
918
895
|
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | blockquote)+',
|
919
896
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
@@ -24,7 +24,7 @@ var _rule = require("../nodes/rule");
|
|
24
24
|
var _table = require("../nodes/table");
|
25
25
|
var _task = require("../nodes/task");
|
26
26
|
var _unsupportedBlock = require("../nodes/unsupportedBlock");
|
27
|
-
var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_marks'), _codeBlock.codeBlock.use('with_no_marks'), _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _blockquote.blockquote.use('without_nested_codeblock_or_media'), _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _extension.extension.use('with_marks'), _heading.heading, _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _panel.panel.use('
|
27
|
+
var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_marks'), _codeBlock.codeBlock.use('with_no_marks'), _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _blockquote.blockquote.use('without_nested_codeblock_or_media'), _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _extension.extension.use('with_marks'), _heading.heading, _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _panel.panel.use('with_nested_blockquote'), _table.table, _bodiedExtension.bodiedExtension, _bodiedExtension.bodiedExtension.use('with_marks'), _expand.expand, _expand.expand.use('with_no_mark'), _expand.expand.use('with_breakout_mark'), _expand.expand.use('without_nested_expand'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
|
28
28
|
// @DSLCompatibilityException
|
29
29
|
// Block group in PM doesn't match ADF
|
30
30
|
ignore: ['validator-spec']
|
@@ -50,9 +50,6 @@ var panel = exports.panel = (0, _adfSchemaGenerator.adfNode)('panel').define({
|
|
50
50
|
}
|
51
51
|
},
|
52
52
|
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock.use('with_no_marks'), _task.taskList, _rule.rule, _decisionList.decisionList, _unsupportedBlock.unsupportedBlock))]
|
53
|
-
}).variant('legacy', {
|
54
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _unsupportedBlock.unsupportedBlock))],
|
55
|
-
ignore: ['json-schema', 'validator-spec']
|
56
53
|
}).variant('with_nested_blockquote', {
|
57
54
|
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock.use('with_no_marks'), _task.taskList, _rule.rule, _decisionList.decisionList, _unsupportedBlock.unsupportedBlock, _blockquote.blockquote))],
|
58
55
|
noExtend: true,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.underline = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCellContent = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel_with_nested_blockquote = exports.
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.underline = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCellContent = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel_with_nested_blockquote = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_nested_decision = exports.listItem_legacy = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.image = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_without_nested_expand = exports.expand_with_no_mark = exports.expand_with_breakout_mark = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.confluenceInlineComment = exports.codeBlock_with_no_marks = exports.codeBlock_with_marks = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote_without_nested_codeblock_or_media = exports.blockquote_legacy = exports.blockquote = exports.block_content = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
|
7
7
|
var blockCard = exports.blockCard = {
|
8
8
|
props: {
|
9
9
|
type: {
|
@@ -1345,16 +1345,6 @@ var panel = exports.panel = {
|
|
1345
1345
|
}
|
1346
1346
|
}
|
1347
1347
|
};
|
1348
|
-
var panel_legacy = exports.panel_legacy = ['panel', {
|
1349
|
-
props: {
|
1350
|
-
content: {
|
1351
|
-
type: 'array',
|
1352
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard']],
|
1353
|
-
minItems: 1,
|
1354
|
-
allowUnsupportedBlock: true
|
1355
|
-
}
|
1356
|
-
}
|
1357
|
-
}];
|
1358
1348
|
var panel_with_nested_blockquote = exports.panel_with_nested_blockquote = ['panel', {
|
1359
1349
|
props: {
|
1360
1350
|
content: {
|
@@ -885,29 +885,6 @@ export const panel = createPMNodeSpecFactory({
|
|
885
885
|
},
|
886
886
|
selectable: true
|
887
887
|
});
|
888
|
-
export const panelLegacy = createPMNodeSpecFactory({
|
889
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | unsupportedBlock)+',
|
890
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
891
|
-
group: 'block',
|
892
|
-
attrs: {
|
893
|
-
panelType: {
|
894
|
-
default: 'info'
|
895
|
-
},
|
896
|
-
panelIcon: {
|
897
|
-
default: null
|
898
|
-
},
|
899
|
-
panelIconId: {
|
900
|
-
default: null
|
901
|
-
},
|
902
|
-
panelIconText: {
|
903
|
-
default: null
|
904
|
-
},
|
905
|
-
panelColor: {
|
906
|
-
default: null
|
907
|
-
}
|
908
|
-
},
|
909
|
-
selectable: true
|
910
|
-
});
|
911
888
|
export const panelWithNestedBlockquoteStage0 = createPMNodeSpecFactory({
|
912
889
|
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | blockquote)+',
|
913
890
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
@@ -18,7 +18,7 @@ import { rule } from '../nodes/rule';
|
|
18
18
|
import { table } from '../nodes/table';
|
19
19
|
import { taskList } from '../nodes/task';
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
21
|
-
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('
|
21
|
+
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('with_nested_blockquote'), table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_no_mark'), expand.use('with_breakout_mark'), expand.use('without_nested_expand'), confluenceUnsupportedBlock, unsupportedBlock], {
|
22
22
|
// @DSLCompatibilityException
|
23
23
|
// Block group in PM doesn't match ADF
|
24
24
|
ignore: ['validator-spec']
|
@@ -44,9 +44,6 @@ export const panel = adfNode('panel').define({
|
|
44
44
|
}
|
45
45
|
},
|
46
46
|
content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, rule, decisionList, unsupportedBlock))]
|
47
|
-
}).variant('legacy', {
|
48
|
-
content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, unsupportedBlock))],
|
49
|
-
ignore: ['json-schema', 'validator-spec']
|
50
47
|
}).variant('with_nested_blockquote', {
|
51
48
|
content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, rule, decisionList, unsupportedBlock, blockquote))],
|
52
49
|
noExtend: true,
|
@@ -1339,16 +1339,6 @@ export const panel = {
|
|
1339
1339
|
}
|
1340
1340
|
}
|
1341
1341
|
};
|
1342
|
-
export const panel_legacy = ['panel', {
|
1343
|
-
props: {
|
1344
|
-
content: {
|
1345
|
-
type: 'array',
|
1346
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard']],
|
1347
|
-
minItems: 1,
|
1348
|
-
allowUnsupportedBlock: true
|
1349
|
-
}
|
1350
|
-
}
|
1351
|
-
}];
|
1352
1342
|
export const panel_with_nested_blockquote = ['panel', {
|
1353
1343
|
props: {
|
1354
1344
|
content: {
|
@@ -885,29 +885,6 @@ export var panel = createPMNodeSpecFactory({
|
|
885
885
|
},
|
886
886
|
selectable: true
|
887
887
|
});
|
888
|
-
export var panelLegacy = createPMNodeSpecFactory({
|
889
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | unsupportedBlock)+',
|
890
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
891
|
-
group: 'block',
|
892
|
-
attrs: {
|
893
|
-
panelType: {
|
894
|
-
default: 'info'
|
895
|
-
},
|
896
|
-
panelIcon: {
|
897
|
-
default: null
|
898
|
-
},
|
899
|
-
panelIconId: {
|
900
|
-
default: null
|
901
|
-
},
|
902
|
-
panelIconText: {
|
903
|
-
default: null
|
904
|
-
},
|
905
|
-
panelColor: {
|
906
|
-
default: null
|
907
|
-
}
|
908
|
-
},
|
909
|
-
selectable: true
|
910
|
-
});
|
911
888
|
export var panelWithNestedBlockquoteStage0 = createPMNodeSpecFactory({
|
912
889
|
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | blockquote)+',
|
913
890
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
@@ -18,7 +18,7 @@ import { rule } from '../nodes/rule';
|
|
18
18
|
import { table } from '../nodes/table';
|
19
19
|
import { taskList } from '../nodes/task';
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
21
|
-
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('
|
21
|
+
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('with_nested_blockquote'), table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_no_mark'), expand.use('with_breakout_mark'), expand.use('without_nested_expand'), confluenceUnsupportedBlock, unsupportedBlock], {
|
22
22
|
// @DSLCompatibilityException
|
23
23
|
// Block group in PM doesn't match ADF
|
24
24
|
ignore: ['validator-spec']
|
@@ -44,9 +44,6 @@ export var panel = adfNode('panel').define({
|
|
44
44
|
}
|
45
45
|
},
|
46
46
|
content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, rule, decisionList, unsupportedBlock))]
|
47
|
-
}).variant('legacy', {
|
48
|
-
content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, unsupportedBlock))],
|
49
|
-
ignore: ['json-schema', 'validator-spec']
|
50
47
|
}).variant('with_nested_blockquote', {
|
51
48
|
content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, rule, decisionList, unsupportedBlock, blockquote))],
|
52
49
|
noExtend: true,
|
@@ -1339,16 +1339,6 @@ export var panel = {
|
|
1339
1339
|
}
|
1340
1340
|
}
|
1341
1341
|
};
|
1342
|
-
export var panel_legacy = ['panel', {
|
1343
|
-
props: {
|
1344
|
-
content: {
|
1345
|
-
type: 'array',
|
1346
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard']],
|
1347
|
-
minItems: 1,
|
1348
|
-
allowUnsupportedBlock: true
|
1349
|
-
}
|
1350
|
-
}
|
1351
|
-
}];
|
1352
1342
|
export var panel_with_nested_blockquote = ['panel', {
|
1353
1343
|
props: {
|
1354
1344
|
content: {
|
@@ -3,8 +3,8 @@
|
|
3
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source files in "packages/adf-schema/src/next-schema" ,
|
4
4
|
* and run "yarn workspace @atlaskit/adf-schema build:schema:all" to regenerate this file.
|
5
5
|
*/
|
6
|
-
import type { BlockCardDefinition, BlockquoteDefinition, BlockquoteLegacyDefinition, BlockquoteWithoutNestedCodeblockOrMediaDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CodeBlockDefinition, CodeBlockWithNoMarksDefinition, ConfluenceJiraIssueDefinition, ConfluenceUnsupportedBlockDefinition, ConfluenceUnsupportedInlineDefinition, DateDefinition, DateStage0Definition, DecisionListDefinition, EmbedCardDefinition, EmojiDefinition, EmojiStage0Definition, ExpandDefinition, ExpandWithNoMarkDefinition, ExpandWithoutNestedExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, HardBreakDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithNoMarksDefinition, ImageDefinition, InlineCardDefinition, InlineCardStage0Definition, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, MediaGroupDefinition, MediaInlineDefinition, MediaSingleCaptionDefinition, MediaSingleDefinition, MediaSingleFullDefinition, MediaSingleWidthTypeDefinition, MentionDefinition, MentionStage0Definition, MultiBodiedExtensionStage0Definition, OrderedListDefinition, PanelDefinition,
|
7
|
-
export type BlockDefinition = Array<BlockCardDefinition | CodeBlockDefinition | CodeBlockWithNoMarksDefinition | MediaSingleDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleWidthTypeDefinition | ParagraphDefinition | ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | OrderedListDefinition | BulletListDefinition | BlockquoteDefinition | BlockquoteLegacyDefinition | BlockquoteWithoutNestedCodeblockOrMediaDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | ExtensionWithMarksDefinition | HeadingDefinition | HeadingWithIndentationDefinition | HeadingWithNoMarksDefinition | HeadingWithAlignmentDefinition | MediaGroupDefinition | RuleDefinition | PanelDefinition |
|
6
|
+
import type { BlockCardDefinition, BlockquoteDefinition, BlockquoteLegacyDefinition, BlockquoteWithoutNestedCodeblockOrMediaDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CodeBlockDefinition, CodeBlockWithNoMarksDefinition, ConfluenceJiraIssueDefinition, ConfluenceUnsupportedBlockDefinition, ConfluenceUnsupportedInlineDefinition, DateDefinition, DateStage0Definition, DecisionListDefinition, EmbedCardDefinition, EmojiDefinition, EmojiStage0Definition, ExpandDefinition, ExpandWithNoMarkDefinition, ExpandWithoutNestedExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, HardBreakDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithNoMarksDefinition, ImageDefinition, InlineCardDefinition, InlineCardStage0Definition, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, MediaGroupDefinition, MediaInlineDefinition, MediaSingleCaptionDefinition, MediaSingleDefinition, MediaSingleFullDefinition, MediaSingleWidthTypeDefinition, MentionDefinition, MentionStage0Definition, MultiBodiedExtensionStage0Definition, OrderedListDefinition, PanelDefinition, PanelWithNestedBlockquoteStage0Definition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithNoMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StatusStage0Definition, TableDefinition, TaskListDefinition, TextCodeInlineDefinition, TextDefinition, TextFormattedDefinition, UnsupportedBlockDefinition, UnsupportedInlineDefinition } from './nodeTypes';
|
7
|
+
export type BlockDefinition = Array<BlockCardDefinition | CodeBlockDefinition | CodeBlockWithNoMarksDefinition | MediaSingleDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleWidthTypeDefinition | ParagraphDefinition | ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | OrderedListDefinition | BulletListDefinition | BlockquoteDefinition | BlockquoteLegacyDefinition | BlockquoteWithoutNestedCodeblockOrMediaDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | ExtensionWithMarksDefinition | HeadingDefinition | HeadingWithIndentationDefinition | HeadingWithNoMarksDefinition | HeadingWithAlignmentDefinition | MediaGroupDefinition | RuleDefinition | PanelDefinition | PanelWithNestedBlockquoteStage0Definition | TableDefinition | BodiedExtensionDefinition | BodiedExtensionWithMarksDefinition | ExpandDefinition | ExpandWithNoMarkDefinition | ExpandWithoutNestedExpandDefinition | ConfluenceUnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
8
8
|
export type BlockRootOnlyDefinition = Array<MultiBodiedExtensionStage0Definition>;
|
9
9
|
export type InlineDefinition = Array<TextDefinition | TextFormattedDefinition | TextCodeInlineDefinition | DateDefinition | DateStage0Definition | EmojiDefinition | EmojiStage0Definition | HardBreakDefinition | InlineCardDefinition | InlineCardStage0Definition | MentionDefinition | MentionStage0Definition | PlaceholderDefinition | StatusDefinition | StatusStage0Definition | InlineExtensionDefinition | InlineExtensionWithMarksDefinition | MediaInlineDefinition | ImageDefinition | ConfluenceJiraIssueDefinition | ConfluenceUnsupportedInlineDefinition | UnsupportedInlineDefinition>;
|
10
10
|
export type NonNestableBlockContentDefinition = Array<ParagraphWithNoMarksDefinition | PanelDefinition | BlockquoteDefinition | OrderedListDefinition | BulletListDefinition | RuleDefinition | HeadingWithNoMarksDefinition | CodeBlockWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | DecisionListDefinition | TaskListDefinition | TableDefinition | BlockCardDefinition | EmbedCardDefinition | ExtensionWithMarksDefinition | UnsupportedBlockDefinition>;
|
@@ -659,20 +659,6 @@ export interface PanelDefinition {
|
|
659
659
|
}
|
660
660
|
export type PanelNode = PMNode & PanelDefinition;
|
661
661
|
export declare const panel: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<PanelNode>) => import("prosemirror-model").NodeSpec;
|
662
|
-
export interface PanelLegacyDefinition {
|
663
|
-
type: 'panel';
|
664
|
-
content: Array<BlockCardDefinition | BulletListDefinition | HeadingWithNoMarksDefinition | OrderedListDefinition | ParagraphWithNoMarksDefinition | UnsupportedBlockDefinition>;
|
665
|
-
marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
666
|
-
attrs: {
|
667
|
-
panelType: 'info' | 'note' | 'tip' | 'warning' | 'error' | 'success' | 'custom';
|
668
|
-
panelIcon?: string;
|
669
|
-
panelIconId?: string;
|
670
|
-
panelIconText?: string;
|
671
|
-
panelColor?: string;
|
672
|
-
};
|
673
|
-
}
|
674
|
-
export type PanelLegacyNode = PMNode & PanelLegacyDefinition;
|
675
|
-
export declare const panelLegacy: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<PanelLegacyNode>) => import("prosemirror-model").NodeSpec;
|
676
662
|
export interface PanelWithNestedBlockquoteStage0Definition {
|
677
663
|
type: 'panel';
|
678
664
|
content: Array<BlockCardDefinition | BlockquoteDefinition | BulletListDefinition | CodeBlockWithNoMarksDefinition | DecisionListDefinition | HeadingWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithNoMarksDefinition | RuleDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
|
@@ -55,10 +55,7 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
|
|
55
55
|
} & {
|
56
56
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
|
57
57
|
ignore: ("json-schema" | "validator-spec")[];
|
58
|
-
}> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "
|
59
|
-
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
|
60
|
-
ignore: ("json-schema" | "validator-spec")[];
|
61
|
-
} & {
|
58
|
+
}> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_nested_blockquote"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
|
62
59
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
|
63
60
|
noExtend: true;
|
64
61
|
stage0: true;
|
@@ -1,7 +1,4 @@
|
|
1
|
-
export declare const panel: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "
|
2
|
-
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
|
3
|
-
ignore: ("json-schema" | "validator-spec")[];
|
4
|
-
} & {
|
1
|
+
export declare const panel: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_nested_blockquote"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
|
5
2
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
|
6
3
|
noExtend: true;
|
7
4
|
stage0: true;
|
@@ -1,3 +1,12 @@
|
|
1
|
+
import { DateDefinition as Date } from '../date';
|
2
|
+
import { EmojiDefinition as Emoji } from '../emoji';
|
3
|
+
import { HardBreakDefinition as HardBreak } from '../hard-break';
|
4
|
+
import { InlineCardDefinition as InlineCard } from '../inline-card';
|
5
|
+
import { InlineExtensionDefinition } from '../inline-extension';
|
6
|
+
import { MediaInlineDefinition } from '../media-inline';
|
7
|
+
import { MentionDefinition as Mention } from '../mention';
|
8
|
+
import { PlaceholderDefinition as Placeholder } from '../placeholder';
|
9
|
+
import { StatusDefinition as Status } from '../status';
|
1
10
|
import { TextDefinition as Text } from '../text';
|
2
11
|
import { MarksObject } from './mark';
|
3
12
|
import { AnnotationMarkDefinition as Annotation, CodeDefinition as Code, EmDefinition as Em, LinkDefinition as Link, StrikeDefinition as Strike, StrongDefinition as Strong, SubSupDefinition as SubSup, TextColorDefinition as TextColor, UnderlineDefinition as Underline, BackgroundColorDefinition as BackgroundColor } from '../../marks';
|
@@ -16,4 +25,4 @@ export type InlineCode = Text & MarksObject<Code | Link | Annotation>;
|
|
16
25
|
/**
|
17
26
|
* @name inline_node
|
18
27
|
*/
|
19
|
-
export type Inline = InlineFormattedText | InlineCode;
|
28
|
+
export type Inline = InlineFormattedText | InlineCode | HardBreak | Mention | Emoji | InlineExtensionDefinition | Date | Placeholder | InlineCard | Status | MediaInlineDefinition;
|
@@ -1358,16 +1358,6 @@ export declare const panel: {
|
|
1358
1358
|
};
|
1359
1359
|
};
|
1360
1360
|
};
|
1361
|
-
export declare const panel_legacy: (string | {
|
1362
|
-
props: {
|
1363
|
-
content: {
|
1364
|
-
type: string;
|
1365
|
-
items: string[][];
|
1366
|
-
minItems: number;
|
1367
|
-
allowUnsupportedBlock: boolean;
|
1368
|
-
};
|
1369
|
-
};
|
1370
|
-
})[];
|
1371
1361
|
export declare const panel_with_nested_blockquote: (string | {
|
1372
1362
|
props: {
|
1373
1363
|
content: {
|
package/eslint.config.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
// Import the ESLint plugin locally
|
4
|
+
const warnSchemaEslintPlugin = require('./eslint-plugin-warn-schema');
|
5
|
+
const tsParser = require('@typescript-eslint/parser');
|
6
|
+
|
7
|
+
module.exports = [
|
8
|
+
{
|
9
|
+
files: ['**/*.ts'],
|
10
|
+
languageOptions: {
|
11
|
+
parser: tsParser,
|
12
|
+
},
|
13
|
+
// Using the eslint-plugin-example plugin defined locally
|
14
|
+
plugins: { warnSchemaPlugin: warnSchemaEslintPlugin },
|
15
|
+
rules: {
|
16
|
+
'warnSchemaPlugin/warn-schema-change': 'warn',
|
17
|
+
},
|
18
|
+
},
|
19
|
+
];
|
package/package.json
CHANGED
@@ -0,0 +1,152 @@
|
|
1
|
+
module.exports = {
|
2
|
+
meta: {
|
3
|
+
type: 'suggestion',
|
4
|
+
docs: {
|
5
|
+
description:
|
6
|
+
'Warn that changes to next-schema or schema should be reflected in the other.',
|
7
|
+
},
|
8
|
+
schema: [],
|
9
|
+
},
|
10
|
+
create(context) {
|
11
|
+
const filename = context.filename;
|
12
|
+
const nextSchemaFilesPattern =
|
13
|
+
/.*\/adf-schema\/packages\/adf-schema\/src\/next-schema\/.*/;
|
14
|
+
const schemaFilesPattern =
|
15
|
+
/.*\/adf-schema\/packages\/adf-schema\/src\/schema\/.*/;
|
16
|
+
|
17
|
+
const isInSchemaOrNextSchema =
|
18
|
+
filename.match(nextSchemaFilesPattern) ||
|
19
|
+
filename.match(schemaFilesPattern);
|
20
|
+
|
21
|
+
const findDefine = (node) => {
|
22
|
+
const callExpression = node;
|
23
|
+
const memberExpression = callExpression.callee;
|
24
|
+
const property = memberExpression.property;
|
25
|
+
if (
|
26
|
+
property &&
|
27
|
+
property?.type === 'Identifier' &&
|
28
|
+
property?.name === 'define'
|
29
|
+
) {
|
30
|
+
return callExpression;
|
31
|
+
}
|
32
|
+
if (
|
33
|
+
memberExpression &&
|
34
|
+
memberExpression?.object?.type === 'CallExpression'
|
35
|
+
) {
|
36
|
+
return findDefine(memberExpression.object);
|
37
|
+
}
|
38
|
+
};
|
39
|
+
|
40
|
+
const reportInSchema = (objectExpression) => {
|
41
|
+
if (!objectExpression) {
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
|
45
|
+
const parseDOMProp = objectExpression?.properties?.find(
|
46
|
+
(p) => p?.key?.type === 'Identifier' && p?.key?.name === 'parseDOM',
|
47
|
+
);
|
48
|
+
|
49
|
+
const toDOMProp = objectExpression?.properties?.find(
|
50
|
+
(p) => p?.key?.type === 'Identifier' && p?.key?.name === 'toDOM',
|
51
|
+
);
|
52
|
+
|
53
|
+
if (parseDOMProp) {
|
54
|
+
context.report({
|
55
|
+
node: parseDOMProp.key,
|
56
|
+
message:
|
57
|
+
'Changes to next-schema or schema should be reflected in the other.',
|
58
|
+
});
|
59
|
+
}
|
60
|
+
|
61
|
+
if (toDOMProp) {
|
62
|
+
context.report({
|
63
|
+
node: toDOMProp.key,
|
64
|
+
message:
|
65
|
+
'Changes to next-schema or schema should be reflected in the other.',
|
66
|
+
});
|
67
|
+
}
|
68
|
+
};
|
69
|
+
|
70
|
+
const reportInNextSchema = (defineCallExpression) => {
|
71
|
+
const defineArgs = defineCallExpression.arguments.find((p) => {
|
72
|
+
return p.type === 'ObjectExpression';
|
73
|
+
});
|
74
|
+
const attrsProp = defineArgs?.properties?.find(
|
75
|
+
(p) => p.key.type === 'Identifier' && p.key.name === 'attrs',
|
76
|
+
);
|
77
|
+
if (attrsProp) {
|
78
|
+
context.report({
|
79
|
+
node: attrsProp.key,
|
80
|
+
message:
|
81
|
+
'Changes to next-schema or schema should be reflected in the other.',
|
82
|
+
});
|
83
|
+
}
|
84
|
+
};
|
85
|
+
|
86
|
+
return {
|
87
|
+
// packages/adf-schema/src/schema/nodes/unknown-block.ts
|
88
|
+
ExportDefaultDeclaration: function (node) {
|
89
|
+
if (!isInSchemaOrNextSchema) {
|
90
|
+
return;
|
91
|
+
}
|
92
|
+
if (node?.declaration?.expression?.type === 'ObjectExpression') {
|
93
|
+
const objectExpression = node.declaration.expression;
|
94
|
+
reportInSchema(objectExpression);
|
95
|
+
}
|
96
|
+
},
|
97
|
+
ExpressionStatement(node) {
|
98
|
+
if (!isInSchemaOrNextSchema) {
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
if (node.expression.type === 'CallExpression') {
|
102
|
+
const defineCallExpression = findDefine(node.expression);
|
103
|
+
|
104
|
+
if (defineCallExpression) {
|
105
|
+
reportInNextSchema(defineCallExpression);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
},
|
109
|
+
ReturnStatement: function (node) {
|
110
|
+
if (!isInSchemaOrNextSchema) {
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
if (node?.argument && node?.argument?.type === 'CallExpression') {
|
114
|
+
const callExpression = node.argument;
|
115
|
+
const args = callExpression.arguments;
|
116
|
+
const objectExpression = args.find(
|
117
|
+
(a) => a?.type === 'ObjectExpression',
|
118
|
+
);
|
119
|
+
if (objectExpression) {
|
120
|
+
reportInSchema(objectExpression);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
},
|
124
|
+
VariableDeclarator(node) {
|
125
|
+
if (!isInSchemaOrNextSchema) {
|
126
|
+
return;
|
127
|
+
}
|
128
|
+
if (node.init && node.init.type === 'ObjectExpression') {
|
129
|
+
const objExpression = node.init;
|
130
|
+
reportInSchema(objExpression);
|
131
|
+
}
|
132
|
+
if (node.init && node.init.type === 'CallExpression') {
|
133
|
+
const callExpression = node.init;
|
134
|
+
|
135
|
+
const arg = callExpression.arguments.find((a) => {
|
136
|
+
return a.type === 'ObjectExpression';
|
137
|
+
});
|
138
|
+
|
139
|
+
if (arg) {
|
140
|
+
reportInSchema(arg);
|
141
|
+
}
|
142
|
+
|
143
|
+
const define = findDefine(callExpression);
|
144
|
+
|
145
|
+
if (define) {
|
146
|
+
reportInNextSchema(define);
|
147
|
+
}
|
148
|
+
}
|
149
|
+
},
|
150
|
+
};
|
151
|
+
},
|
152
|
+
};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
const { RuleTester } = require('eslint');
|
2
|
+
const tsParser = require('@typescript-eslint/parser');
|
3
|
+
const warnSchemaChangeRule = require('./warn-schema-change');
|
4
|
+
|
5
|
+
const ruleTester = new RuleTester({
|
6
|
+
parserOptions: { ecmaVersion: 2015 },
|
7
|
+
});
|
8
|
+
|
9
|
+
// Throws error if the tests in ruleTester.run() do not pass
|
10
|
+
ruleTester.run(
|
11
|
+
'warn-schema-change', // rule name
|
12
|
+
warnSchemaChangeRule, // rule code
|
13
|
+
{
|
14
|
+
// checks
|
15
|
+
// 'valid' checks cases that should pass
|
16
|
+
valid: [
|
17
|
+
{
|
18
|
+
code: 'const codeBlock = codeBlockFactory({noDOM: []})',
|
19
|
+
},
|
20
|
+
{
|
21
|
+
code: "const codeBlock = adfNode('codeBlock').define({noAttrs: {}})",
|
22
|
+
},
|
23
|
+
],
|
24
|
+
// 'invalid' checks cases that should not pass
|
25
|
+
invalid: [
|
26
|
+
{
|
27
|
+
code: 'const codeBlock = codeBlockFactory({parseDOM: [],toDOM: []})',
|
28
|
+
errors: 2
|
29
|
+
},
|
30
|
+
{
|
31
|
+
code: "const codeBlock = adfNode('codeBlock').define({attrs: {}})",
|
32
|
+
errors: 1
|
33
|
+
},
|
34
|
+
{
|
35
|
+
code: "const codeBlock = adfNode('codeBlock').define({attrs: {}}).variant('with_marks', {})",
|
36
|
+
errors: 1
|
37
|
+
},
|
38
|
+
],
|
39
|
+
},
|
40
|
+
);
|
41
|
+
|
42
|
+
console.log('All tests passed!');
|