@atlaskit/adf-schema 37.1.34 → 37.1.36
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 +13 -0
- package/dist/cjs/next-schema/groups/blockRootOnlyGroup.js +5 -1
- package/dist/cjs/next-schema/nodes/codeBlock.js +22 -1
- package/dist/cjs/next-schema/nodes/media.js +8 -0
- package/dist/cjs/next-schema/nodes/mediaInline.js +12 -0
- package/dist/cjs/next-schema/nodes/mediaSingle.js +3 -1
- package/dist/es2019/next-schema/groups/blockRootOnlyGroup.js +5 -1
- package/dist/es2019/next-schema/nodes/codeBlock.js +22 -1
- package/dist/es2019/next-schema/nodes/media.js +8 -0
- package/dist/es2019/next-schema/nodes/mediaInline.js +12 -0
- package/dist/es2019/next-schema/nodes/mediaSingle.js +3 -1
- package/dist/esm/next-schema/groups/blockRootOnlyGroup.js +5 -1
- package/dist/esm/next-schema/nodes/codeBlock.js +22 -1
- package/dist/esm/next-schema/nodes/media.js +8 -0
- package/dist/esm/next-schema/nodes/mediaInline.js +12 -0
- package/dist/esm/next-schema/nodes/mediaSingle.js +3 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +1 -0
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +1 -1
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +1 -1
- package/package.json +2 -2
- package/schema-generators/__tests__/unit/adfToValidatorSpecValidation.unit.ts +0 -3
- package/schema-generators/__tests__/unit/json-full-schema-backwards-compat.unit.ts +0 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 37.1.36
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 3faf4f8: Reverse compatability for doc, blockRootOnly and block in full JSON Schema
|
8
|
+
|
9
|
+
## 37.1.35
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 9132a0c: Fix media and mediaInline nodes with the validator spec.
|
14
|
+
- 20fadb8: align codeBlock node to existing validator spec
|
15
|
+
|
3
16
|
## 37.1.34
|
4
17
|
|
5
18
|
### Patch Changes
|
@@ -6,4 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.blockRootOnlyGroup = void 0;
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
8
|
var _multiBodiedExtension = require("../nodes/multiBodiedExtension");
|
9
|
-
var blockRootOnlyGroup = exports.blockRootOnlyGroup = (0, _adfSchemaGenerator.adfNodeGroup)('blockRootOnly', [_multiBodiedExtension.multiBodiedExtension]
|
9
|
+
var blockRootOnlyGroup = exports.blockRootOnlyGroup = (0, _adfSchemaGenerator.adfNodeGroup)('blockRootOnly', [_multiBodiedExtension.multiBodiedExtension], {
|
10
|
+
// @DSLCompatibilityException - Generated JSON Schema does not have this.
|
11
|
+
// We should introduce this to the JSON Schema since it is in PM Spec
|
12
|
+
ignore: ['json-schema']
|
13
|
+
});
|
@@ -27,7 +27,28 @@ var codeBlock = exports.codeBlock = (0, _adfSchemaGenerator.adfNode)('codeBlock'
|
|
27
27
|
optional: true
|
28
28
|
}
|
29
29
|
},
|
30
|
-
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_text.text, _unsupportedInline.unsupportedInline))]
|
30
|
+
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_text.text, _unsupportedInline.unsupportedInline))],
|
31
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
32
|
+
'validator-spec': {
|
33
|
+
'props.attrs.props.uniqueId': {
|
34
|
+
remove: true,
|
35
|
+
reason: '@DSLCompatibilityException - uniqueId is missing in the existing validator spec'
|
36
|
+
},
|
37
|
+
'props.content.items': {
|
38
|
+
value: [['text', {
|
39
|
+
props: {
|
40
|
+
marks: {
|
41
|
+
items: [],
|
42
|
+
maxItems: 0,
|
43
|
+
optional: true,
|
44
|
+
type: 'array'
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}]],
|
48
|
+
reason: '@DSLCompatibilityException - text variant is inlined, which is not supported by current transformation'
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
31
52
|
}).variant('with_marks', {
|
32
53
|
marks: [_breakout.breakout, _unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
|
33
54
|
ignore: ['pm-spec']
|
@@ -111,5 +111,13 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
|
|
111
111
|
default: null
|
112
112
|
}
|
113
113
|
}]
|
114
|
+
},
|
115
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
116
|
+
'validator-spec': {
|
117
|
+
'props.attrs[1].props.url.optional': {
|
118
|
+
remove: true,
|
119
|
+
reason: '@DSLCompatibilityException - mismatch for validator spec as optional is not specified'
|
120
|
+
}
|
121
|
+
}
|
114
122
|
}
|
115
123
|
});
|
@@ -92,6 +92,18 @@ var mediaInline = exports.mediaInline = (0, _adfSchemaGenerator.adfNode)('mediaI
|
|
92
92
|
type: 'boolean',
|
93
93
|
optional: true,
|
94
94
|
default: false
|
95
|
+
},
|
96
|
+
data: {
|
97
|
+
type: 'object',
|
98
|
+
optional: true
|
99
|
+
}
|
100
|
+
},
|
101
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
102
|
+
'validator-spec': {
|
103
|
+
'props.attrs.props.url': {
|
104
|
+
remove: true,
|
105
|
+
reason: '@DSLCompatibilityException - url is not specified on the validator spec (but it probably should be)'
|
106
|
+
}
|
95
107
|
}
|
96
108
|
}
|
97
109
|
});
|
@@ -123,7 +123,9 @@ var mediaSingle = exports.mediaSingle = (0, _adfSchemaGenerator.adfNode)('mediaS
|
|
123
123
|
}
|
124
124
|
}).variant('width_type', {
|
125
125
|
content: [(0, _adfSchemaGenerator.$range)(1, 1, (0, _adfSchemaGenerator.$or)(_media.media, _unsupportedBlock.unsupportedBlock))],
|
126
|
-
|
126
|
+
// @DSLCompatibilityException - Generated JSON Schema does not have this.
|
127
|
+
// We should introduce this to the JSON Schema since it is in PM Spec
|
128
|
+
ignore: ['json-schema'],
|
127
129
|
marks: [],
|
128
130
|
DANGEROUS_MANUAL_OVERRIDE: {
|
129
131
|
'pm-spec': {
|
@@ -1,3 +1,7 @@
|
|
1
1
|
import { adfNodeGroup } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { multiBodiedExtension } from '../nodes/multiBodiedExtension';
|
3
|
-
export const blockRootOnlyGroup = adfNodeGroup('blockRootOnly', [multiBodiedExtension]
|
3
|
+
export const blockRootOnlyGroup = adfNodeGroup('blockRootOnly', [multiBodiedExtension], {
|
4
|
+
// @DSLCompatibilityException - Generated JSON Schema does not have this.
|
5
|
+
// We should introduce this to the JSON Schema since it is in PM Spec
|
6
|
+
ignore: ['json-schema']
|
7
|
+
});
|
@@ -21,7 +21,28 @@ export const codeBlock = adfNode('codeBlock').define({
|
|
21
21
|
optional: true
|
22
22
|
}
|
23
23
|
},
|
24
|
-
content: [$zeroPlus($or(text, unsupportedInline))]
|
24
|
+
content: [$zeroPlus($or(text, unsupportedInline))],
|
25
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
26
|
+
'validator-spec': {
|
27
|
+
'props.attrs.props.uniqueId': {
|
28
|
+
remove: true,
|
29
|
+
reason: '@DSLCompatibilityException - uniqueId is missing in the existing validator spec'
|
30
|
+
},
|
31
|
+
'props.content.items': {
|
32
|
+
value: [['text', {
|
33
|
+
props: {
|
34
|
+
marks: {
|
35
|
+
items: [],
|
36
|
+
maxItems: 0,
|
37
|
+
optional: true,
|
38
|
+
type: 'array'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}]],
|
42
|
+
reason: '@DSLCompatibilityException - text variant is inlined, which is not supported by current transformation'
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
25
46
|
}).variant('with_marks', {
|
26
47
|
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
27
48
|
ignore: ['pm-spec']
|
@@ -105,5 +105,13 @@ export const media = adfNode('media').define({
|
|
105
105
|
default: null
|
106
106
|
}
|
107
107
|
}]
|
108
|
+
},
|
109
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
110
|
+
'validator-spec': {
|
111
|
+
'props.attrs[1].props.url.optional': {
|
112
|
+
remove: true,
|
113
|
+
reason: '@DSLCompatibilityException - mismatch for validator spec as optional is not specified'
|
114
|
+
}
|
115
|
+
}
|
108
116
|
}
|
109
117
|
});
|
@@ -86,6 +86,18 @@ export const mediaInline = adfNode('mediaInline').define({
|
|
86
86
|
type: 'boolean',
|
87
87
|
optional: true,
|
88
88
|
default: false
|
89
|
+
},
|
90
|
+
data: {
|
91
|
+
type: 'object',
|
92
|
+
optional: true
|
93
|
+
}
|
94
|
+
},
|
95
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
96
|
+
'validator-spec': {
|
97
|
+
'props.attrs.props.url': {
|
98
|
+
remove: true,
|
99
|
+
reason: '@DSLCompatibilityException - url is not specified on the validator spec (but it probably should be)'
|
100
|
+
}
|
89
101
|
}
|
90
102
|
}
|
91
103
|
});
|
@@ -117,7 +117,9 @@ export const mediaSingle = adfNode('mediaSingle').define({
|
|
117
117
|
}
|
118
118
|
}).variant('width_type', {
|
119
119
|
content: [$range(1, 1, $or(media, unsupportedBlock))],
|
120
|
-
|
120
|
+
// @DSLCompatibilityException - Generated JSON Schema does not have this.
|
121
|
+
// We should introduce this to the JSON Schema since it is in PM Spec
|
122
|
+
ignore: ['json-schema'],
|
121
123
|
marks: [],
|
122
124
|
DANGEROUS_MANUAL_OVERRIDE: {
|
123
125
|
'pm-spec': {
|
@@ -1,3 +1,7 @@
|
|
1
1
|
import { adfNodeGroup } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { multiBodiedExtension } from '../nodes/multiBodiedExtension';
|
3
|
-
export var blockRootOnlyGroup = adfNodeGroup('blockRootOnly', [multiBodiedExtension]
|
3
|
+
export var blockRootOnlyGroup = adfNodeGroup('blockRootOnly', [multiBodiedExtension], {
|
4
|
+
// @DSLCompatibilityException - Generated JSON Schema does not have this.
|
5
|
+
// We should introduce this to the JSON Schema since it is in PM Spec
|
6
|
+
ignore: ['json-schema']
|
7
|
+
});
|
@@ -21,7 +21,28 @@ export var codeBlock = adfNode('codeBlock').define({
|
|
21
21
|
optional: true
|
22
22
|
}
|
23
23
|
},
|
24
|
-
content: [$zeroPlus($or(text, unsupportedInline))]
|
24
|
+
content: [$zeroPlus($or(text, unsupportedInline))],
|
25
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
26
|
+
'validator-spec': {
|
27
|
+
'props.attrs.props.uniqueId': {
|
28
|
+
remove: true,
|
29
|
+
reason: '@DSLCompatibilityException - uniqueId is missing in the existing validator spec'
|
30
|
+
},
|
31
|
+
'props.content.items': {
|
32
|
+
value: [['text', {
|
33
|
+
props: {
|
34
|
+
marks: {
|
35
|
+
items: [],
|
36
|
+
maxItems: 0,
|
37
|
+
optional: true,
|
38
|
+
type: 'array'
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}]],
|
42
|
+
reason: '@DSLCompatibilityException - text variant is inlined, which is not supported by current transformation'
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
25
46
|
}).variant('with_marks', {
|
26
47
|
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
27
48
|
ignore: ['pm-spec']
|
@@ -105,5 +105,13 @@ export var media = adfNode('media').define({
|
|
105
105
|
default: null
|
106
106
|
}
|
107
107
|
}]
|
108
|
+
},
|
109
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
110
|
+
'validator-spec': {
|
111
|
+
'props.attrs[1].props.url.optional': {
|
112
|
+
remove: true,
|
113
|
+
reason: '@DSLCompatibilityException - mismatch for validator spec as optional is not specified'
|
114
|
+
}
|
115
|
+
}
|
108
116
|
}
|
109
117
|
});
|
@@ -86,6 +86,18 @@ export var mediaInline = adfNode('mediaInline').define({
|
|
86
86
|
type: 'boolean',
|
87
87
|
optional: true,
|
88
88
|
default: false
|
89
|
+
},
|
90
|
+
data: {
|
91
|
+
type: 'object',
|
92
|
+
optional: true
|
93
|
+
}
|
94
|
+
},
|
95
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
96
|
+
'validator-spec': {
|
97
|
+
'props.attrs.props.url': {
|
98
|
+
remove: true,
|
99
|
+
reason: '@DSLCompatibilityException - url is not specified on the validator spec (but it probably should be)'
|
100
|
+
}
|
89
101
|
}
|
90
102
|
}
|
91
103
|
});
|
@@ -117,7 +117,9 @@ export var mediaSingle = adfNode('mediaSingle').define({
|
|
117
117
|
}
|
118
118
|
}).variant('width_type', {
|
119
119
|
content: [$range(1, 1, $or(media, unsupportedBlock))],
|
120
|
-
|
120
|
+
// @DSLCompatibilityException - Generated JSON Schema does not have this.
|
121
|
+
// We should introduce this to the JSON Schema since it is in PM Spec
|
122
|
+
ignore: ['json-schema'],
|
121
123
|
marks: [],
|
122
124
|
DANGEROUS_MANUAL_OVERRIDE: {
|
123
125
|
'pm-spec': {
|
@@ -97,7 +97,7 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
|
|
97
97
|
};
|
98
98
|
} & {
|
99
99
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
|
100
|
-
ignore:
|
100
|
+
ignore: "json-schema"[];
|
101
101
|
marks: any[];
|
102
102
|
DANGEROUS_MANUAL_OVERRIDE: {
|
103
103
|
'pm-spec': {
|
@@ -68,7 +68,7 @@ export declare const mediaSingle: import("@atlaskit/adf-schema-generator/dist/ty
|
|
68
68
|
};
|
69
69
|
} & {
|
70
70
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
|
71
|
-
ignore:
|
71
|
+
ignore: "json-schema"[];
|
72
72
|
marks: any[];
|
73
73
|
DANGEROUS_MANUAL_OVERRIDE: {
|
74
74
|
'pm-spec': {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "37.1.
|
3
|
+
"version": "37.1.36",
|
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.
|
50
|
+
"@atlaskit/adf-schema-generator": "^1.25.7",
|
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,11 +4,8 @@ import adfNode from '../../../src/next-schema/full-schema.adf';
|
|
4
4
|
|
5
5
|
const newSpecs = sortNestedArrays(adfToValidatorSpec(adfNode));
|
6
6
|
const SKIP_LIST = [
|
7
|
-
'codeBlock', // doesn't match existing spec
|
8
7
|
'inline_comment_marker', // doesn't exist in the output
|
9
8
|
'layoutSection_with_single_column', // doesn't exist in the output
|
10
|
-
'media', // doesn't match existing spec
|
11
|
-
'mediaInline', // doesn't match existing spec
|
12
9
|
'multiBodiedExtension', // doesn't match existing spec
|
13
10
|
'nestedExpand', // doesn't match existing spec
|
14
11
|
'tableCell', // doesn't match existing spec
|
@@ -48,10 +48,7 @@ test('ADF DSL to JSON Schema backwards compatibility for full schema', () => {
|
|
48
48
|
function transformFullFixtureForKnownFailures(json) {
|
49
49
|
const definitions = json.definitions;
|
50
50
|
|
51
|
-
delete definitions.doc_node;
|
52
|
-
delete definitions.blockRootOnly_node;
|
53
51
|
delete definitions.extensionFrame_node;
|
54
|
-
delete definitions.block_content;
|
55
52
|
delete definitions.non_nestable_block_content;
|
56
53
|
delete definitions.table_row_node;
|
57
54
|
delete definitions.table_cell_content;
|