@atlaskit/adf-schema 40.0.1 → 40.0.3
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
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "40.0.
|
3
|
+
"version": "40.0.3",
|
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/"
|
@@ -48,8 +48,7 @@
|
|
48
48
|
"devDependencies": {
|
49
49
|
"@atlassian/adf-schema-json": "^1.16.0",
|
50
50
|
"@atlassian/feature-flags-test-utils": "^0.2.0",
|
51
|
-
"@atlaskit/adf-schema-generator": "^1.28.
|
52
|
-
"@atlaskit/adf-utils": "^19.2.2",
|
51
|
+
"@atlaskit/adf-schema-generator": "^1.28.1",
|
53
52
|
"@atlaskit/codemod-utils": "^4.2.4",
|
54
53
|
"@babel/cli": "^7.22.9",
|
55
54
|
"@babel/core": "^7.22.9",
|
@@ -44,23 +44,9 @@ test('ADF DSL to JSON Schema backwards compatibility for full schema', () => {
|
|
44
44
|
expect(nextSchema).toBeBackwardsCompatibleWith(currentSchema);
|
45
45
|
});
|
46
46
|
|
47
|
-
test('JSON Schema to ADF DSL backwards compatibility for full schema', () => {
|
48
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
49
|
-
const currentSchema = require('../../../json-schema/v1/full.json');
|
50
|
-
const nextSchema = adfToJSON(adfNode, true);
|
51
|
-
expect(currentSchema).toBeBackwardsCompatibleWith(nextSchema);
|
52
|
-
});
|
53
|
-
|
54
47
|
test('ADF DSL to JSON Schema backwards compatibility for stage0 schema', () => {
|
55
48
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
56
49
|
const currentSchema = require('../../../json-schema/v1/stage-0.json');
|
57
50
|
const nextSchema = adfToJSON(adfNode);
|
58
51
|
expect(nextSchema).toBeBackwardsCompatibleWith(currentSchema);
|
59
52
|
});
|
60
|
-
|
61
|
-
test('JSON Schema to ADF DSL backwards compatibility for stage0 schema', () => {
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
63
|
-
const currentSchema = require('../../../json-schema/v1/stage-0.json');
|
64
|
-
const nextSchema = adfToJSON(adfNode);
|
65
|
-
expect(currentSchema).toBeBackwardsCompatibleWith(nextSchema);
|
66
|
-
});
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { adfToValidatorSpec } from '@atlaskit/adf-schema-generator';
|
2
|
-
import * as currentSpecs from '@atlaskit/adf-utils/dist/cjs/validator/specs';
|
3
|
-
import adfNode from '../../../src/next-schema/full-schema.adf';
|
4
|
-
import { sortNestedArrays } from '../../../src/validator-schema/utils/sortNestedArrays';
|
5
|
-
|
6
|
-
const newSpecs = sortNestedArrays(adfToValidatorSpec(adfNode));
|
7
|
-
|
8
|
-
const testCases = Object.entries(currentSpecs).map(([key, value]) => {
|
9
|
-
return {
|
10
|
-
name: key,
|
11
|
-
currentSpec: sortNestedArrays(value),
|
12
|
-
newSpec: sortNestedArrays(newSpecs[key]?.json),
|
13
|
-
};
|
14
|
-
});
|
15
|
-
|
16
|
-
testCases.forEach(({ name, currentSpec, newSpec }) => {
|
17
|
-
it(`should be able to handle ${name}`, () => {
|
18
|
-
expect(newSpec).toEqual(currentSpec);
|
19
|
-
});
|
20
|
-
});
|