@atlaskit/adf-schema 37.1.19 → 37.1.20

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,13 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 37.1.20
4
+
5
+ ### Patch Changes
6
+
7
+ - e57d797: Add new optional property for string attributes used in the validator ("validatorFn") function used for URL.
8
+
9
+ This is used for the validator for "link" and "embedCard".
10
+
3
11
  ## 37.1.19
4
12
 
5
13
  ### Patch Changes
@@ -15,7 +15,8 @@ link.define({
15
15
  inclusive: false,
16
16
  attrs: {
17
17
  href: {
18
- type: 'string'
18
+ type: 'string',
19
+ validatorFn: 'safeUrl'
19
20
  },
20
21
  title: {
21
22
  type: 'string',
@@ -13,7 +13,8 @@ var embedCard = exports.embedCard = (0, _adfSchemaGenerator.adfNode)('embedCard'
13
13
  attrs: {
14
14
  url: {
15
15
  type: 'string',
16
- default: ''
16
+ default: '',
17
+ validatorFn: 'safeUrl'
17
18
  },
18
19
  layout: {
19
20
  type: 'enum',
@@ -9,7 +9,8 @@ link.define({
9
9
  inclusive: false,
10
10
  attrs: {
11
11
  href: {
12
- type: 'string'
12
+ type: 'string',
13
+ validatorFn: 'safeUrl'
13
14
  },
14
15
  title: {
15
16
  type: 'string',
@@ -7,7 +7,8 @@ export const embedCard = adfNode('embedCard').define({
7
7
  attrs: {
8
8
  url: {
9
9
  type: 'string',
10
- default: ''
10
+ default: '',
11
+ validatorFn: 'safeUrl'
11
12
  },
12
13
  layout: {
13
14
  type: 'enum',
@@ -9,7 +9,8 @@ link.define({
9
9
  inclusive: false,
10
10
  attrs: {
11
11
  href: {
12
- type: 'string'
12
+ type: 'string',
13
+ validatorFn: 'safeUrl'
13
14
  },
14
15
  title: {
15
16
  type: 'string',
@@ -7,7 +7,8 @@ export var embedCard = adfNode('embedCard').define({
7
7
  attrs: {
8
8
  url: {
9
9
  type: 'string',
10
- default: ''
10
+ default: '',
11
+ validatorFn: 'safeUrl'
11
12
  },
12
13
  layout: {
13
14
  type: 'enum',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "37.1.19",
3
+ "version": "37.1.20",
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.24.1",
50
+ "@atlaskit/adf-schema-generator": "^1.24.2",
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,14 +4,11 @@ import adfNode from '../../../src/next-schema/full-schema.adf';
4
4
 
5
5
  const newSpecs = sortNestedArrays(adfToValidatorSpec(adfNode));
6
6
  const SKIP_LIST = [
7
- 'link', // doesn't exist in the output - validatorFn in DSL
8
-
9
7
  'blockCard', // doesn't match existing spec
10
8
  'bodiedExtension', // doesn't match existing spec
11
9
  'caption', // doesn't match existing spec
12
10
  'codeBlock', // doesn't match existing spec
13
11
  'doc', // doesn't match existing spec
14
- 'embedCard', // doesn't match existing spec, validatorFn
15
12
  'expand', // doesn't match existing spec
16
13
  'extensionFrame', // doesn't match existing spec
17
14
  'inlineCard', // doesn't match existing spec