@atlaskit/adf-utils 18.2.0 → 18.2.1

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-utils
2
2
 
3
+ ## 18.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
3
9
  ## 18.2.0
4
10
 
5
11
  ### Minor Changes
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/builders.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/builders.d.ts"
11
+ "../dist/types-ts4.5/builders.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "18.2.0",
3
+ "version": "18.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "18.2.0",
3
+ "version": "18.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "18.2.0",
3
+ "version": "18.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,3 @@
1
1
  import { CodeBlockDefinition, TextDefinition, NoMark } from '@atlaskit/adf-schema';
2
- export declare type CodeBlockContent = TextDefinition & NoMark;
2
+ export type CodeBlockContent = TextDefinition & NoMark;
3
3
  export declare const codeBlock: (attrs: CodeBlockDefinition['attrs'] | undefined) => (...content: Array<CodeBlockContent>) => CodeBlockDefinition;
@@ -1,2 +1,2 @@
1
1
  import { TableCellDefinition, CellAttributes } from '@atlaskit/adf-schema';
2
- export declare const tableCell: (attrs?: CellAttributes | undefined) => (...content: TableCellDefinition['content']) => TableCellDefinition;
2
+ export declare const tableCell: (attrs?: CellAttributes) => (...content: TableCellDefinition['content']) => TableCellDefinition;
@@ -1,2 +1,2 @@
1
1
  import { TableHeaderDefinition, CellAttributes } from '@atlaskit/adf-schema';
2
- export declare const tableHeader: (attrs?: CellAttributes | undefined) => (...content: TableHeaderDefinition['content']) => TableHeaderDefinition;
2
+ export declare const tableHeader: (attrs?: CellAttributes) => (...content: TableHeaderDefinition['content']) => TableHeaderDefinition;
@@ -1,8 +1,8 @@
1
- export declare type WithMark = {
1
+ export type WithMark = {
2
2
  type: any;
3
3
  marks?: Array<any>;
4
4
  [prop: string]: any;
5
5
  };
6
- export declare type WithAppliedMark<T, M> = T & {
6
+ export type WithAppliedMark<T, M> = T & {
7
7
  marks?: Array<M>;
8
8
  };
@@ -1,10 +1,10 @@
1
1
  import { ADFEntity, EntityParent } from '../types';
2
2
  import { ValueReplacements } from './default-value-replacements';
3
- export declare type NodeReplacer = (node: ADFEntity, context: {
3
+ export type NodeReplacer = (node: ADFEntity, context: {
4
4
  parent: EntityParent;
5
5
  valueReplacements: ValueReplacements;
6
6
  }) => ADFEntity | null | false;
7
- export declare type NodeReplacements = {
7
+ export type NodeReplacements = {
8
8
  [key: string]: NodeReplacer;
9
9
  };
10
10
  export declare const defaultNodeReplacements: NodeReplacements;
@@ -1,6 +1,6 @@
1
- export declare type Value = string | number | boolean | undefined | null;
2
- export declare type ValueReplacer<V extends Value> = (value: V) => V;
3
- export declare type ValueReplacements = {
1
+ export type Value = string | number | boolean | undefined | null;
2
+ export type ValueReplacer<V extends Value> = (value: V) => V;
3
+ export type ValueReplacements = {
4
4
  href: ValueReplacer<string>;
5
5
  };
6
6
  export declare const defaultValueReplacements: ValueReplacements;
@@ -1,6 +1,6 @@
1
1
  import { ValueReplacements } from './default-value-replacements';
2
2
  export declare const scrubStr: (val: string, offset?: number) => string;
3
- export declare type ScrubLinkOptions = {
3
+ export type ScrubLinkOptions = {
4
4
  valueReplacements: ValueReplacements;
5
5
  };
6
6
  export declare const scrubLink: (marks: {
@@ -14,11 +14,11 @@ export interface ADFEntity {
14
14
  text?: string;
15
15
  [key: string]: any;
16
16
  }
17
- export declare type Visitor = (node: ADFEntity, parent: EntityParent, index: number, depth: number) => ADFEntity | false | undefined | void;
18
- export declare type VisitorCollection = {
17
+ export type Visitor = (node: ADFEntity, parent: EntityParent, index: number, depth: number) => ADFEntity | false | undefined | void;
18
+ export type VisitorCollection = {
19
19
  [nodeType: string]: Visitor;
20
20
  };
21
- export declare type EntityParent = {
21
+ export type EntityParent = {
22
22
  node?: ADFEntity;
23
23
  parent?: EntityParent;
24
24
  };
@@ -25,7 +25,7 @@ export interface ValidatorContent {
25
25
  allowUnsupportedInline: boolean;
26
26
  isTupleLike?: boolean;
27
27
  }
28
- export declare type AttributesSpec = {
28
+ export type AttributesSpec = {
29
29
  type: 'number';
30
30
  optional?: boolean;
31
31
  minimum: number;
@@ -106,16 +106,16 @@ export interface ValidationErrorMap {
106
106
  };
107
107
  DEPRECATED: never;
108
108
  }
109
- export declare type RequiredContentLength = 'minimum' | 'maximum';
110
- export declare type Content = Array<string | [string, object] | Array<string>>;
111
- export declare type ValidationErrorType = keyof ValidationErrorMap;
109
+ export type RequiredContentLength = 'minimum' | 'maximum';
110
+ export type Content = Array<string | [string, object] | Array<string>>;
111
+ export type ValidationErrorType = keyof ValidationErrorMap;
112
112
  export interface ValidationError {
113
113
  code: ValidationErrorType;
114
114
  message: string;
115
115
  meta?: object;
116
116
  }
117
- export declare type ErrorCallback = (entity: ADFEntity, error: ValidationError, options: ErrorCallbackOptions) => ADFEntity | undefined;
118
- export declare type ValidationMode = 'strict' | 'loose';
117
+ export type ErrorCallback = (entity: ADFEntity, error: ValidationError, options: ErrorCallbackOptions) => ADFEntity | undefined;
118
+ export type ValidationMode = 'strict' | 'loose';
119
119
  export interface ValidationOptions {
120
120
  mode?: ValidationMode;
121
121
  allowPrivateAttributes?: boolean;
@@ -124,11 +124,11 @@ export interface SpecValidatorResult {
124
124
  hasValidated: boolean;
125
125
  result?: NodeValidationResult;
126
126
  }
127
- export declare type Err = <T extends ValidationErrorType>(code: T, msg: string, meta?: T extends keyof ValidationErrorMap ? ValidationErrorMap[T] : never) => NodeValidationResult;
127
+ export type Err = <T extends ValidationErrorType>(code: T, msg: string, meta?: T extends keyof ValidationErrorMap ? ValidationErrorMap[T] : never) => NodeValidationResult;
128
128
  export interface ErrorCallbackOptions {
129
129
  isNodeAttribute?: boolean;
130
130
  isMark?: any;
131
131
  allowUnsupportedBlock?: boolean;
132
132
  allowUnsupportedInline?: boolean;
133
133
  }
134
- export declare type Validate = (entity: ADFEntity, errorCallback?: ErrorCallback, allowed?: Content, parentSpec?: ValidatorSpec) => Output;
134
+ export type Validate = (entity: ADFEntity, errorCallback?: ErrorCallback, allowed?: Content, parentSpec?: ValidatorSpec) => Output;
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/empty-adf.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/empty-adf.d.ts"
11
+ "../dist/types-ts4.5/empty-adf.d.ts"
12
12
  ]
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "18.2.0",
3
+ "version": "18.2.1",
4
4
  "description": "Set of utilities to traverse, modify and create ADF documents.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.ts",
17
25
  "atlassian": {
@@ -43,7 +51,7 @@
43
51
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
44
52
  "jscodeshift": "^0.13.0",
45
53
  "react": "^16.8.0",
46
- "typescript": "4.5.5",
54
+ "typescript": "~4.9.5",
47
55
  "wait-for-expect": "^1.2.0"
48
56
  },
49
57
  "techstack": {
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/scrub.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/scrub.d.ts"
11
+ "../dist/types-ts4.5/scrub.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/transforms.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/transforms.d.ts"
11
+ "../dist/types-ts4.5/transforms.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/traverse.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/traverse.d.ts"
11
+ "../dist/types-ts4.5/traverse.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/types/index.d.ts"
11
+ "../dist/types-ts4.5/types/index.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/validator.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/validator.d.ts"
11
+ "../dist/types-ts4.5/validator.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types/validatorTypes.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/types/validatorTypes.d.ts"
11
+ "../dist/types-ts4.5/types/validatorTypes.d.ts"
12
12
  ]
13
13
  }
14
14
  }