@atlaskit/adf-schema 52.2.1 → 52.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
+ ## 52.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 52.2.1
4
10
 
5
11
  ### Patch Changes
@@ -1,6 +1,7 @@
1
- import { createTransformer } from '@atlaskit/codemod-utils';
1
+ import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
2
2
  import { updateImportEntryPointsForBitbucketSchema } from './migrates/update-bitbucket-schema-entry-points';
3
3
 
4
- const transformer = createTransformer(updateImportEntryPointsForBitbucketSchema);
4
+ const transformer: (fileInfo: FileInfo, { jscodeshift }: API, options: Options) => string =
5
+ createTransformer(updateImportEntryPointsForBitbucketSchema);
5
6
 
6
7
  export default transformer;
@@ -1,6 +1,7 @@
1
- import { createTransformer } from '@atlaskit/codemod-utils';
1
+ import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
2
2
  import { updateImportEntryPointsForConfluenceSchema } from './migrates/update-confluence-schema-entry-points';
3
3
 
4
- const transformer = createTransformer(updateImportEntryPointsForConfluenceSchema);
4
+ const transformer: (fileInfo: FileInfo, { jscodeshift }: API, options: Options) => string =
5
+ createTransformer(updateImportEntryPointsForConfluenceSchema);
5
6
 
6
7
  export default transformer;
@@ -1,6 +1,7 @@
1
- import { createTransformer } from '@atlaskit/codemod-utils';
1
+ import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
2
2
  import { updateImportEntryPointsForDefaultSchema } from './migrates/update-default-schema-entry-points';
3
3
 
4
- const transformer = createTransformer(updateImportEntryPointsForDefaultSchema);
4
+ const transformer: (fileInfo: FileInfo, { jscodeshift }: API, options: Options) => string =
5
+ createTransformer(updateImportEntryPointsForDefaultSchema);
5
6
 
6
7
  export default transformer;
@@ -1,6 +1,7 @@
1
- import { createTransformer } from '@atlaskit/codemod-utils';
1
+ import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
2
2
  import { updateImportEntryPointsForJiraSchema } from './migrates/update-jira-schema-entry-points';
3
3
 
4
- const transformer = createTransformer(updateImportEntryPointsForJiraSchema);
4
+ const transformer: (fileInfo: FileInfo, { jscodeshift }: API, options: Options) => string =
5
+ createTransformer(updateImportEntryPointsForJiraSchema);
5
6
 
6
7
  export default transformer;
@@ -1,6 +1,9 @@
1
- import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
1
+ import { changeImportEntryPoint, type JSCodeshift, type Collection } from '@atlaskit/codemod-utils';
2
2
 
3
- export const updateImportEntryPointsForBitbucketSchema = [
3
+ export const updateImportEntryPointsForBitbucketSchema: ((
4
+ j: JSCodeshift,
5
+ root: Collection<Node>,
6
+ ) => void)[] = [
4
7
  changeImportEntryPoint(
5
8
  '@atlaskit/adf-schema',
6
9
  'bitbucketSchema',
@@ -1,6 +1,9 @@
1
- import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
1
+ import { changeImportEntryPoint, type JSCodeshift, type Collection } from '@atlaskit/codemod-utils';
2
2
 
3
- export const updateImportEntryPointsForConfluenceSchema = [
3
+ export const updateImportEntryPointsForConfluenceSchema: ((
4
+ j: JSCodeshift,
5
+ root: Collection<Node>,
6
+ ) => void)[] = [
4
7
  changeImportEntryPoint(
5
8
  '@atlaskit/adf-schema',
6
9
  'confluenceSchema',
@@ -1,6 +1,9 @@
1
- import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
1
+ import { changeImportEntryPoint, type JSCodeshift, type Collection } from '@atlaskit/codemod-utils';
2
2
 
3
- export const updateImportEntryPointsForDefaultSchema = [
3
+ export const updateImportEntryPointsForDefaultSchema: ((
4
+ j: JSCodeshift,
5
+ root: Collection<Node>,
6
+ ) => void)[] = [
4
7
  changeImportEntryPoint(
5
8
  '@atlaskit/adf-schema',
6
9
  'defaultSchema',
@@ -1,6 +1,9 @@
1
- import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
1
+ import { changeImportEntryPoint, type JSCodeshift, type Collection } from '@atlaskit/codemod-utils';
2
2
 
3
- export const updateImportEntryPointsForJiraSchema = [
3
+ export const updateImportEntryPointsForJiraSchema: ((
4
+ j: JSCodeshift,
5
+ root: Collection<Node>,
6
+ ) => void)[] = [
4
7
  changeImportEntryPoint(
5
8
  '@atlaskit/adf-schema',
6
9
  'createJIRASchema',
@@ -1,4 +1,4 @@
1
- import { MarkExcludesNone, adfMark } from '@atlaskit/adf-schema-generator';
1
+ import { adfMark, MarkExcludesNone } from '@atlaskit/adf-schema-generator';
2
2
  export const fragment = adfMark('fragment').define({
3
3
  inclusive: false,
4
4
  excludes: MarkExcludesNone,
@@ -1,4 +1,4 @@
1
- import { MarkExcludesNone, adfMark } from '@atlaskit/adf-schema-generator';
1
+ import { adfMark, MarkExcludesNone } from '@atlaskit/adf-schema-generator';
2
2
  export var fragment = adfMark('fragment').define({
3
3
  inclusive: false,
4
4
  excludes: MarkExcludesNone,
@@ -1,3 +1,4 @@
1
+ import { type ADFMark, type ADFMarkSpec } from '@atlaskit/adf-schema-generator';
1
2
  /**
2
3
  * fontSize mark - applies size styling to block-level content
3
4
  *
@@ -13,4 +14,4 @@
13
14
  * }
14
15
  * ```
15
16
  */
16
- export declare const fontSize: import("@atlaskit/adf-schema-generator").ADFMark<import("@atlaskit/adf-schema-generator").ADFMarkSpec>;
17
+ export declare const fontSize: ADFMark<ADFMarkSpec>;
@@ -1,2 +1,2 @@
1
- import type { ADFMark, ADFMarkSpec } from '@atlaskit/adf-schema-generator';
1
+ import { type ADFMark, type ADFMarkSpec } from '@atlaskit/adf-schema-generator';
2
2
  export declare const fragment: ADFMark<ADFMarkSpec>;
@@ -1,3 +1,4 @@
1
+ import { type ADFMark, type ADFMarkSpec } from '@atlaskit/adf-schema-generator';
1
2
  /**
2
3
  * fontSize mark - applies size styling to block-level content
3
4
  *
@@ -13,4 +14,4 @@
13
14
  * }
14
15
  * ```
15
16
  */
16
- export declare const fontSize: import("@atlaskit/adf-schema-generator").ADFMark<import("@atlaskit/adf-schema-generator").ADFMarkSpec>;
17
+ export declare const fontSize: ADFMark<ADFMarkSpec>;
@@ -1,2 +1,2 @@
1
- import type { ADFMark, ADFMarkSpec } from '@atlaskit/adf-schema-generator';
1
+ import { type ADFMark, type ADFMarkSpec } from '@atlaskit/adf-schema-generator';
2
2
  export declare const fragment: ADFMark<ADFMarkSpec>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "52.2.1",
3
+ "version": "52.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/"
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@atlaskit/adf-schema-generator": "^2.1.0",
44
44
  "@atlaskit/editor-prosemirror": "^7.3.0",
45
- "@atlaskit/tmp-editor-statsig": "^34.0.0",
45
+ "@atlaskit/tmp-editor-statsig": "^35.0.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "css-color-names": "0.0.4",
48
48
  "linkify-it": "^3.0.3",
@@ -1,4 +1,7 @@
1
- export const filterAndSortMarks = (marks: string, excluded: string[] = []) => {
1
+ export const filterAndSortMarks: (marks: string, excluded?: string[]) => string = (
2
+ marks: string,
3
+ excluded: string[] = [],
4
+ ) => {
2
5
  return marks
3
6
  .split(' ')
4
7
  .filter((v) => !excluded.includes(v))
@@ -110,7 +113,10 @@ const expFormatter =
110
113
  * @param skipLists a list contains node name can be removed from contents string
111
114
  * @returns sorted content string, without node defined in skipList
112
115
  */
113
- export const formatContent = (content: string, skipLists: string[] = []) => {
116
+ export const formatContent: (content: string, skipLists?: string[]) => string = (
117
+ content: string,
118
+ skipLists: string[] = [],
119
+ ) => {
114
120
  const result = content.replace(/\s*\|\s*/gu, '|');
115
121
  if (result.includes(' ')) {
116
122
  return result.split(' ').map(expFormatter(skipLists)).join(' ').trim();