Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atlaskit/adf-schema-generator

Package Overview
Dependencies
Maintainers
0
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/adf-schema-generator - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

11

CHANGELOG.md
# @atlaskit/adf-schema-generator
## 2.0.0
## 2.1.0
### Major Changes
### Minor Changes
- a0f224a: Remove `expand_with_with_no_mark` and replace `expand_with_breakout_mark` with `expand_root_only`
Upgrade instructions
- Replace `expand_with_breakout_mark` with `expand_root_only`
- Replace `expand_no_mark` with `expand`
- 2eee4d8: Make attrs optional for expand, remove type from layoutSectionFull

@@ -67,5 +67,2 @@ "use strict";

// @DSLCompatibilityException Despite having no required attributes, expand has attrs required
json.definitions.expand_node.required.push('attrs');
// @DSLCompatibilityException These needs to be added to the JSON Schema to match PM Spec

@@ -76,13 +73,2 @@ json.definitions.inline_node.anyOf = json.definitions.inline_node.anyOf.filter(function (v) {

// @DSLCompatibilityException Only on the layoutSection_full variant we specify type
// See also: compatibility fix for layoutSection_with_single_column_node
var layoutSectionFullAllOfItem = json.definitions.layoutSection_full_node.allOf.find(function (v) {
return v.type === 'object';
});
layoutSectionFullAllOfItem.properties.type = {
enum: ['layoutSection']
};
layoutSectionFullAllOfItem.required = ['type', 'content'];
layoutSectionFullAllOfItem.additionalProperties = false;
// @DSLCompatibilityException layoutSection in JSON schema is a "base" spec,

@@ -152,13 +138,2 @@ // where majority of the restrictions are applied in variants which extend the base spec.

function fixCompatibilityIssuesForStageZero(json) {
// @DSLCompatibilityException layoutSection_with_single_column_node variant we specify type
// See also: compatibility fix for layoutSection_full
var layoutSectionSingleColumnAllOfItem = json.definitions.layoutSection_with_single_column_node.allOf ? json.definitions.layoutSection_with_single_column_node.allOf.find(function (v) {
return v.type === 'object';
}) : json.definitions.layoutSection_with_single_column_node;
layoutSectionSingleColumnAllOfItem.properties.type = {
enum: ['layoutSection']
};
layoutSectionSingleColumnAllOfItem.required = ['type', 'content'];
layoutSectionSingleColumnAllOfItem.additionalProperties = false;
// @DSLCompatibilityException Despite being oneplus, multiBodiedExtension_node has no minItems field

@@ -165,0 +140,0 @@ delete json.definitions.multiBodiedExtension_node.properties.content.minItems;

@@ -42,17 +42,5 @@ import { traverse } from '../../traverse';

// @DSLCompatibilityException Despite having no required attributes, expand has attrs required
json.definitions.expand_node.required.push('attrs');
// @DSLCompatibilityException These needs to be added to the JSON Schema to match PM Spec
json.definitions.inline_node.anyOf = json.definitions.inline_node.anyOf.filter(v => !['#/definitions/confluenceJiraIssue_node', '#/definitions/confluenceUnsupportedInline_node', '#/definitions/image_node', '#/definitions/inlineExtension_node', '#/definitions/text_link_inline_node', '#/definitions/text_node', '#/definitions/unsupportedInline_node'].includes(v.$ref));
// @DSLCompatibilityException Only on the layoutSection_full variant we specify type
// See also: compatibility fix for layoutSection_with_single_column_node
const layoutSectionFullAllOfItem = json.definitions.layoutSection_full_node.allOf.find(v => v.type === 'object');
layoutSectionFullAllOfItem.properties.type = {
enum: ['layoutSection']
};
layoutSectionFullAllOfItem.required = ['type', 'content'];
layoutSectionFullAllOfItem.additionalProperties = false;
// @DSLCompatibilityException layoutSection in JSON schema is a "base" spec,

@@ -114,11 +102,2 @@ // where majority of the restrictions are applied in variants which extend the base spec.

function fixCompatibilityIssuesForStageZero(json) {
// @DSLCompatibilityException layoutSection_with_single_column_node variant we specify type
// See also: compatibility fix for layoutSection_full
const layoutSectionSingleColumnAllOfItem = json.definitions.layoutSection_with_single_column_node.allOf ? json.definitions.layoutSection_with_single_column_node.allOf.find(v => v.type === 'object') : json.definitions.layoutSection_with_single_column_node;
layoutSectionSingleColumnAllOfItem.properties.type = {
enum: ['layoutSection']
};
layoutSectionSingleColumnAllOfItem.required = ['type', 'content'];
layoutSectionSingleColumnAllOfItem.additionalProperties = false;
// @DSLCompatibilityException Despite being oneplus, multiBodiedExtension_node has no minItems field

@@ -125,0 +104,0 @@ delete json.definitions.multiBodiedExtension_node.properties.content.minItems;

@@ -59,5 +59,2 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";

// @DSLCompatibilityException Despite having no required attributes, expand has attrs required
json.definitions.expand_node.required.push('attrs');
// @DSLCompatibilityException These needs to be added to the JSON Schema to match PM Spec

@@ -68,13 +65,2 @@ json.definitions.inline_node.anyOf = json.definitions.inline_node.anyOf.filter(function (v) {

// @DSLCompatibilityException Only on the layoutSection_full variant we specify type
// See also: compatibility fix for layoutSection_with_single_column_node
var layoutSectionFullAllOfItem = json.definitions.layoutSection_full_node.allOf.find(function (v) {
return v.type === 'object';
});
layoutSectionFullAllOfItem.properties.type = {
enum: ['layoutSection']
};
layoutSectionFullAllOfItem.required = ['type', 'content'];
layoutSectionFullAllOfItem.additionalProperties = false;
// @DSLCompatibilityException layoutSection in JSON schema is a "base" spec,

@@ -144,13 +130,2 @@ // where majority of the restrictions are applied in variants which extend the base spec.

function fixCompatibilityIssuesForStageZero(json) {
// @DSLCompatibilityException layoutSection_with_single_column_node variant we specify type
// See also: compatibility fix for layoutSection_full
var layoutSectionSingleColumnAllOfItem = json.definitions.layoutSection_with_single_column_node.allOf ? json.definitions.layoutSection_with_single_column_node.allOf.find(function (v) {
return v.type === 'object';
}) : json.definitions.layoutSection_with_single_column_node;
layoutSectionSingleColumnAllOfItem.properties.type = {
enum: ['layoutSection']
};
layoutSectionSingleColumnAllOfItem.required = ['type', 'content'];
layoutSectionSingleColumnAllOfItem.additionalProperties = false;
// @DSLCompatibilityException Despite being oneplus, multiBodiedExtension_node has no minItems field

@@ -157,0 +132,0 @@ delete json.definitions.multiBodiedExtension_node.properties.content.minItems;

{
"name": "@atlaskit/adf-schema-generator",
"version": "2.0.0",
"version": "2.1.0",
"description": "Generates ADF and PM schemas",

@@ -5,0 +5,0 @@ "repository": "https://bitbucket.org/atlassian/adf-schema",

@@ -91,5 +91,2 @@ import type { ADFNode } from '../../adfNode';

// @DSLCompatibilityException Despite having no required attributes, expand has attrs required
(json.definitions.expand_node.required as string[]).push('attrs');
// @DSLCompatibilityException These needs to be added to the JSON Schema to match PM Spec

@@ -110,12 +107,2 @@ json.definitions.inline_node.anyOf =

// @DSLCompatibilityException Only on the layoutSection_full variant we specify type
// See also: compatibility fix for layoutSection_with_single_column_node
const layoutSectionFullAllOfItem =
json.definitions.layoutSection_full_node.allOf.find(
(v) => v.type === 'object',
);
layoutSectionFullAllOfItem.properties.type = { enum: ['layoutSection'] };
layoutSectionFullAllOfItem.required = ['type', 'content'];
layoutSectionFullAllOfItem.additionalProperties = false;
// @DSLCompatibilityException layoutSection in JSON schema is a "base" spec,

@@ -190,17 +177,2 @@ // where majority of the restrictions are applied in variants which extend the base spec.

function fixCompatibilityIssuesForStageZero(json: JSONSchema4) {
// @DSLCompatibilityException layoutSection_with_single_column_node variant we specify type
// See also: compatibility fix for layoutSection_full
const layoutSectionSingleColumnAllOfItem = json.definitions
.layoutSection_with_single_column_node.allOf
? json.definitions.layoutSection_with_single_column_node.allOf.find(
(v) => v.type === 'object',
)
: json.definitions.layoutSection_with_single_column_node;
layoutSectionSingleColumnAllOfItem.properties.type = {
enum: ['layoutSection'],
};
layoutSectionSingleColumnAllOfItem.required = ['type', 'content'];
layoutSectionSingleColumnAllOfItem.additionalProperties = false;
// @DSLCompatibilityException Despite being oneplus, multiBodiedExtension_node has no minItems field

@@ -207,0 +179,0 @@ delete json.definitions.multiBodiedExtension_node.properties.content.minItems;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc