@atlaskit/adf-schema 30.2.1 → 30.2.2

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,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 30.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 655b591: Set non reassigned variables to constants
8
+
3
9
  ## 30.2.1
4
10
 
5
11
  ### Patch Changes
@@ -261,7 +261,7 @@ export function createSchema(config) {
261
261
  const nodesConfig = Object.keys(customNodeSpecs || {}).concat(config.nodes);
262
262
  const marksConfig = Object.keys(customMarkSpecs || {}).concat(config.marks || []).concat(markGroupDeclarationsNames);
263
263
  let nodes = addItems(nodesInOrder, nodesConfig, customNodeSpecs);
264
- let marks = addItems(marksInOrder, marksConfig, customMarkSpecs);
264
+ const marks = addItems(marksInOrder, marksConfig, customMarkSpecs);
265
265
  nodes = sanitizeNodes(nodes, marks);
266
266
  return new Schema({
267
267
  nodes,
@@ -2,7 +2,7 @@ import memoizeOne from 'memoize-one';
2
2
  import { layoutSectionWithSingleColumn } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  const getDefaultSchemaConfig = () => {
5
- let defaultSchemaConfig = {
5
+ const defaultSchemaConfig = {
6
6
  nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
7
7
  marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
8
8
  // https://product-fabric.atlassian.net/browse/ED-10214,
@@ -46,7 +46,7 @@ export const annotation = {
46
46
  mark: 'annotation',
47
47
  getAttrs: domNode => {
48
48
  const dom = domNode;
49
- let attrs = {
49
+ const attrs = {
50
50
  id: dom.getAttribute('data-id'),
51
51
  annotationType: dom.getAttribute('data-mark-annotation-type')
52
52
  };
@@ -20,7 +20,7 @@ export const code = {
20
20
  tag: 'span',
21
21
  preserveWhitespace: true,
22
22
  getAttrs: domNode => {
23
- let dom = domNode;
23
+ const dom = domNode;
24
24
  if (dom.style.whiteSpace === 'pre') {
25
25
  return {};
26
26
  }
@@ -39,7 +39,7 @@ export const orderedListWithOrder = {
39
39
  tag: 'ol',
40
40
  getAttrs: domNode => {
41
41
  const dom = domNode;
42
- let startDOMAttr = dom.getAttribute('start');
42
+ const startDOMAttr = dom.getAttribute('start');
43
43
  if (startDOMAttr) {
44
44
  const start = resolveStart(startDOMAttr);
45
45
  if (typeof start === 'number') {
@@ -14,7 +14,7 @@ export let PanelType = /*#__PURE__*/function (PanelType) {
14
14
  */
15
15
 
16
16
  const getDefaultAttrs = () => {
17
- let attrs = {
17
+ const attrs = {
18
18
  panelType: {
19
19
  default: 'info'
20
20
  },
@@ -34,7 +34,7 @@ const getDefaultAttrs = () => {
34
34
  return attrs;
35
35
  };
36
36
  const getDomAttrs = nodeAttrs => {
37
- let attrs = {
37
+ const attrs = {
38
38
  'data-panel-type': nodeAttrs.panelType,
39
39
  'data-panel-icon': nodeAttrs.panelIcon,
40
40
  'data-panel-icon-id': nodeAttrs.panelIconId,
@@ -116,7 +116,7 @@ export function hexToRgb(color) {
116
116
  * @param hex - hex color string (#xxx, or #xxxxxx)
117
117
  */
118
118
  export function hexToRgba(rawColor, alpha) {
119
- let color = normalizeHexColor(rawColor);
119
+ const color = normalizeHexColor(rawColor);
120
120
  if (!color) {
121
121
  return null;
122
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "30.2.1",
3
+ "version": "30.2.2",
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/"